-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.nix
53 lines (50 loc) · 1.69 KB
/
deploy.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
# SPDX-FileCopyrightText: 2023 Connor Feeley
#
# SPDX-License-Identifier: BSD-3-Clause
{ self, collective, deploy, digga }:
let
# mkDeploy takes a hostname and an architecture and returns the deploy configuration for that host.
mkDeploy = hostname: arch: {
inherit hostname;
sshUser = "cfeeley";
remoteBuild = true;
fastConnection = true;
autoRollback = true;
magicRollback = true;
profiles.system = {
user = "cfeeley";
path = deploy.lib.${arch}.activate.nixos
self.nixosConfigurations.${hostname};
};
profiles.cfeeley = {
user = "cfeeley";
path = deploy.lib.${arch}.activate.home-manager
self.homeConfigurations."cfeeley@${hostname}";
};
};
in
{
nodes = digga.lib.mkDeployNodes { } {
workstation = mkDeploy "workstation" "x86_64-linux";
workstation-wsl = mkDeploy "workstation-wsl" "x86_64-linux";
rosy = mkDeploy "rosy" "aarch64-linux";
h8tsner = mkDeploy "h8tsner" "x86_64-linux";
# Deploy to 'cfeeley-laptop':
# - Recommended: deploy .#cfeeley-laptop -- --print-build-logs
# If there are nix eval errors, then we can tell 'deploy' to skip the flake checks:
# - Not recommended: deploy --skip-checks .#cfeeley-laptop -- --print-build-logs
cfeeley-laptop = with (collective.peers.hosts.cfeeley-laptop); {
hostname = ipv4.address;
sshUser = "cfeeley";
fastConnection = true;
autoRollback = true;
magicRollback = true;
profilesOrder = [ "cfeeley" ];
profiles.cfeeley = {
user = "cfeeley";
path = deploy.lib.x86_64-linux.activate.home-manager
self.homeConfigurationsPortable.x86_64-linux."cfeeley@cfeeley-laptop";
};
};
};
}