+4
-1
packetmix/inputs.nix
+4
-1
packetmix/inputs.nix
···
6
6
pins = import ./npins;
7
7
8
8
settings = {
9
-
nixpkgs.configuration.allowUnfree = true;
9
+
nixpkgs.configuration = {
10
+
allowUnfree = true;
11
+
overlays = [ ./overlays/hard-fail-system.nix ];
12
+
};
10
13
"nixos-24.11" = settings.nixpkgs;
11
14
nixos-unstable = settings.nixpkgs;
12
15
};
-7
packetmix/modules/nilla-home/home.nix
-7
packetmix/modules/nilla-home/home.nix
···
12
12
default.value = { };
13
13
type = homes-type;
14
14
};
15
-
16
-
config = {
17
-
assertions = lib.attrs.mapToList (name: value: {
18
-
assertion = !(builtins.isNull value.pkgs);
19
-
message = "A Nixpkgs instance is required for the home-manager home \"${name}\", but none was provided and \"inputs.nixpkgs\" does not exist.";
20
-
}) config.homes;
21
-
};
22
15
}
+6
-2
packetmix/modules/nilla-home/homes-type.nix
+6
-2
packetmix/modules/nilla-home/homes-type.nix
···
16
16
name = "home";
17
17
description = "A home-manager home";
18
18
module =
19
-
{ config }@submodule:
19
+
{ config, name }@submodule:
20
20
let
21
21
home_name = config.__module__.args.dynamic.name;
22
22
home_name_parts = builtins.match "([a-z][-a-z0-9]*)(@([-A-Za-z0-9]+))?(:([-_A-Za-z0-9]+))?" home_name;
···
106
106
description = "The created Home Manager home for each of the systems.";
107
107
type = lib.types.attrs.of lib.types.raw;
108
108
writable = false;
109
-
default.value = result;
109
+
default.value =
110
+
if builtins.isNull config.pkgs then
111
+
"A Nixpkgs instance is required for the home-manager home \"${name}\", but none was provided and \"inputs.nixpkgs\" does not exist."
112
+
else
113
+
result;
110
114
};
111
115
};
112
116
+32
-69
packetmix/modules/nilla-home/nixos.nix
+32
-69
packetmix/modules/nilla-home/nixos.nix
···
37
37
homeManager = submodule.config.home-manager;
38
38
in
39
39
(lib.fp.pipe [
40
+
(
41
+
value:
42
+
if builtins.isNull homeManager && value != [ ] then
43
+
builtins.throw "A home-manager instance is required to enable homes for the NixOS system \"${name}\", but none was provided and \"inputs.home-manager\" does not exist."
44
+
else
45
+
value
46
+
)
40
47
(lib.attrs.mapToList (
41
48
homeName: home:
42
49
let
43
50
homeNameParts = builtins.match "([a-z][-a-z0-9]*)(@([-A-Za-z0-9]+))?(:([-_A-Za-z0-9]+))?" homeName;
44
51
username = builtins.elemAt homeNameParts 0;
52
+
homeHasHomeManager = !(builtins.isNull home.home-manager);
53
+
homeIsValidForSystem =
54
+
home ? result.${config.pkgs.stdenv.hostPlatform.system or config.pkgs.system};
45
55
in
46
-
{
47
-
inherit home homeName username;
48
-
}
56
+
if !homeHasHomeManager then
57
+
builtins.throw "You've asked for the home \"${homeName}\" to be activated in the NixOS system \"${name}\", but it needs a home-manager instance, none was provided and \"inputs.home-manager\" does not exist."
58
+
else if !homeIsValidForSystem then
59
+
builtins.throw "You've asked for the home \"${homeName}\" to be activated in the NixOS system \"${name}\", but it isn't valid for \"${
60
+
config.pkgs.stdenv.hostPlatform.system or config.pkgs.system
61
+
}\" systems."
62
+
else
63
+
{
64
+
inherit home homeName username;
65
+
}
49
66
))
67
+
(
68
+
values:
69
+
let
70
+
existingUsernames = builtins.filter (value: value.username != null) values;
71
+
uniqueUsernames = lib.lists.unique existingUsernames;
72
+
in
73
+
if existingUsernames != uniqueUsernames then
74
+
builtins.throw "There are multiple homes for a single user in the NixOS system \"${name}\". Please make sure you've only enabled a single home per user."
75
+
else
76
+
values
77
+
)
50
78
(builtins.map (
51
79
{
52
80
home,
53
81
homeName,
54
-
...
82
+
username,
55
83
}@identity:
56
84
warnIf (home.home-manager != homeManager)
57
85
"The home \"${homeName}\" isn't using the same home-manager input as the NixOS system \"${name}\". This may work, but is not officially supported by the Nilla Home or Nilla NixOS maintainers. Please fix this before reporting any bugs you may find."
···
93
121
)
94
122
);
95
123
};
96
-
};
97
-
98
-
config = {
99
-
assertions = lib.lists.flatten (
100
-
lib.attrs.mapToList (
101
-
name: value:
102
-
let
103
-
hasNixpkgs = !(builtins.isNull value.pkgs);
104
-
requestedHomes = value.homes != [ ];
105
-
hasHomeManager = !(builtins.isNull value.home-manager);
106
-
in
107
-
[
108
-
{
109
-
assertion = hasNixpkgs;
110
-
message = "A Nixpkgs instance is required for the NixOS system \"${name}\", but none was provided and \"inputs.nixpkgs\" does not exist.";
111
-
}
112
-
{
113
-
assertion = !requestedHomes || hasHomeManager;
114
-
message = "A home-manager instance is required to enable homes for the NixOS system \"${name}\", but none was provided and \"inputs.home-manager\" does not exist.";
115
-
}
116
-
(lib.attrs.mapToList (
117
-
homeName: home:
118
-
let
119
-
homeHasHomeManager = !(builtins.isNull home.home-manager);
120
-
homeIsValidForSystem = home ? result.${value.pkgs.stdenv.hostPlatform.system};
121
-
in
122
-
[
123
-
{
124
-
assertion = homeHasHomeManager;
125
-
message = "You've asked for the home \"${homeName}\" to be activated in the NixOS system \"${name}\", but it needs a home-manager instance, none was provided and \"inputs.home-manager\" does not exist.";
126
-
}
127
-
{
128
-
assertion = !homeHasHomeManager || !hasNixpkgs || homeIsValidForSystem;
129
-
message = "You've asked for the home \"${homeName}\" to be activated in the NixOS system \"${name}\", but it isn't valid for \"${value.pkgs.stdenv.hostPlatform.system}\" systems.";
130
-
}
131
-
]
132
-
) value.homes)
133
-
(
134
-
let
135
-
usernames = lib.attrs.mapToList (
136
-
homeName: home:
137
-
let
138
-
homeHasHomeManager = !(builtins.isNull home.home-manager);
139
-
homeIsValidForSystem = home ? result.${value.pkgs.stdenv.hostPlatform.system};
140
-
in
141
-
if homeHasHomeManager && hasNixpkgs && homeIsValidForSystem then
142
-
let
143
-
homeNameParts = builtins.match "([a-z][-a-z0-9]*)(@([-A-Za-z0-9]+))?(:([-_A-Za-z0-9]+))?" homeName;
144
-
username = builtins.elemAt homeNameParts 0;
145
-
in
146
-
username
147
-
else
148
-
null
149
-
) value.homes;
150
-
existingUsernames = builtins.filter (username: username != null) usernames;
151
-
uniqueUsernames = lib.lists.unique existingUsernames;
152
-
in
153
-
{
154
-
assertion = !hasNixpkgs || (existingUsernames == uniqueUsernames);
155
-
message = "There are multiple homes for a single user in the NixOS system \"${name}\". Please make sure you've only enabled a single home per user.";
156
-
}
157
-
)
158
-
]
159
-
) global.config.systems.nixos
160
-
);
161
124
};
162
125
}
+17
-20
packetmix/npins/sources.json
+17
-20
packetmix/npins/sources.json
···
412
412
"owner": "nilla-nix",
413
413
"repo": "nilla"
414
414
},
415
-
"branch": "private/coded/push-nzprlvpltxyl",
415
+
"branch": "private/minion/push-swlstmwvzvkr",
416
416
"submodules": false,
417
-
"revision": "2f8b8c68efc4d81637be344d1b01462291a45e05",
418
-
"url": "https://github.com/nilla-nix/nilla/archive/2f8b8c68efc4d81637be344d1b01462291a45e05.tar.gz",
419
-
"hash": "sha256-VLlP6L8uvgEjb1ZZXdc4P3NAs5PcgIjpGm8LvaObrLY="
417
+
"revision": "1a45420c0b579aea97d834d04e6eec773a8391b1",
418
+
"url": "https://github.com/nilla-nix/nilla/archive/1a45420c0b579aea97d834d04e6eec773a8391b1.tar.gz",
419
+
"hash": "sha256-4jqikEAkh5GUKGDkGAtWRWZexN25Rzt0yIsnilhA77U="
420
420
},
421
421
"nilla-cli": {
422
422
"type": "Git",
···
432
432
"hash": "sha256-cPdYYXhCsDllVgq+gs5Wqhb41bFtKWHlkTvjOJv7its="
433
433
},
434
434
"nilla-home": {
435
-
"type": "GitRelease",
435
+
"type": "Git",
436
436
"repository": {
437
437
"type": "GitHub",
438
438
"owner": "nilla-nix",
439
439
"repo": "home"
440
440
},
441
-
"pre_releases": true,
442
-
"version_upper_bound": null,
443
-
"release_prefix": null,
441
+
"branch": "private/minion/push-ovknmuuuxzul",
444
442
"submodules": false,
445
-
"version": "v0.1.1-alpha",
446
-
"revision": "8d8d783cd3ebe38246f66c027a312e5ec0914c58",
447
-
"url": "https://api.github.com/repos/nilla-nix/home/tarball/refs/tags/v0.1.1-alpha",
448
-
"hash": "sha256-34qP2aqJgvJ6rQo5vi9o65kxrxbp2dFi8S7z3B+P74g="
443
+
"revision": "7d7189e841d70136ac0f9d8a4c024cdc0fe8605d",
444
+
"url": "https://github.com/nilla-nix/home/archive/7d7189e841d70136ac0f9d8a4c024cdc0fe8605d.tar.gz",
445
+
"hash": "sha256-LZrPz9bp3VDOpiv95MuCKIkfgRmfAkR5x4DLNDxCa+o="
449
446
},
450
447
"nilla-nixos": {
451
448
"type": "Git",
···
454
451
"owner": "nilla-nix",
455
452
"repo": "nixos"
456
453
},
457
-
"branch": "main",
454
+
"branch": "private/minion/push-yxkmmnpurumu",
458
455
"submodules": false,
459
-
"revision": "52c623ae89fe77de669a981c7e92b1504cd99eac",
460
-
"url": "https://github.com/nilla-nix/nixos/archive/52c623ae89fe77de669a981c7e92b1504cd99eac.tar.gz",
461
-
"hash": "sha256-7tadYU5GzOUAxo8XLC18+dk0Rj+QSORUO5cFdpqfSy4="
456
+
"revision": "c851cfd1e9555ab2372fd4ce48e1094059eed561",
457
+
"url": "https://github.com/nilla-nix/nixos/archive/c851cfd1e9555ab2372fd4ce48e1094059eed561.tar.gz",
458
+
"hash": "sha256-Mj5DQKDql1IxXsd13zpjJBitjz0ZD6Wr7Q3ASgUFXQY="
462
459
},
463
460
"niri": {
464
461
"type": "Git",
···
541
538
"type": "Git",
542
539
"repository": {
543
540
"type": "Git",
544
-
"url": "https://tangled.org/@tangled.org/core"
541
+
"url": "https://tangled.sh/freshlybakedca.ke/core"
545
542
},
546
-
"branch": "master",
543
+
"branch": "private/minion/push-pyxzxvyxylmx",
547
544
"submodules": false,
548
-
"revision": "3eb9cefd98d13ab9864abb2e394fc41f89ffd923",
545
+
"revision": "acc63d3522b0c9b92ef3ab9214102bedaa944faf",
549
546
"url": null,
550
-
"hash": "sha256-lRTZLRcqWpVf6CzJmvg+ggp/YWWasT4u2lFKIiIopoM="
547
+
"hash": "sha256-DwlweCkrVRga1dZY/gne7DDsFdLsQ8vlgpWegXAbrLY="
551
548
},
552
549
"treefmt-nix": {
553
550
"type": "Git",
+7
packetmix/overlays/hard-fail-system.nix
+7
packetmix/overlays/hard-fail-system.nix