diff options
author | Alex Auvolat <alex@adnab.me> | 2023-03-24 12:01:38 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-03-24 12:01:38 +0100 |
commit | 53b9cfd8385a4cf60176df02eea7a3804b3891fb (patch) | |
tree | 0b797276cd000ed72320e625252ebf71d33674dd /deploy_nixos | |
parent | 5cd69a9ba1c2f87d9a1e294f06b74945e745e475 (diff) | |
download | nixcfg-53b9cfd8385a4cf60176df02eea7a3804b3891fb.tar.gz nixcfg-53b9cfd8385a4cf60176df02eea7a3804b3891fb.zip |
wgautomesh actually on prod
Diffstat (limited to 'deploy_nixos')
-rwxr-xr-x | deploy_nixos | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/deploy_nixos b/deploy_nixos index 48ef9ea..b716993 100755 --- a/deploy_nixos +++ b/deploy_nixos @@ -7,17 +7,20 @@ 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 - - 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 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" |