about summary refs log tree commit diff stats
path: root/nix-conf
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2024-08-30 12:19:22 +0100
committerDavid Morgan <djm_uk@protonmail.com>2024-08-30 12:19:22 +0100
commitf5d98f9ea7acb863f527526cb837b5c66a345b63 (patch)
tree034308253d1fdcc5f2e3627f097c8dca06382cfe /nix-conf
parent97d6fc0c1e0b371f75f8621cde388811c3309159 (diff)
downloaddotfiles-f5d98f9ea7acb863f527526cb837b5c66a345b63.tar.gz
Use tee for redirection instead of su -c
Diffstat (limited to 'nix-conf')
-rw-r--r--nix-conf/machines/edrahil/network-configuration.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix-conf/machines/edrahil/network-configuration.nix b/nix-conf/machines/edrahil/network-configuration.nix
index 7a1b0b0..5a7bc28 100644
--- a/nix-conf/machines/edrahil/network-configuration.nix
+++ b/nix-conf/machines/edrahil/network-configuration.nix
@@ -5,7 +5,7 @@
       # 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:
-      # doas su -c "SOPS_AGE_KEY=$(doas ssh-to-age -private-key -i /etc/ssh/ssh_host_ed25519_key) `which sops` -d --extract '[\"ipv6_address\"]' secrets/edrahil.yaml > /root/.config/secrets/ipv6_address"
+      # SOPS_AGE_KEY=$(doas ssh-to-age -private-key -i /etc/ssh/ssh_host_ed25519_key) sops -d --extract '["ipv6_address"]' secrets/edrahil.yaml | doas tee /root/.config/secrets/ipv6_address
       address = builtins.readFile "/root/.config/secrets/ipv6_address";
       prefixLength = 64;
     }];