summaryrefslogtreecommitdiffstats
path: root/lass/2configs/browsers.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-12-14 17:04:32 +0100
committermakefu <github@syntax-fehler.de>2015-12-14 17:04:32 +0100
commit8114470587b5c0018cdfcb6b0c0da93bfece5a05 (patch)
tree343ca79a42402fca2b66af3579aa8d11e891cd7f /lass/2configs/browsers.nix
parent781573b9dd393aa4d2d7e34a1fa8d831441b545b (diff)
parent6f150af8acf2195188518bf53d0330da7a4bb8f8 (diff)
Merge branch 'master' of gum:stockholm
Diffstat (limited to 'lass/2configs/browsers.nix')
-rw-r--r--lass/2configs/browsers.nix22
1 files changed, 6 insertions, 16 deletions
diff --git a/lass/2configs/browsers.nix b/lass/2configs/browsers.nix
index 849778a7a..d36801863 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 $@
'')
@@ -70,7 +60,7 @@ in {
( createChromiumUser "cr" [ "audio" ] [ pkgs.chromium ] )
( createChromiumUser "fb" [ ] [ pkgs.chromium ] )
( createChromiumUser "gm" [ ] [ pkgs.chromium ] )
- # ( createChromiumUser "flash" [ ] [ pkgs.flash ] )
+ ( createChromiumUser "flash" [ ] [ pkgs.flash ] )
];
nixpkgs.config.packageOverrides = pkgs : {