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

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

View file

@ -3,11 +3,10 @@ let
inherit (moduleFunctions.devicesFunctions)
sambaPermissions
userIdForUser0
userIdForUser1
synologyIP
deviceNames
;
inherit (moduleFunctions.usersFunctions) user0 user0Label user1;
inherit (moduleFunctions.usersFunctions) user0 user0Label;
synologyName = deviceNames.nas;
in
{
@ -25,10 +24,4 @@ in
device = "//${synologyIP}/homes/${user0Label}";
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";
};
paths = {
path0 = "/home/${user0}/Files/Projects"; # Git path
path0 = "/home/${user0}/projects"; # Git path
};
sshKeys = [
"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;
configPath = ./config;
user0 = usersFunctions.user0;
user1 = usersFunctions.user1;
in
{
inherit
user0
user1
;
users = {
"${user0}" = import (configPath + /user0.nix) { inherit user0; };
"${user1}" = import (configPath + /user1.nix) { inherit user1; };
};
}

View file

@ -19,8 +19,6 @@
keys = {
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";
tab = "indent";
S-tab = "unindent";

View file

@ -14,7 +14,6 @@ in
;
inherit (config.people)
user0
user1
;
in
{
@ -63,7 +62,7 @@ in
zoom
academic
hypr
niri
# niri
wayland
theming
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}" = {
imports = builtins.attrValues {
inherit (modules)

View file

@ -27,7 +27,7 @@ in
vaults = {
"obsidian" = {
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;
};
};

View file

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

View file

@ -1,54 +1,27 @@
{ pkgs, ... }:
{ pkgs, flake, ... }:
let
inherit (flake.config.people) user0;
in
{
environment = {
enableAllTerminfo = true;
systemPackages =
let
yazi-picker = pkgs.writeShellScriptBin "yazi-picker" ''
#!/usr/bin/env bash
paths=$(yazi "$2" --chooser-file=/dev/stdout | while read -r; do printf "%q " "$REPLY"; done)
if [[ -n "$paths" ]]; then
zellij action toggle-floating-panes
zellij action write 27 # send <Escape> key
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;
};
systemPackages = builtins.attrValues {
inherit (pkgs)
git
grim
pijul
sshfs
tomb
just
virt-manager
imagemagick
;
};
variables = {
VIDEO_PLAYER = "mpv";
EDITOR = "hx";
TERM = "ghostty";
XDG_DOWNLOAD_DIR = "/home/${user0}/downloads";
NIXPKGS_ALLOW_INSECURE = "1";
NIXPKGS_ALLOW_UNFREE = "1";
GTK_THEME = "catppuccin-macchiato-mauve-compact";

View file

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

View file

@ -4,38 +4,12 @@
...
}:
let
inherit (flake.config.people) user0 user1;
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;
};
};
inherit (flake.config.people) user0;
in
{
users.users =
if hostname == mars then
user0Key // user1Key
else if
builtins.elem hostname [
deimos
ceres
]
then
user0Key
else
{ };
users.users = {
${user0} = {
openssh.authorizedKeys.keys = flake.config.people.users.${user0}.sshKeys;
};
};
}

View file

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

View file

@ -4,7 +4,7 @@ let
inherit (flake.config.machines.devices) ceres;
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.localhost;
host = ceres.wireguard.ip0;