From f6c405bcd2786c69445fb45591f531fee5140479 Mon Sep 17 00:00:00 2001 From: NullBite Date: Wed, 3 Apr 2024 18:33:52 -0400 Subject: [PATCH] flake: add config shorthand to mkHome This allows for passing short chunks of ad-hoc config, for when a user@host doesn't need an entire home.nix, and it's more concise than specifying a modules array with one module. --- flake.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 9a7fa81..b7713ca 100644 --- a/flake.nix +++ b/flake.nix @@ -236,9 +236,10 @@ entrypoint ? ./home/standalone.nix, modules ? [ ], stateVersion ? null, + config ? { }, system, ... }@args: let - _modules = [ entrypoint ] ++ modules ++ [ + _modules = [ entrypoint ] ++ modules ++ [ config ] ++ [ { config = { home = { @@ -262,7 +263,7 @@ osConfig = {}; }; } // builtins.removeAttrs args - [ "system" "nixpkgs" "home-manager" "modules" "username" "homeDirectory" "stateVersion" "entrypoint" ]); + [ "system" "nixpkgs" "home-manager" "modules" "username" "homeDirectory" "stateVersion" "entrypoint" "config" ]); in { # for repl debugging via :lf . @@ -319,9 +320,10 @@ "nullbite@rpi4" = mkHome { system = "aarch64-linux"; stateVersion = "23.11"; - modules = [ - { programs.zsh.enable = false; } - ]; + config.programs = { + zsh.enable = false; + keychain.enable = false; + }; nixpkgs = inputs.nixpkgs-unstable; home-manager = inputs.home-manager-unstable; }; @@ -329,6 +331,7 @@ system = "x86_64-linux"; stateVersion = "23.11"; username = "deck"; + config.programs.keychain.enable = false; nixpkgs = inputs.nixpkgs-unstable; home-manager = inputs.home-manager-unstable; };