aboutsummaryrefslogtreecommitdiff
path: root/modules/deploy.nix
blob: 14e3315876579374a3972f4c320fdf26e72ff7b4 (plain)
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
{
  inputs,
  self,
  withSystem,
  config,
  ...
}: {
  perSystem = {
    pkgs,
    self',
    system,
    ...
  }: let
    deployPkgs = import inputs.nixpkgs {
      inherit system;
      overlays = [
        inputs.deploy-rs.overlays.default
        (self: super: {
          deploy-rs = {
            inherit (pkgs) deploy-rs;
            lib = super.deploy-rs.lib;
          };
        })
      ];
    };
  in {
    _module.args = {
      inherit deployPkgs;
    };
  };
  flake.deploy.nodes = {
    ltrr-block = {
      hostname = "ltrr-block";
      profiles.system = {
        user = "root";
        path = withSystem "x86_64-linux" ({deployPkgs, ...}: deployPkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.ltrr-block);
      };
      sshUser = "root";
    };
    ltrr-cloud = {
      hostname = "kcu.su";
      profiles.system = {
        user = "root";
        path = withSystem "x86_64-linux" ({deployPkgs, ...}: deployPkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.ltrr-cloud);
      };
      sshUser = "root";
    };
  };
}