users: add and export user modules and import them in hosts
This commit is contained in:
parent
0e5aa6568e
commit
416a52fcd3
4 changed files with 16 additions and 7 deletions
10
extern/default.nix
vendored
10
extern/default.nix
vendored
|
@ -1,7 +1,4 @@
|
|||
{ inputs }: with inputs;
|
||||
let
|
||||
hmModules = { };
|
||||
in
|
||||
{
|
||||
modules = [
|
||||
home.nixosModules.home-manager
|
||||
|
@ -19,9 +16,12 @@ in
|
|||
|
||||
# passed to all nixos modules
|
||||
specialArgs = {
|
||||
inherit hmModules;
|
||||
|
||||
overrideModulesPath = "${override}/nixos/modules";
|
||||
hardware = nixos-hardware.nixosModules;
|
||||
};
|
||||
|
||||
# added to home-manager
|
||||
userModules = [
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
let moduleList = import ./modules/module-list.nix;
|
||||
in lib.pathsToImportedAttrs moduleList;
|
||||
|
||||
homeModules =
|
||||
let moduleList = import ./users/modules/module-list.nix;
|
||||
in lib.pathsToImportedAttrs moduleList;
|
||||
|
||||
overlay = import ./pkgs;
|
||||
overlays = lib.pathsToImportedAttrs (lib.pathsIn ./overlays);
|
||||
|
||||
|
|
|
@ -35,8 +35,12 @@ let
|
|||
};
|
||||
|
||||
global = { config, ... }: {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
sharedModules = extern.userModules ++ (builtins.attrValues self.homeModules);
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
|
||||
|
|
1
users/modules/module-list.nix
Normal file
1
users/modules/module-list.nix
Normal file
|
@ -0,0 +1 @@
|
|||
[]
|
Loading…
Reference in a new issue