Skip to content

Instantly share code, notes, and snippets.

@Mic92
Created December 30, 2016 01:47
Show Gist options
  • Save Mic92/b6562e64f59f5049995ce883896fb11f to your computer and use it in GitHub Desktop.
Save Mic92/b6562e64f59f5049995ce883896fb11f to your computer and use it in GitHub Desktop.
# /etc/nixos/configuration.nix
boot = {
initrd.network = {
enable = true;
ssh = {
enable = true;
port = 2222;
hostECDSAKey = /etc/nixos/secrets/initrd-ssh-key;
};
postCommands = ''
echo "cryptsetup luksOpen --tries 99 /dev/sda2 root && killall cryptsetup" >> /root/.profile
ip addr add ${network.ipv6} dev eth0
ip route add default via fe80::1 dev eth0
'';
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment