l blue-host: dry-build blue first
This commit is contained in:
parent
304059b1da
commit
a1c261d61b
@ -99,14 +99,15 @@ in {
|
|||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writeDashBin "start-blue" ''
|
(pkgs.writeDashBin "start-blue" ''
|
||||||
set -ef
|
set -ef
|
||||||
if ping -c1 blue.r >/dev/null; then
|
|
||||||
echo 'blue is already running. bailing out'
|
|
||||||
exit 23
|
|
||||||
fi
|
|
||||||
if ! $(mount | ${pkgs.gnugrep}/bin/grep -qi '^encfs on /var/lib/containers/blue'); then
|
if ! $(mount | ${pkgs.gnugrep}/bin/grep -qi '^encfs on /var/lib/containers/blue'); then
|
||||||
${pkgs.encfs}/bin/encfs --public /var/lib/containers/.blue /var/lib/containers/blue
|
${pkgs.encfs}/bin/encfs --public /var/lib/containers/.blue /var/lib/containers/blue
|
||||||
fi
|
fi
|
||||||
nixos-container start blue
|
nixos-container start blue
|
||||||
|
nixos-container run blue -- nixos-rebuild -I /var/src dry-build
|
||||||
|
if ping -c1 blue.r >/dev/null; then
|
||||||
|
echo 'blue is already running. bailing out'
|
||||||
|
exit 23
|
||||||
|
fi
|
||||||
nixos-container run blue -- nixos-rebuild -I /var/src switch
|
nixos-container run blue -- nixos-rebuild -I /var/src switch
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user