From a5d0a9f8d52b70bbf3902f757426717f7aba9bbb Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 19 Dec 2023 02:40:44 -0600 Subject: [PATCH] refactor: remove `/g` from sed expressions for templating secrets --- modules/squad-server.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/squad-server.nix b/modules/squad-server.nix index f443ae2..6081b25 100644 --- a/modules/squad-server.nix +++ b/modules/squad-server.nix @@ -990,13 +990,13 @@ in ${lib.optionalString (cfg.config.server.passwordFile != null) '' ## Handle secrets for the `Server.cfg` file ## # Safely load the server password outside of the nix store - sed -i -e 's/^ServerPassword=.*$/ServerPassword='"$(${pkgs.systemd}/bin/systemd-creds cat SQUAD_SERVER_PASSWORD_FILE)"'/g' ./Server.cfg + sed -i 's/^ServerPassword=.*$/ServerPassword='"$(${pkgs.systemd}/bin/systemd-creds cat SQUAD_SERVER_PASSWORD_FILE)"'/' ./Server.cfg ''} ${lib.optionalString (cfg.config.rcon.passwordFile != null) '' ## Handle secrets for the `Rcon.cfg` file ## # Safely load the rcon password outside of the nix store - sed -i -e 's/^Password=.*$/Password='"$(${pkgs.systemd}/bin/systemd-creds cat SQUAD_RCON_PASSWORD_FILE)"'/g' ./Rcon.cfg + sed -i 's/^Password=.*$/Password='"$(${pkgs.systemd}/bin/systemd-creds cat SQUAD_RCON_PASSWORD_FILE)"'/' ./Rcon.cfg ''} ${lib.optionalString (cfg.config.license.file != null) ''