diff --git a/homes/x86_64-linux/alejandro/default.nix b/homes/x86_64-linux/alejandro/default.nix deleted file mode 100644 index 9bad8c8..0000000 --- a/homes/x86_64-linux/alejandro/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{...}: { - aa = { - apps = { - bat.enable = true; - btop.enable = true; - tmux.enable = true; - }; - - programs = { - firefox.enable = true; - fzf.enable = true; - gpg.enable = true; - kitty.enable = true; - zoxide.enable = true; - yazi.enable = true; - }; - - tools = { - direnv.enable = true; - eza.enable = true; - git.enable = true; - zsh.enable = true; - }; - - windowManagers.sway.enable = true; - }; -} diff --git a/homes/x86_64-linux/alejandro@carbon/default.nix b/homes/x86_64-linux/alejandro@carbon/default.nix new file mode 100644 index 0000000..20d07b0 --- /dev/null +++ b/homes/x86_64-linux/alejandro@carbon/default.nix @@ -0,0 +1,3 @@ +{...}: { + aa.isHeadless = false; +} diff --git a/homes/x86_64-linux/alejandro@gospel/default.nix b/homes/x86_64-linux/alejandro@gospel/default.nix new file mode 100644 index 0000000..20d07b0 --- /dev/null +++ b/homes/x86_64-linux/alejandro@gospel/default.nix @@ -0,0 +1,3 @@ +{...}: { + aa.isHeadless = false; +} diff --git a/homes/x86_64-linux/alejandro@node/default.nix b/homes/x86_64-linux/alejandro@node/default.nix new file mode 100644 index 0000000..ea8f50d --- /dev/null +++ b/homes/x86_64-linux/alejandro@node/default.nix @@ -0,0 +1,2 @@ +{...}: { +} diff --git a/modules/home/home/default.nix b/modules/home/home/default.nix index d1af176..566466d 100644 --- a/modules/home/home/default.nix +++ b/modules/home/home/default.nix @@ -1,7 +1,59 @@ { + config, lib, osConfig ? {}, + namespace, ... }: { - home.stateVersion = lib.mkDefault (osConfig.system.stateVersion or "24.05"); + options.${namespace} = { + isHeadless = lib.mkOption { + type = lib.types.bool; + default = true; + description = "If true, graphical applications (e.g. firefox, sway, etc) won't be installed."; + }; + + installDefaults = lib.mkOption { + type = lib.types.bool; + default = true; + description = "If true, a default set of packages will be installed."; + }; + }; + + config = lib.mkMerge [ + ( + lib.mkIf (!config.${namespace}.isHeadless) { + ${namespace} = { + programs.firefox.enable = true; + windowManagers.sway.enable = true; + }; + } + ) + (lib.mkIf (config.${namespace}.installDefaults) { + ${namespace} = { + apps = { + bat.enable = true; + btop.enable = true; + tmux.enable = true; + }; + + programs = { + fzf.enable = true; + gpg.enable = true; + kitty.enable = true; + zoxide.enable = true; + yazi.enable = true; + }; + + tools = { + direnv.enable = true; + eza.enable = true; + git.enable = true; + zsh.enable = true; + }; + }; + }) + { + home.stateVersion = lib.mkDefault (osConfig.system.stateVersion or "24.05"); + } + ]; }