Merge pull request #293 from naturallaw777/copilot/make-custom-nix-readable-writable
Make custom.nix writable on new installs
This commit is contained in:
@@ -948,6 +948,7 @@ class InstallerWindow(Adw.ApplicationWindow):
|
|||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
raise RuntimeError(f"Failed to write role-state.nix: {proc.stderr}")
|
raise RuntimeError(f"Failed to write role-state.nix: {proc.stderr}")
|
||||||
run(["sudo", "cp", "/mnt/etc/nixos/custom.template.nix", "/mnt/etc/nixos/custom.nix"])
|
run(["sudo", "cp", "/mnt/etc/nixos/custom.template.nix", "/mnt/etc/nixos/custom.nix"])
|
||||||
|
run(["sudo", "chmod", "644", "/mnt/etc/nixos/custom.nix"])
|
||||||
|
|
||||||
# ── Step 4: Ready to install ──────────────────────────────────────────
|
# ── Step 4: Ready to install ──────────────────────────────────────────
|
||||||
|
|
||||||
|
|||||||
@@ -245,6 +245,7 @@ if [[ -n "$DEPLOY_KEY" || -n "$HEADSCALE_SERVER" ]]; then
|
|||||||
} > /mnt/etc/nixos/custom.nix
|
} > /mnt/etc/nixos/custom.nix
|
||||||
else
|
else
|
||||||
cp /mnt/etc/nixos/custom.template.nix /mnt/etc/nixos/custom.nix
|
cp /mnt/etc/nixos/custom.template.nix /mnt/etc/nixos/custom.nix
|
||||||
|
chmod 644 /mnt/etc/nixos/custom.nix
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Write Headscale auth key if provided ─────────────────────────────────────
|
# ── Write Headscale auth key if provided ─────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user