]> git.scottworley.com Git - auto-upgrade-with-pinch/commitdiff
Absolute path to sudo
authorScott Worley <scottworley@scottworley.com>
Mon, 18 May 2020 19:02:16 +0000 (12:02 -0700)
committerScott Worley <scottworley@scottworley.com>
Mon, 18 May 2020 19:02:16 +0000 (12:02 -0700)
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}
         '';
       })
     ];
         '';
       })
     ];