Archived
Compare commits
2
Commits
dd2d3b5914
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cae8a2fcd | ||
|
|
8d6ad63094 |
+28
-1
@@ -5,6 +5,24 @@
|
|||||||
|
|
||||||
time.timeZone = "Australia/Brisbane";
|
time.timeZone = "Australia/Brisbane";
|
||||||
|
|
||||||
|
# Without this, the installer only ever sees cache.nixos.org, which
|
||||||
|
# doesn't carry sops-install-secrets (it's built straight from the
|
||||||
|
# sops-nix flake's own Go source, not part of nixpkgs) — every install
|
||||||
|
# would otherwise compile it from scratch, which is what ran an 8GB LXC
|
||||||
|
# container's disk out of space. Push a built copy to nix-cache once
|
||||||
|
# (from a machine with real disk headroom) and every future install,
|
||||||
|
# of any type, fetches instead of rebuilding.
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [
|
||||||
|
"http://nix-cache"
|
||||||
|
"https://cache.nixos.org/"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.local-1:usoWYanY3Kpq2+kDIS2nhWoLZiRxanmdysdzqCFBHW4="
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
curl
|
curl
|
||||||
@@ -120,7 +138,16 @@ if nix eval --refresh --json --extra-experimental-features "flakes nix-command"
|
|||||||
disko --mode destroy,format,mount \
|
disko --mode destroy,format,mount \
|
||||||
--flake "''${FLAKE_BASE_URL}#''${choice}" --yes
|
--flake "''${FLAKE_BASE_URL}#''${choice}" --yes
|
||||||
else
|
else
|
||||||
echo "Selected host has no Disko configuration."
|
# No raw disk to partition — true for every LXC container, which has
|
||||||
|
# no block device visible from inside it, only its already-mounted
|
||||||
|
# root filesystem. nixos-install defaults to installing into /mnt; if
|
||||||
|
# nothing points /mnt at the real root, the new system gets built and
|
||||||
|
# written to a disconnected empty directory, never actually becomes
|
||||||
|
# bootable, and the container silently keeps running this installer
|
||||||
|
# environment forever. Bind-mount / onto /mnt so the install actually
|
||||||
|
# lands on the filesystem this container boots from.
|
||||||
|
echo "Selected host has no Disko configuration — installing in place via bind mount."
|
||||||
|
mount --bind / /mnt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sops-nix derives this host's decryption key from its own SSH host key
|
# sops-nix derives this host's decryption key from its own SSH host key
|
||||||
|
|||||||
Reference in new issue
Block a user