From 6af3d13bec9b13e8fa8e19594ffbcbe085387bdd Mon Sep 17 00:00:00 2001 From: Sean Heath <6528011+seandheath@users.noreply.github.com> Date: Sat, 4 Dec 2021 20:07:42 -0500 Subject: [PATCH] nixos/ddclient: fix permission for ddclient.conf (#148179) --- nixos/modules/services/networking/ddclient.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix index 8a2c0fc7080c..021b28d5c34f 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 --mode=0400 ${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