-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathflake.nix
47 lines (40 loc) · 1.46 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
{
description = "NixOS configuration for licheepi4a remote deployment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05-small";
nixos-licheepi4a.url = "github:ryan4yin/nixos-licheepi4a";
};
outputs = { self, nixpkgs, nixos-licheepi4a, ... } @ inputs: let
system = "x86_64-linux";
in {
colmena = {
meta = {
# using the same nixpkgs as nixos-licheepi4a to utilize the cross-compilation cache.
nixpkgs = import nixos-licheepi4a.inputs.nixpkgs { inherit system; };
specialArgs = {
pkgsKernel = nixos-licheepi4a.packages.${system}.pkgsKernelCross;
} // inputs;
};
lp4a = { name, nodes, ... }: {
# Set this ip to your licheepi4a board ip address.
deployment.targetHost = "192.168.5.104";
deployment.targetUser = "root";
imports = [
{
# cross-compilation this flake.
nixpkgs.crossSystem = {
system = "riscv64-linux";
};
}
# import the licheepi4a module, which contains the configuration for bootloader/kernel/firmware
(nixos-licheepi4a + "/modules/licheepi4a.nix")
# import the sd-image module, which contains the fileSystems & kernel parameters for booting from sd card.
(nixos-licheepi4a + "/modules/sd-image/sd-image-lp4a.nix")
# your custom configuration
./configuration.nix
./user-group.nix
];
};
};
};
}