forked from divnix/digga
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodules.nix
More file actions
39 lines (33 loc) · 1.09 KB
/
Copy pathmodules.nix
File metadata and controls
39 lines (33 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib }:
{
hmNixosDefaults = { specialArgs, modules }:
{ options, ... }: {
config = lib.optionalAttrs (options ? home-manager) {
home-manager = {
# always use the system nixpkgs from the host's channel
useGlobalPkgs = true;
# and use the possible future default (see manual)
useUserPackages = lib.mkDefault true;
extraSpecialArgs = specialArgs;
sharedModules = modules;
};
};
};
globalDefaults = { hmUsers }:
{ config, pkgs, self, ... }: {
users.mutableUsers = lib.mkDefault false;
hardware.enableRedistributableFirmware = lib.mkDefault true;
# digga lib can be accessed in modules directly as config.lib.digga
lib = {
inherit (pkgs.lib) digga;
};
_module.args = {
inherit hmUsers;
hosts = throw ''
The `hosts` module argument has been removed, you should instead use
`self.nixosConfigurations`, with the `self` module argument.
'';
};
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
};
}