-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
118 lines (114 loc) · 3.07 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
iws-rs = {
url = "github:StckOverflw/iws-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
railboard-api = {
url = "github:StckOverflw/railboard-api";
inputs.nixpkgs.follows = "nixpkgs";
};
aufbaubot = {
url = "github:StckOverflw/aufbaubot";
inputs.nixpkgs.follows = "nixpkgs";
};
conduit = {
url = "gitlab:famedly/conduit/next";
# inputs.nixpkgs.follows = "nixpkgs";
};
emmalink = {
url = "github:emmaboecker/emmalink";
inputs.nixpkgs.follows = "nixpkgs";
};
pfica-stats = {
url = "github:emmaboecker/pfica-stats";
inputs.nixpkgs.follows = "nixpkgs";
};
rmbg-server = {
url = "github:emmaboecker/rmbg-server";
};
};
outputs = {
self,
nixpkgs,
disko,
nixos-generators,
deploy-rs,
agenix,
home-manager,
...
} @ attrs: let
system = "x86_64-linux";
pkgs = import nixpkgs {inherit system;};
deployPkgs = import nixpkgs {
inherit system;
overlays = [
deploy-rs.overlay
(self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
in {
nixosConfigurations = {
july = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [
./july.nix
agenix.nixosModules.default
];
};
harper = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [
./harper.nix
home-manager.nixosModules.home-manager
agenix.nixosModules.default
];
};
};
deploy.sshOpts = ["-t"];
deploy.nodes.july = {
hostname = "152.53.65.128";
sshUser = "emma";
# required for sudo pw to work
magicRollback = false;
autoRollback = true;
profiles.system = {
user = "root";
path = deployPkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.july;
};
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = [agenix.packages.x86_64-linux.default deploy-rs.packages.x86_64-linux.default];
};
formatter.x86_64-linux = pkgs.alejandra;
};
}