-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdefault.nix
79 lines (69 loc) · 1.91 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
config,
desktop,
hostname,
inputs,
lib,
modulesPath,
outputs,
stateVersion,
username,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
(./. + "/${hostname}/boot.nix")
(./. + "/${hostname}/hardware.nix")
./common/base
./common/users/${username}
]
++ lib.optional (builtins.pathExists (./. + "/${hostname}/extra.nix")) ./${hostname}/extra.nix
# Include desktop config if a desktop is defined
++ lib.optional (builtins.isString desktop) ./common/desktop;
nixpkgs = {
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
inputs.agenix.overlays.default
inputs.flypi.overlay
inputs.libations.overlays.default
# Or just specify overlays directly here, for example:
# (_: _: { embr = inputs.embr.packages."${pkgs.system}".embr; })
];
config = {
allowUnfree = true;
joypixels.acceptLicense = true;
};
};
nix = {
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = lib.mkForce (lib.mapAttrs (_: value: { flake = value; }) inputs);
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nixPath = lib.mkForce (
lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry
);
optimise.automatic = true;
settings = {
auto-optimise-store = true;
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
};
};
system = {
inherit stateVersion;
};
}