-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
83 lines (75 loc) · 2.44 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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09";
inputs.nixpkgs_unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.home-manager.url = "github:nix-community/home-manager";
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
inputs.deploy-rs.url = "github:serokell/deploy-rs";
inputs.david-config = {
url = "github:DeltaEvo/.config";
flake = false;
};
outputs =
{ self, nixpkgs, nixpkgs_unstable, home-manager, deploy-rs, david-config }:
let
unstable-module = { config, ... }: {
nixpkgs.overlays = [
(final: prev: {
unstable = import nixpkgs_unstable {
config = config.nixpkgs.config;
system = config.nixpkgs.localSystem.system;
};
})
];
};
in {
nixosConfigurations.Zeus = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit david-config; };
modules = [
(_args: {
system.configurationRevision =
nixpkgs.lib.mkIf (self ? rev) self.rev;
})
(import ./machines/zeus.nix)
unstable-module
home-manager.nixosModules.home-manager
];
};
nixosConfigurations.Hades = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { inherit david-config; };
modules = [
(_args: {
system.configurationRevision =
nixpkgs.lib.mkIf (self ? rev) self.rev;
})
(import ./machines/hades.nix)
unstable-module
home-manager.nixosModules.home-manager
];
};
nixosConfigurations.oracle = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { inherit david-config; };
modules = [
(_args: {
system.configurationRevision =
nixpkgs.lib.mkIf (self ? rev) self.rev;
})
(import ./machines/oracle.nix)
unstable-module
home-manager.nixosModules.home-manager
];
};
deploy.nodes.oracle = {
hostname = "oracle.delta.sh";
user = "root";
sshUser = "root";
autoRollback = false;
profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.oracle;
};
checks = builtins.mapAttrs
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
}