-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
80 lines (72 loc) · 2.03 KB
/
flake.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
80
{
description = "Home Manager and NixOS configurations of pyrotelekinetic";
inputs = {
home-manager = {
url = "github:nix-community/home-manager?ref=master";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote?ref=v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.91";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware?ref=master";
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
pinputs = {
url = "github:pyrotelekinetic/pinputs?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
pyroscheme.url = "github:pyrotelekinetic/pyroscheme?ref=main";
sops-nix = {
url = "github:Mic92/sops-nix?ref=master";
inputs.nixpkgs.follows = "nixpkgs";
};
wrapper-manager = {
url = "github:viperML/wrapper-manager?ref=master";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs: let
inherit (inputs) nixpkgs;
inherit (nixpkgs.lib) flip genAttrs;
hosts = flip genAttrs (import ./mkSystem.nix inputs);
allSystems = output: genAttrs nixpkgs.lib.systems.flakeExposed
(system: output nixpkgs.legacyPackages.${system});
in {
nixosConfigurations = hosts [
"sol"
"vega"
"luna"
"altair"
"alsafi"
];
images.luna = let
luna-img = inputs.self.nixosConfigurations.luna.extendModules {
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
{
nixpkgs.buildPlatform.system = "x86_64-linux";
documentation.enable = false;
}
];
};
in
luna-img.config.system.build.sdImage;
formatter = allSystems (pkgs:
pkgs.writeShellApplication {
name = "deadnix";
runtimeInputs = [ pkgs.deadnix ];
text = "deadnix -e";
}
);
checks = allSystems (pkgs: {
default = pkgs.runCommand "deadnix-check" {} ''
${pkgs.lib.getExe pkgs.deadnix} --fail ${inputs.self}
touch $out
'';
});
};
}