tangled
alpha
login
or
join now
nel.pet
/
cyclamen
4
fork
atom
NixOS and Home Manager config
4
fork
atom
overview
issues
pulls
pipelines
feat: modular nix config
nel.pet
7 months ago
ea096021
48d220a6
verified
This commit was signed with the committer's
known signature
.
nel.pet
SSH Key Fingerprint:
SHA256:Zd+mWw4EweOfjYKNMYyVtMSN7oj+SBabmubG4RThVEI=
+58
-5
3 changed files
expand all
collapse all
unified
split
modules
nixos
default.nix
nix.nix
systems
nel-desktop
configuration.nix
+7
modules/nixos/default.nix
···
1
1
+
{
2
2
+
_class = "nixos";
3
3
+
4
4
+
imports = [
5
5
+
./nix.nix
6
6
+
];
7
7
+
}
+50
modules/nixos/nix.nix
···
1
1
+
{ inputs, lib, ... }: {
2
2
+
nix = {
3
3
+
# Add all flake inputs to the system flake registry. There are probably better ways to do this.
4
4
+
# Particularly to consider https://github.com/NixOS/nixpkgs/pull/388090 (thank isabels config for pointing that out)
5
5
+
# but thats an issue for future me.
6
6
+
registry = let
7
7
+
# rename self to cyclamen
8
8
+
inputs' = lib.filterAttrs (
9
9
+
name: value:
10
10
+
if name == "self"
11
11
+
then false
12
12
+
else true
13
13
+
) (inputs // {cyclamen = inputs.self;});
14
14
+
in (
15
15
+
lib.mapAttrs (name: value: {
16
16
+
to = {
17
17
+
type = "path";
18
18
+
path = value;
19
19
+
};
20
20
+
}) inputs'
21
21
+
);
22
22
+
23
23
+
# Dont need or want that.
24
24
+
channel.enable = false;
25
25
+
26
26
+
gc = {
27
27
+
automatic = true;
28
28
+
options = "--delete-older-than 14d";
29
29
+
};
30
30
+
31
31
+
settings = {
32
32
+
allowed-users = [ "@wheel" ];
33
33
+
trusted-users = [ "@wheel" ];
34
34
+
35
35
+
experimental-features = [
36
36
+
# Enable flakes
37
37
+
"nix-command" "flakes"
38
38
+
];
39
39
+
40
40
+
# Disable the global flake registry
41
41
+
flake-registry = "";
42
42
+
43
43
+
# Use as many jobs are there are CPU cores available (speed up builds)
44
44
+
max-jobs = "auto";
45
45
+
46
46
+
# Use $XDG_STATE_HOME/nix instead of ~/.nix-profile and co
47
47
+
use-xdg-base-directories = true;
48
48
+
};
49
49
+
};
50
50
+
}
+1
-5
systems/nel-desktop/configuration.nix
···
1
1
{ ... }: {
2
2
imports = [
3
3
+
../../modules/nixos
3
4
./hardware-configuration.nix
4
5
];
5
6
···
9
10
10
11
networking.hostName = "nel-desktop";
11
12
networking.networkmanager.enable = true;
12
12
-
13
13
-
nix.settings = {
14
14
-
experimental-features = [ "nix-command" "flakes" ];
15
15
-
use-xdg-base-directories = true;
16
16
-
};
17
13
18
14
programs.partition-manager.enable = true;
19
15
services.flatpak.enable = true;