-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
64 lines (56 loc) · 2.34 KB
/
flake.nix
File metadata and controls
64 lines (56 loc) · 2.34 KB
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
{
description = "A flake to produce sd-card images and nixos configurations running Nixtcloud for Raspberry Pi 4, 5, and NanoPi NEO3";
#Nix-community cachix is needed if you want to build the image for raspberry pi 5. If you don't want to use it,
#the linux kernel will be built from source which takes a long time.
nixConfig = {
substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
holesail.url = "github:jjacke13/holesail-nix/test";
raspberry-pi-nix.url = "github:nix-community/raspberry-pi-nix";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { self, nixpkgs, holesail, raspberry-pi-nix, nixos-hardware, ... }:
{
nixosModules.state = { system.stateVersion = "25.11"; };
packages.aarch64-linux = {
Rpi4 = self.nixosConfigurations.Rpi4.config.system.build.sdImage;
Rpi5 = self.nixosConfigurations.Rpi5.config.system.build.sdImage;
Nanopi-neo3 = self.nixosConfigurations.Nanopi-neo3.config.system.build.sdImage;
};
nixosConfigurations= {
Rpi4 = nixpkgs.lib.nixosSystem {
modules = [
holesail.nixosModules.aarch64-linux.holesail
./base/configuration.nix
./hardware/Rpi4.nix
nixos-hardware.nixosModules.raspberry-pi-4
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
self.nixosModules.state
];
};
Rpi5 = nixpkgs.lib.nixosSystem {
modules = [
holesail.nixosModules.aarch64-linux.holesail
./base/configuration.nix
./hardware/Rpi5.nix
raspberry-pi-nix.nixosModules.raspberry-pi
raspberry-pi-nix.nixosModules.sd-image
self.nixosModules.state
];
};
Nanopi-neo3 = nixpkgs.lib.nixosSystem {
modules = [
holesail.nixosModules.aarch64-linux.holesail
./base/configuration.nix
./hardware/Nanopi-neo3.nix
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
self.nixosModules.state
];
};
};
};
}