diff --git a/modules/programs/browser.nix b/modules/programs/browser.nix index 181226c..910d7a5 100644 --- a/modules/programs/browser.nix +++ b/modules/programs/browser.nix @@ -203,9 +203,15 @@ in { # add sudo rights security.sudo.extraConfig = let extraRules = flip mapAttrsToList cfg.configList (name: values: - concatStringsSep "\n" - (map (sudoUser: "${sudoUser} ALL=(${values.user}) NOPASSWD: ALL") - values.sudoUsers)); + concatStringsSep "" (map (sudoUser: '' + # sudo configuration to control browser + ${sudoUser} ALL=(${values.user}) NOPASSWD: ALL + ${sudoUser} ALL=(root) NOPASSWD: /run/current-system/sw/bin/mkdir -p ${values.home} + ${sudoUser} ALL=(root) NOPASSWD: /run/current-system/sw/bin/chown -R ${values.user}\:users ${values.home} + ${sudoUser} ALL=(root) NOPASSWD: /run/current-system/sw/bin/killall -9 -u ${name} + ${sudoUser} ALL=(root) NOPASSWD: /run/current-system/sw/bin/rm -rf ${values.home} + ${sudoUser} ALL=(root) NOPASSWD: /run/current-system/sw/bin/rm ${values.home}-lock + '') values.sudoUsers)); in lib.concatStringsSep "\n" extraRules; # create users