aboutsummaryrefslogtreecommitdiff
path: root/deploy_nixos
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-03-24 11:05:29 +0000
committerAlex <alex@adnab.me>2023-03-24 11:05:29 +0000
commit76c8e8f0b0a703c7b067d3315a93d0512fbf2e76 (patch)
tree0b797276cd000ed72320e625252ebf71d33674dd /deploy_nixos
parent8e29ee3b0b2f1855a26bc45e5dc502f8aad8e266 (diff)
parent53b9cfd8385a4cf60176df02eea7a3804b3891fb (diff)
downloadnixcfg-76c8e8f0b0a703c7b067d3315a93d0512fbf2e76.tar.gz
nixcfg-76c8e8f0b0a703c7b067d3315a93d0512fbf2e76.zip
Merge pull request 'Passer wgautomesh en prod' (#9) from wgautomesh into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/nixcfg/pulls/9
Diffstat (limited to 'deploy_nixos')
-rwxr-xr-xdeploy_nixos7
1 files changed, 7 insertions, 0 deletions
diff --git a/deploy_nixos b/deploy_nixos
index 2b4235a..b716993 100755
--- a/deploy_nixos
+++ b/deploy_nixos
@@ -7,6 +7,10 @@ copy cluster/$CLUSTER/cluster.nix /etc/nixos/cluster.nix
copy cluster/$CLUSTER/node/$NIXHOST.nix /etc/nixos/node.nix
copy cluster/$CLUSTER/node/$NIXHOST.site.nix /etc/nixos/site.nix
+cmd mkdir -p /var/lib/wgautomesh
+write_pass deuxfleurs/cluster/$CLUSTER/wgautomesh_gossip_secret /var/lib/wgautomesh/gossip_secret
+copy nix/wgautomesh.nix /etc/nixos/wgautomesh.nix
+
if [ "$CLUSTER" = "staging" ]; then
copy nix/nomad-driver-nix2.nix /etc/nixos/nomad-driver-nix2.nix
fi
@@ -14,6 +18,9 @@ fi
if [ "$CLUSTER" = "prod" ]; then
cmd nixos-rebuild boot
message "-------------------------------------------------------------------------------------"
+ message "NIXOS CHANGES THAT WOULD BE APPLIED UPON SWITCH OR REBOOT:"
+ cmd nixos-rebuild dry-activate
+ message "-------------------------------------------------------------------------------------"
message "New NixOS configuration hasn't been applied, to avoid disturbing production services."
message "Please apply the following procedure to node '$NIXHOST':"
message "1. Drain node in Nomad so that all jobs are relocated elsewhere"