network-configuration.nix 700 B

1234567891011121314151617181920
  1. { ... }:
  2. {
  3. networking = {
  4. interfaces.ens3.ipv6.addresses = [
  5. {
  6. # Emulate nix-sops. Technically an anti-pattern, but IP addresses aren't real secrets, and this has to be embedded here,
  7. # as we cannot set a file path to read it from.
  8. # Populate/update with:
  9. # SOPS_AGE_KEY=$(doas ssh-to-age -private-key -i /etc/ssh/ssh_host_ed25519_key) sops -d --extract '["ipv6_address"]' machines/edrahil/secrets.yaml | doas tee /root/.config/secrets/ipv6_address
  10. address = builtins.readFile "/root/.config/secrets/ipv6_address";
  11. prefixLength = 64;
  12. }
  13. ];
  14. defaultGateway6 = {
  15. address = "fe80::1";
  16. interface = "ens3";
  17. };
  18. };
  19. }