diff --git a/modules/home/environment/hyprland/config.nix b/modules/home/environment/hyprland/config.nix index ad87282..10fd63d 100644 --- a/modules/home/environment/hyprland/config.nix +++ b/modules/home/environment/hyprland/config.nix @@ -3,7 +3,12 @@ host, scheme, ... -}: { +}: + +let + desktop = (host == "oganesson"); +in +{ wayland.windowManager.hyprland = { settings = { monitor = @@ -28,7 +33,7 @@ ]; workspace = - if (host == "oganesson") + if desktop then [ "1,persistent=true,monitor:HDMI-A-1" "2,persistent=true,monitor:HDMI-A-1" diff --git a/modules/home/environment/userpkgs.nix b/modules/home/environment/userpkgs.nix index 9816a0f..7fde31b 100644 --- a/modules/home/environment/userpkgs.nix +++ b/modules/home/environment/userpkgs.nix @@ -3,12 +3,13 @@ host, ... }: - let + let + desktop = (host == "oganesson"); extraFigletFonts = pkgs.fetchFromGitHub { owner = "xero"; repo = "figlet-fonts"; - rev = "master"; - sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; + rev = "master"; + sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; }; toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; @@ -19,9 +20,9 @@ cp -r ${extraFigletFonts}/* $out/share/figlet ''; }); - + desktop_pkgs = - if (host == "oganesson") + if desktop then with pkgs; [ uhk-agent diff --git a/modules/home/environment/zshell.nix b/modules/home/environment/zshell.nix index 0993cf5..438aa3d 100644 --- a/modules/home/environment/zshell.nix +++ b/modules/home/environment/zshell.nix @@ -13,6 +13,7 @@ VISUAL = "nvim"; LANG = "en_US.UTF-8"; BROWSER = "firefox"; + FLAKEPATH = "$HOME/.sysflake"; }; oh-my-zsh = { @@ -48,15 +49,15 @@ psg = "ps aux | grep -v grep | grep -i -e VSZ -e"; mkdir = "mkdir -p"; pk = "pkill -9 -f"; - zrc = "nvim ${self}/modules/home/environment/zshell.nix"; + zrc = "nvim $FLAKEPATH/modules/home/environment/zshell.nix"; svcu = "systemctl --user"; svc = "sudo systemctl"; viflake = "nvim flake.nix"; - hyprconf = "yazi ${self}/modules/home/hyprland && popd &> /dev/null"; - hmconf = "yazi ${self}/modules/home/ && popd &> /dev/null"; - nixconf = "yazi ${self}/modules/sys/ && popd &> /dev/null"; - hostconf = "yazi ${self}/hosts && popd &> /dev/null"; - nvimcfg = "yazi ${self}/pkgs/nixvim/config && popd &> /dev/null"; + hyprconf = "yazi $FLAKEPATH/modules/home/hyprland && popd &> /dev/null"; + hmconf = "yazi $FLAKEPATH/modules/home/ && popd &> /dev/null"; + nixconf = "yazi $FLAKEPATH/modules/sys/ && popd &> /dev/null"; + hostconf = "yazi $FLAKEPATH/hosts && popd &> /dev/null"; + nvimcfg = "yazi $FLAKEPATH/pkgs/nixvim/config && popd &> /dev/null"; }; initExtra = '' @@ -127,6 +128,7 @@ clear splash scheck && runbg aplay ${self}/assets/sound/sh-source.wav + [ ! -f $FLAKEPATH/flake.nix ] && echo "WARNING: flake.nix not found at \$FLAKEPATH. Shell aliases for editing config files won't work correctly!" && echo "Edit the FLAKEPATH session variable in zshell.nix to point to the path where you saved the system configuration flake." ''; }; } diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index 73b59a6..9e7dd25 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -9,8 +9,9 @@ home-manager, ... }: let + desktop = (host == "onagesson"); desktop_modules = - if (host == "onagesson") + if desktop then [(import ./gaming)] else []; in { diff --git a/modules/home/scripts/wm-controls/passhelper.nix b/modules/home/scripts/wm-controls/keyring.nix similarity index 100% rename from modules/home/scripts/wm-controls/passhelper.nix rename to modules/home/scripts/wm-controls/keyring.nix diff --git a/modules/sys/hardware/network.nix b/modules/sys/hardware/network.nix index 493677f..fcdfcee 100644 --- a/modules/sys/hardware/network.nix +++ b/modules/sys/hardware/network.nix @@ -1,8 +1,12 @@ -{host, ...}: { +{host, ...}: +let + desktop = (host == "oganesson"); +in +{ networking = { networkmanager.enable = true; hostName = - if (host == "oganesson") + if desktop then "oganesson" else "mercury"; hosts = { diff --git a/modules/sys/software/default.nix b/modules/sys/software/default.nix index 3e3a2f1..6fdcea7 100644 --- a/modules/sys/software/default.nix +++ b/modules/sys/software/default.nix @@ -1,4 +1,3 @@ - { inputs, nixpkgs, @@ -7,18 +6,18 @@ username, host, ... -}: +}: let - desktop_modules = if (host == "oganesson") then + desktop = (host == "oganesson"); + desktop_modules = if desktop then [(import ./virtualization.nix)] ++ [(import ./gaming)] else []; in { - imports = + imports = [(import ./packages.nix)] ++ [(import ./programs.nix)] ++ [(import ./services.nix)] ++ [(import ./nixvim)] ++ desktop_modules; } -