-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathflake.nix
79 lines (73 loc) · 2.15 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
{
inputs = {
nixpkgs-stable.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat";
crane.url = "github:ipetkov/crane/v0.17.3";
};
nixConfig.extra-substituters = "https://cache.saumon.network/proxmox-nixos";
nixConfig.extra-trusted-public-keys = "proxmox-nixos:nveXDuVVhFDRFx8Dn19f1WDEaNRJjPrF2CPD2D+m1ys=";
description = "Proxmox on NixOS";
outputs =
{
self,
nixpkgs-stable,
nixpkgs-unstable,
utils,
crane,
...
}:
let
inherit (nixpkgs-stable) lib;
in
{
nixosModules = import ./modules;
}
//
utils.lib.eachSystem
[
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
]
(
system:
let
pkgs = import nixpkgs-stable {
inherit system;
overlays = [ self.overlays.${system} ];
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
overlays = [
(_: prev: {
pacemaker = prev.pacemaker.overrideAttrs (_: {
env.NIX_CFLAGS_COMPILE = toString (
[ "-Wno-error=deprecated-declarations" ]
++ lib.optionals prev.stdenv.cc.isGNU [ "-Wno-error=strict-prototypes" ]
);
});
})
];
};
craneLib = crane.mkLib pkgs;
in
{
overlays = _: _: (import ./pkgs { inherit pkgs pkgs-unstable craneLib; });
packages = utils.lib.filterPackages system (import ./pkgs { inherit pkgs pkgs-unstable craneLib; });
checks =
if (system == "x86_64-linux") then
(
self.packages.${system}
// (import ./tests {
inherit pkgs;
extraBaseModules = self.nixosModules;
})
)
else
{ };
}
);
}