diff options
| author | David Morgan <djm_uk@protonmail.com> | 2025-08-02 21:04:43 +0100 |
|---|---|---|
| committer | David Morgan <djm_uk@protonmail.com> | 2025-08-02 21:05:31 +0100 |
| commit | 297ddae30ebe875f027f2e7b0ddfb56b858d876f (patch) | |
| tree | d4a717e8d0ac4d7a03243d648485d5fb0dff31ed /nix-conf/machines | |
| parent | be1fe44af900bb19e6d5b0b8e104e44535fb0b31 (diff) | |
| download | dotfiles-297ddae30ebe875f027f2e7b0ddfb56b858d876f.tar.gz | |
Move some network config to private.nix
Move networking.interfaces.ens3.ipv6.addresses
Diffstat (limited to 'nix-conf/machines')
| -rw-r--r-- | nix-conf/machines/edrahil/network-configuration.nix | 23 | ||||
| -rw-r--r-- | nix-conf/machines/edrahil/private.nix | bin | 0 -> 173 bytes |
2 files changed, 8 insertions, 15 deletions
diff --git a/nix-conf/machines/edrahil/network-configuration.nix b/nix-conf/machines/edrahil/network-configuration.nix index 4b85912..16df081 100644 --- a/nix-conf/machines/edrahil/network-configuration.nix +++ b/nix-conf/machines/edrahil/network-configuration.nix @@ -1,19 +1,12 @@ { ... }: { - networking = { - interfaces.ens3.ipv6.addresses = [ - { - # Emulate nix-sops. Technically an anti-pattern, but IP addresses aren't real secrets, and this has to be embedded here, - # as we cannot set a file path to read it from. - # Populate/update with: - # 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 - address = builtins.readFile "/root/.config/secrets/ipv6_address"; - prefixLength = 64; - } - ]; - defaultGateway6 = { - address = "fe80::1"; - interface = "ens3"; - }; + imports = [ + ./private.nix + ]; + + # networking.interfaces.ens3.ipv6.addresses configured in private.nix + networking.defaultGateway6 = { + address = "fe80::1"; + interface = "ens3"; }; } diff --git a/nix-conf/machines/edrahil/private.nix b/nix-conf/machines/edrahil/private.nix Binary files differnew file mode 100644 index 0000000..c5941c6 --- /dev/null +++ b/nix-conf/machines/edrahil/private.nix |