From fdace82c2fcc6209c9fcc551b29f2f42ad32fbd8 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 28 Jul 2023 21:48:15 +0200 Subject: [PATCH] modules: move colors to `home/modules`, explicitly import all --- flake.nix | 7 ++++--- home/home.nix | 6 +++--- {modules => home/modules}/colors.nix | 0 modules/default.nix | 7 ------- modules/machineVars.nix | 1 + 5 files changed, 8 insertions(+), 13 deletions(-) rename {modules => home/modules}/colors.nix (100%) delete mode 100644 modules/default.nix diff --git a/flake.nix b/flake.nix index 2ea73ea..6f5afe0 100644 --- a/flake.nix +++ b/flake.nix @@ -145,7 +145,7 @@ configuration = { imports = [ ./home/home.nix - ./modules + ./modules/machineVars.nix ]; machineVars = { @@ -167,7 +167,8 @@ inherit (pkgs) lib; modules = [ "${home-manager}/nixos" - ./modules + ./modules/machineVars.nix + ./modules/socketActivation.nix ./hosts/common.nix ./hosts/${name}/configuration.nix @@ -205,7 +206,7 @@ inherit pkgs; inherit inputs; inherit (pkgs) lib; - inherit (config) machineVars colors; + inherit (config) machineVars; inherit (self) extendedLib; }; }; diff --git a/home/home.nix b/home/home.nix index 77d0008..ae66895 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,9 +1,8 @@ -{ pkgs, lib, extendedLib, inputs, machineVars, colors, ... } @ args: let +{ pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let inherit (lib) mkForce mkIf optionals; graphics = !machineVars.headless; in { inherit machineVars; - inherit colors; imports = [ ./shellOptions.nix @@ -25,7 +24,8 @@ in { ./programs/tmux.nix ./programs/zsh - ../modules + ../modules/machineVars.nix + ./modules/colors.nix inputs.secrets.outputs.home-config ] ++ optionals graphics [ diff --git a/modules/colors.nix b/home/modules/colors.nix similarity index 100% rename from modules/colors.nix rename to home/modules/colors.nix diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index b40d172..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: -{ - imports = [ - ./colors.nix - ./machineVars.nix - ]; -} diff --git a/modules/machineVars.nix b/modules/machineVars.nix index a083bd3..ea4b47a 100644 --- a/modules/machineVars.nix +++ b/modules/machineVars.nix @@ -3,6 +3,7 @@ let inherit (lib) types mkEnableOption mkOption mkIf; cfg = config.machineVars; in { + # TODO: namespace these options behind `local` options.machineVars = { headless = mkEnableOption "Whether or not the machine should have graphical output.";