Added environment variables in nodes to make deploy_nix.sh target the correct node file, changed deploy_nix.sh accordingly
This commit is contained in:
parent
59a46d1968
commit
8799736e7f
4 changed files with 30 additions and 5 deletions
|
|
@ -1,11 +1,11 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
if [ -z "${NODE:-}" ]
|
||||
then
|
||||
echo "Erreur : Précisez le noeud à installer"
|
||||
echo "Erreur : Si c'est la première fois que vous déployez le serveur, merci de faire: export NODE='riri', 'fifi' ou 'loulou' en fonction de votre serveur"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp ./configuration.nix /etc/nixos/configuration.nix
|
||||
cp ./cluster/nodes/$1.nix /etc/nixos/node.nix
|
||||
cp ./cluster/nodes/$NODE.nix /etc/nixos/node.nix
|
||||
nixos-rebuild switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue