-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
58 lines (50 loc) · 1.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
{
description = "Max Niederman's homelab.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
deploy-rs.url = "github:serokell/deploy-rs";
sops-nix.url = "github:Mic92/sops-nix";
dns.url = "github:nix-community/dns.nix";
};
outputs = { self, nixpkgs, flake-utils, deploy-rs, sops-nix, dns, }:
{
nixosConfigurations = {
beleg = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/beleg
./modules
sops-nix.nixosModules.sops
];
specialArgs = { inherit dns; };
};
};
deploy.nodes = {
beleg = {
hostname = "beleg.banded-scala.ts.net";
profiles.system = {
sshUser = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.beleg;
};
};
};
} // flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
deployPkgs = deploy-rs.packages.${system};
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
name = "homelab";
buildInputs = [
deployPkgs.deploy-rs
pkgs.sops
pkgs.age
pkgs.ssh-to-age
pkgs.alejandra
];
};
});
}