diff --git a/home-manager/default.nix b/home-manager/default.nix index 318437a..0bbb2ed 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -8,6 +8,11 @@ ./impermanence ]; + options.homeconfig.host = lib.options.mkOption { + type = lib.types.str; + default = null; + }; + config = { home.stateVersion = "23.11"; diff --git a/home-manager/dotfiles/hypr/main.conf b/home-manager/dotfiles/hypr/main.conf index c36275e..5e429b2 100644 --- a/home-manager/dotfiles/hypr/main.conf +++ b/home-manager/dotfiles/hypr/main.conf @@ -10,10 +10,6 @@ # # #------------------------------------------------# - -#monitor=HEADLESS-2,1920x1080@60,0x0,1 -monitor=eDP-1,1920x1080@60,0x0,1 - exec-once=onSystemStart # Some default env vars. diff --git a/home-manager/programs/hyprland/default.nix b/home-manager/programs/hyprland/default.nix index 6a8457c..4518151 100644 --- a/home-manager/programs/hyprland/default.nix +++ b/home-manager/programs/hyprland/default.nix @@ -21,9 +21,15 @@ systemd.variables = [ "--all" ]; - extraConfig = '' + extraConfig = let + monitor = if config.homeconfig.host == "laptop" then '' + monitor=eDP-1,1920x1080@60,0x0,1 + '' else if config.homeconfig.host == "homebox" then '' + monitor=HEADLESS-2,1920x1080@60,0x0,1 + '' else ''''; + in '' source = /home/nathan/.config/hypr/main.conf - ''; + '' + monitor; }; }; diff --git a/system-config/configuration/homebox/default.nix b/system-config/configuration/homebox/default.nix index cdfb36a..937686e 100644 --- a/system-config/configuration/homebox/default.nix +++ b/system-config/configuration/homebox/default.nix @@ -208,6 +208,7 @@ inputs.nathan-home-manager { config.homeconfig = { + host = "homebox"; impermanence.enable = true; hyprland.enable = true; swaylock.enable = true; diff --git a/system-config/configuration/laptop/default.nix b/system-config/configuration/laptop/default.nix index d133fde..702b937 100644 --- a/system-config/configuration/laptop/default.nix +++ b/system-config/configuration/laptop/default.nix @@ -75,6 +75,7 @@ "nathan" = lib.mkMerge [ { config.homeconfig = { + host = "laptop"; impermanence.enable = false; hyprland.enable = true; swaylock.enable = true;