Skip to content

Commit

Permalink
root option: add home-manager.sharedModules
Browse files Browse the repository at this point in the history
This option is a list of modules shared among all users to avoid
importing the same modules for every user manually.
  • Loading branch information
lucasew committed Jan 29, 2021
1 parent db88b62 commit c82c619
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ let
home.homeDirectory = config.users.users.${name}.home;
};
})
({ ... }: { imports = cfg.sharedModules; })
];
};

Expand Down Expand Up @@ -65,6 +66,15 @@ in {
'';
};

sharedModules = mkOption {
type = types.listOf types.path;
default = [ ];
example = [ /path/to/module.nix ];
description = ''
Shared home-manager modules among all users
'';
};

verbose = mkEnableOption "verbose output on activation";

users = mkOption {
Expand Down

0 comments on commit c82c619

Please sign in to comment.