diff options
author | tv <tv@krebsco.de> | 2015-11-06 21:53:21 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-11-06 21:53:21 +0100 |
commit | bad79f7f1270c01343b3c308f5a2cf390dac014c (patch) | |
tree | b7b0b9667ed5438d8cc520787ef6936dee6483c4 /tv/2configs/z.nix | |
parent | a0c068d6ec5d1cc6b1c58fe9af379b638a346220 (diff) |
tv: init user z
Diffstat (limited to 'tv/2configs/z.nix')
-rw-r--r-- | tv/2configs/z.nix | 40 |
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; + }; +} |