browser configure sudo
This commit is contained in:
parent
ad79c38764
commit
9e2fd423bd
1 changed files with 9 additions and 3 deletions
|
@ -203,9 +203,15 @@ in {
|
||||||
# add sudo rights
|
# add sudo rights
|
||||||
security.sudo.extraConfig = let
|
security.sudo.extraConfig = let
|
||||||
extraRules = flip mapAttrsToList cfg.configList (name: values:
|
extraRules = flip mapAttrsToList cfg.configList (name: values:
|
||||||
concatStringsSep "\n"
|
concatStringsSep "" (map (sudoUser: ''
|
||||||
(map (sudoUser: "${sudoUser} ALL=(${values.user}) NOPASSWD: ALL")
|
# sudo configuration to control browser
|
||||||
values.sudoUsers));
|
${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;
|
in lib.concatStringsSep "\n" extraRules;
|
||||||
|
|
||||||
# create users
|
# create users
|
||||||
|
|
Loading…
Reference in a new issue