aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/home-manager/nixos/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/home-manager/nixos/default.nix')
-rw-r--r--infra/libkookie/home-manager/nixos/default.nix22
1 files changed, 20 insertions, 2 deletions
diff --git a/infra/libkookie/home-manager/nixos/default.nix b/infra/libkookie/home-manager/nixos/default.nix
index 6645b9068c0a..4b58d154cd43 100644
--- a/infra/libkookie/home-manager/nixos/default.nix
+++ b/infra/libkookie/home-manager/nixos/default.nix
@@ -12,7 +12,7 @@ let
specialArgs = {
lib = extendedLib;
nixosConfig = config;
- };
+ } // cfg.extraSpecialArgs;
modules = [
({ name, ... }: {
imports = import ../modules/modules.nix {
@@ -34,7 +34,7 @@ let
home.homeDirectory = config.users.users.${name}.home;
};
})
- ];
+ ] ++ cfg.sharedModules;
};
serviceEnvironment = optionalAttrs (cfg.backupFileExtension != null) {
@@ -65,6 +65,24 @@ in {
'';
};
+ extraSpecialArgs = mkOption {
+ type = types.attrs;
+ default = { };
+ example = literalExample "{ modulesPath = ../modules; }";
+ description = ''
+ Extra <literal>specialArgs</literal> passed to Home Manager.
+ '';
+ };
+
+ sharedModules = mkOption {
+ type = with types; listOf (oneOf [ attrs (functionTo attrs) path ]);
+ default = [ ];
+ example = literalExample "[ { home.packages = [ nixpkgs-fmt ]; } ]";
+ description = ''
+ Extra modules added to all users.
+ '';
+ };
+
verbose = mkEnableOption "verbose output on activation";
users = mkOption {