diff --git a/configuration.nix b/configuration.nix index 1b54472..4c89a8e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -42,7 +42,7 @@ ./system-modules/users.nix ./system-modules/virtualisation.nix ./system-modules/ydotool.nix - ] ++ (if (hyper.host == "NxACE") then [ + ] ++ (if hyper.isServer then [ ./system-modules/nx2site.nix ./system-modules/hugo.nix ./system-modules/postgres.nix diff --git a/flake-modules/hyper.nix b/flake-modules/hyper.nix index b858eab..2bf7aa5 100644 --- a/flake-modules/hyper.nix +++ b/flake-modules/hyper.nix @@ -8,26 +8,34 @@ let hyper-base = rec { main-pkgs-version = "25.11"; isServer = false; isMobile = false; + isPersonal = false; isNOD = false; + isWorkstation = false; nvidia = { enable = false; prime = false; }; }; in host: if host == "NxNORTH" then hyper-base // { inherit host; nvidia.enable = true; + isPersonal = true; + isWorkstation = true; } else if host == "NxXPS" then hyper-base // { inherit host; nvidia = { enable = true; prime = true; }; isMobile = true; + isPersonal = true; + isWorkstation = true; } else if host == "NxACE" then hyper-base // { inherit host; isServer = true; } else if host == "NxDCS" then hyper-base // { inherit host; + isWorkstation = true; isMobile = true; } else if host == "NxS23U" then hyper-base // { inherit host; isMobile = true; isNOD = true; + isPersonal = true; main-pkgs-version = "24.05"; system = "aarch64-linux"; user = "nix-on-droid"; diff --git a/home-modules/email.nix b/home-modules/email.nix index e47897a..9c3150e 100644 --- a/home-modules/email.nix +++ b/home-modules/email.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }@all: with all; -lib.mkIf (hyper.host != "NxACE") -{ +{ pkgs, ... }@all: with all; lib.mkIf (hyper.isPersonal) { home.packages = with pkgs; [ thunderbird ]; diff --git a/home-modules/fish.nix b/home-modules/fish.nix index d0d419d..6978e6f 100644 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -115,7 +115,7 @@ ''; nx_backup = let destination = if hyper.host == "NxNORTH" then "${hyper.home}/shared/" else "${hyper.home}/backups/"; - in pkgs.lib.mkIf (hyper.host == "NxXPS" || hyper.host == "NxNORTH") '' + in pkgs.lib.mkIf (hyper.isPersonal) '' set RPATH (curl -s https://${hyper.domain}/latest-backup) rsync -avz --info=progress2 -e "ssh -p ${builtins.toString secrets.ssh.port}" ${hyper.user}@ssh.${hyper.domain}:"$RPATH" ${destination} ''; diff --git a/home-modules/latex.nix b/home-modules/latex.nix index 6511849..e9bba57 100644 --- a/home-modules/latex.nix +++ b/home-modules/latex.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }@all: with all; -lib.mkIf (hyper.host != "NxACE") -{ +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ texlab # LSP (texlive.combine { inherit (texlive) scheme-full xifthen ifmtarg framed paralist titlesec xcolor; }) diff --git a/home-modules/pkgs-list/programs.nix b/home-modules/pkgs-list/programs.nix index f334791..3259da7 100644 --- a/home-modules/pkgs-list/programs.nix +++ b/home-modules/pkgs-list/programs.nix @@ -1,5 +1,5 @@ { pkgs, hyper, ... }: { - home.packages = with pkgs; [ + home.packages = (with pkgs; [ chromium gnome-clocks gnome-calculator @@ -8,7 +8,7 @@ qbittorrent wl-clipboard xfce.thunar - ] ++ (if (hyper.host != "NxACE") then [ + ]) ++ (if hyper.isWorkstation then (with pkgs; [ signal-desktop unstable.code-cursor-fhs latest.antigravity @@ -19,5 +19,5 @@ audacity gemini-cli libreoffice - ] else []); + ]) else []); } diff --git a/home-modules/programming.nix b/home-modules/programming.nix index 886de76..e4a4c21 100644 --- a/home-modules/programming.nix +++ b/home-modules/programming.nix @@ -1,7 +1,7 @@ { ... }: { imports = [ ./programming/c.nix - ./programming/gleam.nix + # ./programming/gleam.nix ./programming/glsl.nix ./programming/go.nix ./programming/java.nix diff --git a/home-modules/programming/gleam.nix b/home-modules/programming/gleam.nix index 93b1594..9c9ce58 100644 --- a/home-modules/programming/gleam.nix +++ b/home-modules/programming/gleam.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }@all: with all; -lib.mkIf (hyper.host != "NxACE") -{ +{ pkgs, ... }@all: with all; { home.packages = with pkgs; [ erlang rebar3 diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index 7944b05..8823a2d 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -47,7 +47,7 @@ in { { on = [ "g" "t" ]; run = "cd /tmp"; desc = "Go to the /tmp directory"; } { on = [ "g" "v" ]; run = "cd ~/Videos"; desc = "Go to the Videos directory"; } { on = [ "g" "" ]; run = "cd --interactive"; desc = "Go to a directory interactively"; } - (pkgs.lib.mkIf (hyper.host == "NxACE") { on = [ "g" "s" ]; run = "cd /var/lib/hugo/nx2site"; desc = "Go to the Hugo Nx2.Site directory"; }) + (pkgs.lib.mkIf (hyper.isServer) { on = [ "g" "s" ]; run = "cd /var/lib/hugo/nx2site"; desc = "Go to the Hugo Nx2.Site directory"; }) # Navigation { on = "h"; run = "leave"; desc = "Go back to the parent directory"; } { on = "l"; run = "enter"; desc = "Enter the child directory"; } diff --git a/home.nix b/home.nix index d9dcebc..2c5beed 100644 --- a/home.nix +++ b/home.nix @@ -25,7 +25,7 @@ ./home-modules/hyprland-autoname-workspaces.nix ./home-modules/hyprland.nix ./home-modules/kitty.nix - ./home-modules/latex.nix + # ./home-modules/latex.nix ./home-modules/mako.nix # ./home-modules/matrix.nix ./home-modules/mpv.nix @@ -63,7 +63,7 @@ ./home-modules/yazi.nix ./home-modules/zathura.nix ./home-modules/zoxide.nix - ] ++ (if (hyper.host == "NxACE") then [ + ] ++ (if hyper.isServer then [ ./home-modules/nx2site.nix ./home-modules/nx2site-backup.nix ./home-modules/calendar-campuszeit-fix.nix