pkgs/nixfiles: nixfiles-auto-install fix syntax of generated flake snipped
This commit is contained in:
parent
4321b00c52
commit
2150b4bfb0
@ -106,7 +106,7 @@ nixfiles-generate-config --root /mnt --hostname "${hostname}"
|
||||
sed -i "s~# boot\.loader\.grub\.device = \"/dev/sda\";~boot\.loader\.grub\.device = \"${device}\";~g" "/mnt/etc/nixos/hosts/${hostname}/configuration.nix"
|
||||
|
||||
if ! grep -w "${hostname}" <(nix eval "/mnt/etc/nixos#clerie.hosts" --apply 'hosts: builtins.concatStringsSep "\n" (builtins.attrNames hosts)' --raw 2> /dev/null) > /dev/null; then
|
||||
sed -i "s/\(\s*\)# nixfiles-auto-install: add new host above/\1${hostname} = { name = \"${hostname}\"};\n&/g" /mnt/etc/nixos/flake.nix
|
||||
sed -i "s/\(\s*\)# nixfiles-auto-install: add new host above/\1${hostname} = { name = \"${hostname}\"; };\n&/g" /mnt/etc/nixos/flake.nix
|
||||
fi
|
||||
|
||||
echo "[I] Install NixOS"
|
||||
|
Loading…
Reference in New Issue
Block a user