1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-27 09:29:27 +03:00

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;
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 = [
];
}

View File

@ -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);

View File

@ -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;

View File

@ -0,0 +1 @@
[]