]> git.scottworley.com Git - auto-upgrade-with-pinch/blobdiff - modules/auto-upgrade.nix
pinch: 1.1 -> 1.2
[auto-upgrade-with-pinch] / modules / auto-upgrade.nix
index 9ff5ee2e9da2b062ac21e500c02ea468a9ad278a..8bf21aaaf988c5d3b0b5d6648ca403785276d05f 100644 (file)
@@ -18,7 +18,7 @@ let
         as_user() {
           ${
             if cfg.userEnvironment.enable then ''
         as_user() {
           ${
             if cfg.userEnvironment.enable then ''
-              sudo -u ${escapeShellArg cfg.userEnvironment.user} "$@"
+              /run/wrappers/bin/sudo -u ${escapeShellArg cfg.userEnvironment.user} "$@"
             '' else ''
               :
             ''
             '' else ''
               :
             ''
@@ -137,7 +137,7 @@ in {
       (import ../overlays/pinch.nix)
       (self: super: {
         auto-upgrade = super.writeShellScriptBin "auto-upgrade" ''
       (import ../overlays/pinch.nix)
       (self: super: {
         auto-upgrade = super.writeShellScriptBin "auto-upgrade" ''
-          sudo ${auto-upgrade-script}
+          /run/wrappers/bin/sudo ${auto-upgrade-script}
         '';
       })
     ];
         '';
       })
     ];