summaryrefslogtreecommitdiffstats
path: root/tv/2configs/z.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-11-07 09:48:06 +0100
committertv <tv@shackspace.de>2015-11-07 09:48:06 +0100
commit8ad05d0f40debdb2dc41aef2db24f77f539f4328 (patch)
tree50c71257fa56bd1d4a67c3ef23cc10620fd387ff /tv/2configs/z.nix
parentd590cf26cd8fa33ed4140bef7a5d689c76455625 (diff)
parentbae469d2a64165a42d93cdb31e231fa75e9813a5 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'tv/2configs/z.nix')
-rw-r--r--tv/2configs/z.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/tv/2configs/z.nix b/tv/2configs/z.nix
new file mode 100644
index 000000000..e5494ecc9
--- /dev/null
+++ b/tv/2configs/z.nix
@@ -0,0 +1,40 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+ krebs.per-user.z.packages = [
+ (pkgs.writeScriptBin "cr" ''
+ #! /bin/sh
+ set -efu
+ export LC_TIME=de_DE.utf8
+ exec ${pkgs.chromium}/bin/chromium \
+ --ssl-version-min=tls1 \
+ --disk-cache-dir=/tmp/chromium-disk-cache_"$LOGNAME" \
+ --disk-cache-size=50000000 \
+ "%@"
+ '')
+ ];
+
+ programs.bash.interactiveShellInit = ''
+ case ''${XMONAD_SPAWN_WORKSPACE-} in
+ za|zh|zj|zs)
+ exec sudo -u z -i
+ ;;
+ esac
+ '';
+
+ security.sudo.extraConfig = "tv ALL=(z) NOPASSWD: ALL";
+
+ users.users.z = {
+ extraGroups = [
+ "audio"
+ "vboxusers"
+ "video"
+ ];
+ group = "subusers";
+ home = "/home/z";
+ uid = 3043726074; # genid z
+ useDefaultShell = true;
+ };
+}