From 2150b4bfb083af339910f9a8bc30bb1a80a56ae8 Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 22 Oct 2023 23:01:02 +0200 Subject: [PATCH] pkgs/nixfiles: nixfiles-auto-install fix syntax of generated flake snipped --- pkgs/nixfiles/nixfiles-auto-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/nixfiles/nixfiles-auto-install.sh b/pkgs/nixfiles/nixfiles-auto-install.sh index 3d6ad50..5f6db7e 100644 --- a/pkgs/nixfiles/nixfiles-auto-install.sh +++ b/pkgs/nixfiles/nixfiles-auto-install.sh @@ -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"