diff options
author | lassulus <lass@aidsballs.de> | 2015-12-12 18:24:32 +0100 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2015-12-12 18:24:32 +0100 |
commit | d567f9374529bf3fb2517ff270f8f0c973605722 (patch) | |
tree | 55ab265b8e245f6c16972837c1da6cb2e1707f11 /lass/2configs | |
parent | 43613fa6fca279301fcf0d014c0c9f71f394d9a1 (diff) |
l 2 browsers: use writeScriptBin
Diffstat (limited to 'lass/2configs')
-rw-r--r-- | lass/2configs/browsers.nix | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix index 849778a7a..580db8b2c 100644 --- a/lass/2configs/browsers.nix +++ b/lass/2configs/browsers.nix @@ -1,16 +1,6 @@ { config, lib, pkgs, ... }: let - simpleScript = name: content: - pkgs.stdenv.mkDerivation { - inherit name; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/bin - ln -s ${pkgs.writeScript name content} $out/bin/${name} - ''; - }; - mainUser = config.users.extraUsers.mainUser; createChromiumUser = name: extraGroups: packages: { @@ -26,8 +16,8 @@ let ${mainUser.name} ALL=(${name}) NOPASSWD: ALL ''; environment.systemPackages = [ - (simpleScript name '' - sudo -u ${name} -i chromium $@ + (pkgs.writeScriptBin name '' + /var/setuid-wrappers/sudo -u ${name} -i chromium $@ '') ]; }; @@ -46,8 +36,8 @@ let ${mainUser.name} ALL=(${name}) NOPASSWD: ALL ''; environment.systemPackages = [ - (simpleScript name '' - sudo -u ${name} -i firefox $@ + (pkgs.writeScriptBin name '' + /var/setuid-wrappers/sudo -u ${name} -i firefox $@ '') ]; }; @@ -57,7 +47,7 @@ let in { environment.systemPackages = [ - (simpleScript "browser-select" '' + (pkgs.writeScriptBin "browser-select" '' BROWSER=$(echo -e "ff\ncr\nfb\ngm\nflash" | dmenu) $BROWSER $@ '') |