modules: move colors to `home/modules`, explicitly import all

This commit is contained in:
Oystein Kristoffer Tveit 2023-07-28 21:48:15 +02:00
parent 4456244f2d
commit fdace82c2f
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
5 changed files with 8 additions and 13 deletions

View File

@ -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;
};
};

View File

@ -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 [

View File

@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./colors.nix
./machineVars.nix
];
}

View File

@ -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.";