-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
executable file
·64 lines (60 loc) · 1.67 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
{
description = "my based nix configs :3";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-24.05;
sops.url = github:mic92/sops-nix;
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, nixpkgs
, sops
, nixos-hardware
, nixos-generators
}: {
nixosConfigurations = {
naomi = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/naomi
];
};
home = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./hosts/home
nixos-hardware.nixosModules.raspberry-pi-4 # add hardware options for rpi4 f/e spi
./modules/spi.nix
];
};
};
images = builtins.mapAttrs
(name: host: (nixos-generators.nixosGenerate
{
modules = host._module.args.modules;
system = "aarch64-linux";
format = "sd-aarch64";
pkgs = nixpkgs.legacyPackages.aarch64-linux;
}))
self.nixosConfigurations;
colmena = {
meta.allowApplyAll = false;
defaults = { name, config, ... }: {
deployment = {
# tags = [ ];
targetHost = config.networking.fqdn;
targetUser = "root";
};
};
} // builtins.mapAttrs
(name: host: {
nixpkgs = { inherit (host.config.nixpkgs) system; };
imports = host._module.args.modules;
})
self.nixosConfigurations;
};
}