-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
62 lines (56 loc) · 1.6 KB
/
default.nix
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
config,
inputs,
lib,
pkgs,
...
}: {
imports =
[inputs.home-manager.nixosModules.home-manager]
++ (lib.custom.mapModulesRec' ./modules import);
environment.variables.NIXOSCONFIG = config.nixosConfig.dir;
environment.variables.NIXOSCONFIG_BIN = config.nixosConfig.binDir;
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
nix = let
nixPathInputs =
lib.mapAttrsToList (n: v: "${n}=${v}")
(lib.filterAttrs (n: _: n != "self") inputs);
regInputs =
lib.mapAttrs (_: v: {flake = v;})
(lib.filterAttrs (n: _: n != "self") inputs);
in {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nixPath = nixPathInputs ++ ["nixos-config=${config.nixosConfig.dir}"];
registry = regInputs // {nixosConfig.flake = inputs.self;};
settings = {trusted-users = ["root" "${config.user.name}" "@wheel"];};
extraOptions = "experimental-features = nix-command flakes";
};
# default options that apply to all hosts, unless changed
# default timezone
time.timeZone = lib.mkDefault "Europe/Amsterdam";
# default bootoptions / kernel / modules
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = lib.mkDefault true;
systemd-boot.configurationLimit = lib.mkDefault 5;
efi.canTouchEfiVariables = true;
};
initrd = {
verbose = false;
availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
"dm_mod"
];
};
};
system.stateVersion = "23.11";
}