feat: removed user1 and tidied up user0 home

This commit is contained in:
Nick 2025-10-02 20:48:44 -05:00
parent 0665b883ab
commit 07a6bb2073
78 changed files with 43 additions and 280 deletions

View file

@ -96,7 +96,6 @@
mars = inputs.self.lib.mkLinuxSystem [ mars = inputs.self.lib.mkLinuxSystem [
./systems/mars ./systems/mars
./profiles/user0 ./profiles/user0
./profiles/user1
config.nixosModules.mars config.nixosModules.mars
config.nixosModules.core config.nixosModules.core
config.nixosModules.mantle config.nixosModules.mantle
@ -104,7 +103,7 @@
inputs.nixos-cosmic.nixosModules.default inputs.nixos-cosmic.nixosModules.default
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
inputs.niri.nixosModules.niri # inputs.niri.nixosModules.niri
inputs.nur.modules.nixos.default inputs.nur.modules.nixos.default
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
]; ];

View file

@ -225,9 +225,6 @@ in
userIdForUser0 = [ userIdForUser0 = [
"uid=1000" "uid=1000"
]; ];
userIdForUser1 = [
"uid=1002"
];
dummy = [ dummy = [
]; ];
@ -294,8 +291,6 @@ in
usersFunctions = { usersFunctions = {
user0 = "nick"; user0 = "nick";
user0Label = "Nick"; user0Label = "Nick";
user1 = "streaming";
user1Label = "Streaming";
}; };
}; };

View file

@ -3,11 +3,10 @@ let
inherit (moduleFunctions.devicesFunctions) inherit (moduleFunctions.devicesFunctions)
sambaPermissions sambaPermissions
userIdForUser0 userIdForUser0
userIdForUser1
synologyIP synologyIP
deviceNames deviceNames
; ;
inherit (moduleFunctions.usersFunctions) user0 user0Label user1; inherit (moduleFunctions.usersFunctions) user0 user0Label;
synologyName = deviceNames.nas; synologyName = deviceNames.nas;
in in
{ {
@ -25,10 +24,4 @@ in
device = "//${synologyIP}/homes/${user0Label}"; device = "//${synologyIP}/homes/${user0Label}";
options = sambaPermissions ++ userIdForUser0; options = sambaPermissions ++ userIdForUser0;
}; };
# Streaming Folder
folder1 = {
mount = "/mnt/media/${synologyName}/${user1}";
device = "//${synologyIP}/homes/${user0Label}";
options = sambaPermissions ++ userIdForUser1;
};
} }

View file

@ -14,7 +14,7 @@
address2 = "nick@uprootnutrition.com"; address2 = "nick@uprootnutrition.com";
}; };
paths = { paths = {
path0 = "/home/${user0}/Files/Projects"; # Git path path0 = "/home/${user0}/projects"; # Git path
}; };
sshKeys = [ sshKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop"

View file

@ -1,15 +0,0 @@
{ user1 }:
{
name = "Streaming";
aliases = {
};
email = {
address0 = "nick@upRootNutrition.com";
};
paths = {
path0 = "/home/${user1}/Files/Projects"; # Git path
};
sshKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop"
];
}

View file

@ -3,15 +3,12 @@ let
inherit (moduleFunctions) usersFunctions; inherit (moduleFunctions) usersFunctions;
configPath = ./config; configPath = ./config;
user0 = usersFunctions.user0; user0 = usersFunctions.user0;
user1 = usersFunctions.user1;
in in
{ {
inherit inherit
user0 user0
user1
; ;
users = { users = {
"${user0}" = import (configPath + /user0.nix) { inherit user0; }; "${user0}" = import (configPath + /user0.nix) { inherit user0; };
"${user1}" = import (configPath + /user1.nix) { inherit user1; };
}; };
} }

View file

@ -19,8 +19,6 @@
keys = { keys = {
normal = { normal = {
C-y = ":sh zellij run -n Yazi -c -f -x 10%% -y 10%% --width 80%% --height 80%% -- yazi-picker open .";
C-v = ":sh zellij run -n Lazygit -c -f -x 10%% -y 10%% --width 80%% --height 80%% -- lazygit-root";
f = ":format"; f = ":format";
tab = "indent"; tab = "indent";
S-tab = "unindent"; S-tab = "unindent";

View file

@ -14,7 +14,6 @@ in
; ;
inherit (config.people) inherit (config.people)
user0 user0
user1
; ;
in in
{ {
@ -63,7 +62,7 @@ in
zoom zoom
academic academic
hypr hypr
niri # niri
wayland wayland
theming theming
printManager printManager
@ -76,32 +75,6 @@ in
; ;
}; };
}; };
"${mars.name}-${user1}" = {
imports = builtins.attrValues {
inherit (modules)
cli
floorp
ghostty
steam
zed
obsidian
okular
kolourPaint
imageViewing
obsStudio
mpv
freetube
vesktop
bitwarden
emote
flameshot
gnomeCalculator
theming
hypr
wayland
;
};
};
"${deimos.name}-${user0}" = { "${deimos.name}-${user0}" = {
imports = builtins.attrValues { imports = builtins.attrValues {
inherit (modules) inherit (modules)

View file

@ -27,7 +27,7 @@ in
vaults = { vaults = {
"obsidian" = { "obsidian" = {
enable = true; enable = true;
target = "/home/${user0}/Files/Projects/dotfiles/modules/home/gui/apps/media/docs/docEditing/obsidian/vault0/files"; target = "/home/${user0}/projects/dotfiles/modules/home/gui/apps/media/docs/docEditing/obsidian/vault0/files";
settings = vault0Settings; settings = vault0Settings;
}; };
}; };

View file

@ -2,7 +2,6 @@
let let
inherit (flake.config.people) inherit (flake.config.people)
user0 user0
user1
; ;
in in
{ {
@ -15,7 +14,6 @@ in
noPass = true; noPass = true;
users = [ users = [
user0 user0
user1
]; ];
} }
]; ];

View file

@ -1,54 +1,27 @@
{ pkgs, ... }: { pkgs, flake, ... }:
let
inherit (flake.config.people) user0;
in
{ {
environment = { environment = {
enableAllTerminfo = true; enableAllTerminfo = true;
systemPackages = systemPackages = builtins.attrValues {
let inherit (pkgs)
yazi-picker = pkgs.writeShellScriptBin "yazi-picker" '' git
#!/usr/bin/env bash grim
pijul
paths=$(yazi "$2" --chooser-file=/dev/stdout | while read -r; do printf "%q " "$REPLY"; done) sshfs
tomb
if [[ -n "$paths" ]]; then just
zellij action toggle-floating-panes virt-manager
zellij action write 27 # send <Escape> key imagemagick
zellij action write-chars ":$1 $paths" ;
zellij action write 13 # send <Enter> key };
else
zellij action toggle-floating-panes
fi
'';
lazygit-root = pkgs.writeShellScriptBin "lazygit-root" ''
#!/usr/bin/env bash
git_root=$(git rev-parse --show-toplevel 2>/dev/null)
if [[ -z "$git_root" ]]; then
echo "Not in a git repository"
exit 1
fi
cd "$git_root" && lazygit
'';
in
builtins.attrValues {
inherit (pkgs)
git
grim
pijul
sshfs
tomb
just
virt-manager
imagemagick
;
# Add your custom scripts to the attribute set
inherit yazi-picker lazygit-root;
};
variables = { variables = {
VIDEO_PLAYER = "mpv"; VIDEO_PLAYER = "mpv";
EDITOR = "hx"; EDITOR = "hx";
TERM = "ghostty"; TERM = "ghostty";
XDG_DOWNLOAD_DIR = "/home/${user0}/downloads";
NIXPKGS_ALLOW_INSECURE = "1"; NIXPKGS_ALLOW_INSECURE = "1";
NIXPKGS_ALLOW_UNFREE = "1"; NIXPKGS_ALLOW_UNFREE = "1";
GTK_THEME = "catppuccin-macchiato-mauve-compact"; GTK_THEME = "catppuccin-macchiato-mauve-compact";

View file

@ -9,6 +9,6 @@ in
enable = true; enable = true;
dates = "weekly"; dates = "weekly";
}; };
flake = "/home/${user0}/Files/Projects/dotfiles"; flake = "/home/${user0}/projects/dotfiles";
}; };
} }

View file

@ -4,38 +4,12 @@
... ...
}: }:
let let
inherit (flake.config.people) user0 user1; inherit (flake.config.people) user0;
inherit (flake.config.machines) devices;
hostname = config.networking.hostName;
mars = devices.mars.name;
deimos = devices.deimos.name;
ceres = devices.ceres.name;
getUserKeys = user: flake.config.people.users.${user}.sshKeys;
user0Key = {
${user0} = {
openssh.authorizedKeys.keys = getUserKeys user0;
};
};
user1Key = {
${user1} = {
openssh.authorizedKeys.keys = getUserKeys user1;
};
};
in in
{ {
users.users = users.users = {
if hostname == mars then ${user0} = {
user0Key // user1Key openssh.authorizedKeys.keys = flake.config.people.users.${user0}.sshKeys;
else if };
builtins.elem hostname [ };
deimos
ceres
]
then
user0Key
else
{ };
} }

View file

@ -9,11 +9,11 @@ in
inherit (modules) inherit (modules)
syncthing syncthing
ollama ollama
cosmic # cosmic
# plasma # plasma
# hypr hypr
# niri # niri
# wayland wayland
network network
searx searx
flatpak flatpak

View file

@ -4,7 +4,7 @@ let
inherit (flake.config.machines.devices) ceres; inherit (flake.config.machines.devices) ceres;
in in
{ {
assets-path = "/home/${user0}/Files/Projects/dotfiles/modules/nixos/services/glance/assets"; assets-path = "/home/${user0}/projects/dotfiles/modules/nixos/services/glance/assets";
# host = configHelpers.host; # host = configHelpers.host;
# host = configHelpers.localhost; # host = configHelpers.localhost;
host = ceres.wireguard.ip0; host = ceres.wireguard.ip0;

View file

@ -52,11 +52,11 @@ in
homeDirectory = "/home/${user0}"; homeDirectory = "/home/${user0}";
file = { file = {
"./justfile" = import ./files/misc/justfile.nix { inherit flake config lib; }; "./justfile" = import ./files/misc/justfile.nix { inherit flake config lib; };
"./Files/Scripts/list.sh" = { "./.config/scripts/list.sh" = {
source = ./files/scripts/list.sh; source = ./files/scripts/list.sh;
executable = true; executable = true;
}; };
"./Files/Scripts/loop.sh" = { "./.config/scripts/loop.sh" = {
source = ./files/scripts/loop.sh; source = ./files/scripts/loop.sh;
executable = true; executable = true;
}; };
@ -97,22 +97,13 @@ in
"d ${paths.path0} 0755 ${user0} users -" "d ${paths.path0} 0755 ${user0} users -"
] ]
++ (map (path: "d /home/${user0}/${path} 0755 ${user0} users -") [ ++ (map (path: "d /home/${user0}/${path} 0755 ${user0} users -") [
"Downloads/Nicotine" "projects"
"Downloads/Nicotine/Downloads" "downloads"
"Downloads/Nicotine/Incomplete"
"Downloads/Nicotine/Received"
"Downloads/Qbittorent"
"Downloads/Qbittorent/Movies"
"Downloads/Qbittorent/Music"
"Downloads/Qbittorent/Shows"
"Files"
"Files/Scripts"
"Files/Games"
"Files/Screenshots"
]) ])
++ (map (path: "R /home/${user0}/${path} 0755 ${user0} users - -") [ ++ (map (path: "R /home/${user0}/${path} 0755 ${user0} users - -") [
"Desktop" "Desktop"
"Documents" "Documents"
"Downloads"
"Music" "Music"
"Pictures" "Pictures"
"Public" "Public"

View file

@ -33,16 +33,16 @@ in
{ {
text = '' text = ''
rebuildBoot: rebuildBoot:
nixos-rebuild boot --sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace nixos-rebuild boot --sudo --flake ~/projects/dotfiles#${hostname} --show-trace
rebuild: rebuild:
nixos-rebuild switch --sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace nixos-rebuild switch --sudo --flake ~/projects/dotfiles#${hostname} --show-trace
rebuild-server: rebuild-server:
nixos-rebuild switch --flake ~/Files/Projects/dotfiles#${ceres.name} --target-host ${ceres.ip.address0} --sudo --ask-sudo-password nixos-rebuild switch --flake ~/projects/dotfiles#${ceres.name} --target-host ${ceres.ip.address0} --sudo --ask-sudo-password
update: update:
nix flake update --flake ~/Files/Projects/dotfiles nix flake update --flake ~/projects/dotfiles
remove-redundant: remove-redundant:
ls **/*.hs | each { |file| hlint --refactor --refactor-options="--inplace" $file.name } ls **/*.hs | each { |file| hlint --refactor --refactor-options="--inplace" $file.name }

View file

@ -1,91 +0,0 @@
{
config,
flake,
pkgs,
lib,
...
}:
let
inherit (flake) self;
inherit (flake.config.people) user1;
inherit (flake.config.machines) devices;
inherit (flake.config.people.users.${user1}) name paths;
hostname = config.networking.hostName;
in
{
users = {
users.${user1} = {
description = name;
name = user1;
isNormalUser = true;
shell = pkgs.nushell;
extraGroups = [
"adbusers"
"disk"
"libvirtd"
"netdev"
"networkmanager"
"plugdev"
"samba"
"vboxusers"
"wheel"
];
};
};
home-manager.users = {
${user1} = {
home = {
username = user1;
homeDirectory = "/home/${user1}";
file = {
"./.config/scripts/get_weather.sh" = {
source = ./files/scripts/get_weather.sh;
executable = true;
};
".config/wallpaper" = {
source = ./files/wallpaper;
recursive = true;
};
"./.config/vesktop/themes/macchiato-theme.css" = {
source = ./files/themes/vesktop/macchiato-theme.css;
};
};
sessionVariables = {
VISUAL = lib.getExe pkgs.zed-editor;
GTK_THEME = "catppuccin-macchiato-mauve-compact";
};
};
imports = [
{
home.stateVersion = config.system.stateVersion;
}
{
imports = [
self.homeModules."${devices.${hostname}.name}-${user1}"
];
}
];
};
};
systemd.tmpfiles = {
rules =
[
"d ${paths.path0} 0755 ${user1} users -"
]
++ (map (path: "d /home/${user1}/${path} 0755 ${user1} users -") [
"Files"
"Files/Scripts"
"Files/Games"
"Files/Screenshots"
])
++ (map (path: "R /home/${user1}/${path} 0755 ${user1} users - -") [
"Desktop"
"Documents"
"Music"
"Pictures"
"Public"
"Templates"
"Videos"
]);
};
}

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
for i in {1..5}
do
text=$(curl -s "https://wttr.in/$1?format=1")
if [[ $? == 0 ]]
then
text=$(echo "$text" | sed -E "s/\s+/ /g")
tooltip=$(curl -s "https://wttr.in/$1?format=4")
if [[ $? == 0 ]]
then
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
exit
fi
fi
sleep 2
done
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"

View file

@ -1 +0,0 @@
@import url("https://catppuccin.github.io/discord/dist/catppuccin-macchiato.theme.css");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 808 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 876 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -4,7 +4,7 @@
... ...
}: }:
let let
inherit (flake.config.people) user0 user1; inherit (flake.config.people) user0;
inherit (flake.config.machines.devices) mars ceres synology; inherit (flake.config.machines.devices) mars ceres synology;
inherit (flake.config.services) instances; inherit (flake.config.services) instances;
synologySecrets = config.sops.secrets."network/synology".path; synologySecrets = config.sops.secrets."network/synology".path;
@ -15,7 +15,6 @@ in
let let
synologyDrives = [ synologyDrives = [
"folder0" "folder0"
"folder1"
]; ];
storageDrives = [ storageDrives = [
@ -88,7 +87,6 @@ in
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -"
"Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -"
"Z ${mars.storage0.mount} 0755 ${user0} users -" "Z ${mars.storage0.mount} 0755 ${user0} users -"
"Z ${mars.storage1.mount} 0755 ${user0} users -" "Z ${mars.storage1.mount} 0755 ${user0} users -"
]; ];