users: add and export user modules and import them in hosts

This commit is contained in:
Pacman99 2021-03-23 07:34:38 -07:00
parent 0e5aa6568e
commit 416a52fcd3
4 changed files with 16 additions and 7 deletions

10
extern/default.nix vendored
View file

@ -1,7 +1,4 @@
{ inputs }: with inputs; { inputs }: with inputs;
let
hmModules = { };
in
{ {
modules = [ modules = [
home.nixosModules.home-manager home.nixosModules.home-manager
@ -19,9 +16,12 @@ in
# passed to all nixos modules # passed to all nixos modules
specialArgs = { specialArgs = {
inherit hmModules;
overrideModulesPath = "${override}/nixos/modules"; overrideModulesPath = "${override}/nixos/modules";
hardware = nixos-hardware.nixosModules; hardware = nixos-hardware.nixosModules;
}; };
# added to home-manager
userModules = [
];
} }

View file

@ -51,6 +51,10 @@
let moduleList = import ./modules/module-list.nix; let moduleList = import ./modules/module-list.nix;
in lib.pathsToImportedAttrs moduleList; in lib.pathsToImportedAttrs moduleList;
homeModules =
let moduleList = import ./users/modules/module-list.nix;
in lib.pathsToImportedAttrs moduleList;
overlay = import ./pkgs; overlay = import ./pkgs;
overlays = lib.pathsToImportedAttrs (lib.pathsIn ./overlays); overlays = lib.pathsToImportedAttrs (lib.pathsIn ./overlays);

View file

@ -35,8 +35,12 @@ let
}; };
global = { config, ... }: { global = { config, ... }: {
home-manager.useGlobalPkgs = true; home-manager = {
home-manager.useUserPackages = true; useGlobalPkgs = true;
useUserPackages = true;
sharedModules = extern.userModules ++ (builtins.attrValues self.homeModules);
};
hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.enableRedistributableFirmware = lib.mkDefault true;

View file

@ -0,0 +1 @@
[]