summary refs log tree commit diff
path: root/nixos/modules/services/networking/ddclient.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2022-01-09 08:33:56 +0100
committerJörg Thalheim <joerg@thalheim.io>2022-01-09 11:30:40 +0100
commit2febc7dd79653114eae54e27c9be215fe53b7ce5 (patch)
tree755306b1501bc22c4e1b98e028f1be39e566d29c /nixos/modules/services/networking/ddclient.nix
parentd856f24d3ce42d092c69a98a256517b6ceaeb5a1 (diff)
downloadnixpkgs-2febc7dd79653114eae54e27c9be215fe53b7ce5.tar
nixpkgs-2febc7dd79653114eae54e27c9be215fe53b7ce5.tar.gz
nixpkgs-2febc7dd79653114eae54e27c9be215fe53b7ce5.tar.bz2
nixpkgs-2febc7dd79653114eae54e27c9be215fe53b7ce5.tar.lz
nixpkgs-2febc7dd79653114eae54e27c9be215fe53b7ce5.tar.xz
nixpkgs-2febc7dd79653114eae54e27c9be215fe53b7ce5.tar.zst
nixpkgs-2febc7dd79653114eae54e27c9be215fe53b7ce5.zip
nixos/ddclient: don't store config world-readable
Diffstat (limited to 'nixos/modules/services/networking/ddclient.nix')
-rw-r--r--nixos/modules/services/networking/ddclient.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix
index 8a2c0fc7080..f5335406854 100644
--- a/nixos/modules/services/networking/ddclient.nix
+++ b/nixos/modules/services/networking/ddclient.nix
@@ -29,7 +29,7 @@ let
   configFile = if (cfg.configFile != null) then cfg.configFile else configFile';
 
   preStart = ''
-    install ${configFile} /run/${RuntimeDirectory}/ddclient.conf
+    install --owner ddclient -m600 ${configFile} /run/${RuntimeDirectory}/ddclient.conf
     ${lib.optionalString (cfg.configFile == null) (if (cfg.passwordFile != null) then ''
       password=$(printf "%q" "$(head -n 1 "${cfg.passwordFile}")")
       sed -i "s|^password=$|password=$password|" /run/${RuntimeDirectory}/ddclient.conf