aboutsummaryrefslogtreecommitdiff
path: root/modules/deploy.nix
blob: 20188a310ae8e4b5650d728b8652e9078e4dbf1b (plain) (blame)
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
{ inputs, config, ... }:
let
	system = "x86_64-linux";
	pkgs = import inputs.nixpkgs { inherit system; };
	deployPkgs = import inputs.nixpkgs {
		inherit system;
		overlays = [
			inputs.deploy-rs.overlays.default # or deploy-rs.overlays.default
			(self: super: {
				deploy-rs = {
					inherit (pkgs) deploy-rs;
					lib = super.deploy-rs.lib;
				};
			})
		];
	};
	deployCfg = config.flake.deploy;
in
{
	flake.deploy.nodes.nixnode = {
		hostname = "tehbox.org";
		profiles.system = {
			user = "root";
			sshUser = "boss";
			interactiveSudo = true;
			path = deployPkgs.deploy-rs.lib.activate.nixos config.flake.nixosConfigurations.nixnode;
		};
	};

	perSystem =
		{ system, ... }:
		{
			checks = inputs.deploy-rs.lib.${system}.deployChecks deployCfg;
		};
}