Something went wrong. Try again.
A mirror of my nix flake (includes more than servers).
Something went wrong. Try again.
Nix 94%
3%
Python 2%
Perl <1%
Just <1%
HTML <1%
Shell <1%
README.md
my homelab and dedicated server Nix configurations #

Remote deployments #
temp=$(mktemp -d)
install -d -m755 "$temp/etc/ssh"
ssh-keygen -f "$temp/etc/ssh/ssh_initrd_ed25519_key" -t ed25519 -N ""
chmod 600 "$temp/etc/ssh/ssh_initrd_ed25519_key"
nix develop -c python3 ssh-host-keys/main.py $hostname > "$temp"/etc/ssh/ssh_host_ed25519_key
chmod 600 "$temp/etc/ssh/ssh_host_ed25519_key"
ssh-keygen -yf "$temp"/etc/ssh/ssh_host_ed25519_key > "$temp"/etc/ssh/ssh_host_ed25519_key.pub
nix run github:nix-community/nixos-anywhere -- --extra-files "$temp" --disk-encryption-keys /tmp/disk-1.key /tmp/disk-1.key --flake .#$hostname --target-host root@yourip --generate-hardware-config nixos-facter ./hosts/$hostname/facter.json
rm -r "$temp"
rm /tmp/disk-1.key