-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
69 lines (66 loc) · 2.42 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
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-24.05;
systems.url = github:nix-systems/default;
nixos-hardware.url = github:NixOS/nixos-hardware/master;
agenix.url = github:ryantm/agenix;
agenix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, systems, agenix, nixos-hardware }: {
packages =
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
eachSystem (system: {
hatch = nixpkgs.legacyPackages.${system}.hatch.overridePythonAttrs (old: {
# need to disable some tests for successful build on aarch64-linux
disabledTests = old.disabledTests ++ [
"test_field_readme"
"test_field_string"
"test_field_complex"
"test_plugin_dependencies_unmet"
];
});
default = nixpkgs.legacyPackages.${system}.callPackage app/package.nix {
waveshare-epd = self.packages.${system}.waveshare-epd;
hatch = self.packages.${system}.hatch;
};
waveshare-epd = nixpkgs.legacyPackages.${system}.callPackage nix-support/waveshare-epd.nix {
hatch = self.packages.${system}.hatch;
rpi-gpio2 = self.packages.${system}.rpi-gpio2;
gpiozero = self.packages.${system}.gpiozero;
};
gpiozero = nixpkgs.legacyPackages.${system}.python3Packages.gpiozero.overridePythonAttrs (old: {
patches = [ ./nix-support/gpiozero.patch ];
});
rpi-gpio2 = nixpkgs.legacyPackages.${system}.python3Packages.rpi-gpio2.override (old: {
libgpiod = self.packages.${system}.libgpiod_1;
});
libgpiod_1 = nixpkgs.legacyPackages.${system}.libgpiod_1.override (old: {
enablePython = true;
});
});
apps =
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
eachSystem (system: {
agenix = {
type = "app";
program = "${agenix.packages.${system}.agenix}/bin/agenix";
};
});
nixosConfigurations.tnf-abfahrtstafel = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {
abfahrtstafel-pkg = self.packages.aarch64-linux.default;
};
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
"${nixos-hardware}/raspberry-pi/4/pkgs-overlays.nix"
agenix.nixosModules.default
os/configuration.nix
];
};
};
}