From 1ddbdddc696316986b07376a7fc5e33aaf228e89 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 5 Nov 2015 00:31:14 +0100 Subject: tv vim: set et ts=2 sts=2 sw=2 --- tv/2configs/vim.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 8c6c9fb45..14f086e5c 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -50,6 +50,8 @@ let set wildmenu set wildmode=longest,full + set et ts=2 sts=2 sw=2 + filetype plugin indent on set t_Co=256 -- cgit v1.2.3 From 5ec7cd4ad5ce3f40ca13b5b92d258b84409cd43b Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 10:47:18 +0100 Subject: tv vim: isk, INTs, and comments --- tv/2configs/vim.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 14f086e5c..295c78aff 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -66,9 +66,10 @@ let au BufRead,BufNewFile *.nix so ${pkgs.writeText "nix.vim" '' setf nix + set isk=@,48-57,_,192-255,-,' " Ref - syn match INT /[0-9]\+/ + syn match INT /\<[0-9]\+\>/ syn match PATH /[a-zA-Z0-9\.\_\-\+]*\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ syn match HPATH /\~\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ syn match SPATH /<[a-zA-Z0-9\.\_\-\+]\+\(\/[a-zA-Z0-9\.\_\-\+]\+\)*>/ @@ -80,7 +81,7 @@ let hi link URI Constant syn match String /"\([^"]\|\\\"\)*"/ - syn match Comment /\s#.*/ + syn match Comment /\(^\|\s\)#.*/ ''} au BufRead,BufNewFile /dev/shm/* set nobackup nowritebackup noswapfile -- cgit v1.2.3 From a2a3838e41db2260e84e377c158482309b9d0123 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 12:04:34 +0100 Subject: tv vim: match strings harder! --- tv/2configs/vim.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 295c78aff..04b1480c1 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -80,7 +80,7 @@ let hi link SPATH Constant hi link URI Constant - syn match String /"\([^"]\|\\\"\)*"/ + syn match String /"\([^\\"]\|\\.\)*"/ syn match Comment /\(^\|\s\)#.*/ ''} -- cgit v1.2.3 From 4f12837d0934ef1cc376669b2d00d6a821f662e2 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 19:35:05 +0100 Subject: tv base: RIP old vim --- tv/2configs/base.nix | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tv/2configs') diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix index 41159690d..a74ce3297 100644 --- a/tv/2configs/base.nix +++ b/tv/2configs/base.nix @@ -68,22 +68,6 @@ with lib; nix.useChroot = true; } - { - # oldvim - environment.systemPackages = with pkgs; [ - vim - ]; - - environment.etc."vim/vimrc".text = '' - set nocp - ''; - - environment.etc."vim/vim${majmin pkgs.vim.version}".source = - "${pkgs.vim}/share/vim/vim${majmin pkgs.vim.version}"; - - environment.variables.EDITOR = mkForce "vim"; - environment.variables.VIM = "/etc/vim"; - } { environment.systemPackages = with pkgs; [ rxvt_unicode.terminfo -- cgit v1.2.3 From bad79f7f1270c01343b3c308f5a2cf390dac014c Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 21:53:21 +0100 Subject: tv: init user z --- tv/2configs/base.nix | 3 +++ tv/2configs/xserver/default.nix | 8 -------- tv/2configs/z.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 tv/2configs/z.nix (limited to 'tv/2configs') diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix index a74ce3297..4beece5ef 100644 --- a/tv/2configs/base.nix +++ b/tv/2configs/base.nix @@ -22,6 +22,9 @@ with lib; mapAttrs (_: h: { hashedPassword = h; }) (import ); } + { + users.groups.subusers.gid = 1093178926; # genid subusers + } { users.defaultUserShell = "/run/current-system/sw/bin/bash"; users.mutableUsers = false; diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 4d2fe9e45..df00203be 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -70,14 +70,6 @@ let ExecStart = "${xserver}/bin/xserver"; }; }; - - programs.bash.interactiveShellInit = '' - case ''${XMONAD_SPAWN_WORKSPACE-} in - za|zh|zj|zs) - exec sudo -u zalora -i - ;; - esac - ''; }; xmonad-environment = { 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; + }; +} -- cgit v1.2.3 From 3c75c59794d6b67c34d9a8857ca3fb64c649507c Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 21:54:53 +0100 Subject: tv: set environment.profileRelativeEnvVars.PATH --- tv/2configs/base.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix index 4beece5ef..38cc1eefe 100644 --- a/tv/2configs/base.nix +++ b/tv/2configs/base.nix @@ -72,6 +72,8 @@ with lib; nix.useChroot = true; } { + environment.profileRelativeEnvVars.PATH = mkForce [ "/bin" ]; + environment.systemPackages = with pkgs; [ rxvt_unicode.terminfo ]; -- cgit v1.2.3 From 28fad6e2fc3aa45a9d1b5fad8810bbc7c78a5dc6 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 21:55:08 +0100 Subject: tv base: drop redundant with builtins --- tv/2configs/base.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'tv/2configs') diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix index 38cc1eefe..b74b721cb 100644 --- a/tv/2configs/base.nix +++ b/tv/2configs/base.nix @@ -1,6 +1,5 @@ { config, lib, pkgs, ... }: -with builtins; with lib; { -- cgit v1.2.3 From 0bf6e55f77cffb4ca65c6926eea7bc77140574a5 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 21:55:38 +0100 Subject: tv base: tv@xu can root --- tv/2configs/base.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv/2configs') diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix index b74b721cb..d3f4eed0d 100644 --- a/tv/2configs/base.nix +++ b/tv/2configs/base.nix @@ -33,6 +33,7 @@ with lib; root = { openssh.authorizedKeys.keys = [ config.krebs.users.tv.pubkey + config.krebs.users.tv_xu.pubkey ]; }; tv = { -- cgit v1.2.3 From f559b19bec61730c537cdd76233304e66c3f497a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 22:05:36 +0100 Subject: stockholm: import default user config --- tv/2configs/base.nix | 168 ------------------------------------------------ tv/2configs/default.nix | 168 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 168 deletions(-) delete mode 100644 tv/2configs/base.nix create mode 100644 tv/2configs/default.nix (limited to 'tv/2configs') diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix deleted file mode 100644 index d3f4eed0d..000000000 --- a/tv/2configs/base.nix +++ /dev/null @@ -1,168 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - krebs.enable = true; - - networking.hostName = config.krebs.build.host.name; - - imports = [ - ./vim.nix - { - # stockholm dependencies - environment.systemPackages = with pkgs; [ - git - ]; - } - { - # TODO never put hashedPassword into the store - users.extraUsers = - mapAttrs (_: h: { hashedPassword = h; }) - (import ); - } - { - users.groups.subusers.gid = 1093178926; # genid subusers - } - { - users.defaultUserShell = "/run/current-system/sw/bin/bash"; - users.mutableUsers = false; - } - { - users.extraUsers = { - root = { - openssh.authorizedKeys.keys = [ - config.krebs.users.tv.pubkey - config.krebs.users.tv_xu.pubkey - ]; - }; - tv = { - uid = 1337; - group = "users"; - home = "/home/tv"; - createHome = true; - useDefaultShell = true; - extraGroups = [ - "audio" - "video" - "wheel" - ]; - openssh.authorizedKeys.keys = [ - config.krebs.users.tv.pubkey - ]; - }; - }; - } - { - security.sudo.extraConfig = '' - Defaults mailto="${config.krebs.users.tv.mail}" - ''; - time.timeZone = "Europe/Berlin"; - } - { - # TODO check if both are required: - nix.chrootDirs = [ "/etc/protocols" pkgs.iana_etc.outPath ]; - - nix.trustedBinaryCaches = [ - "https://cache.nixos.org" - "http://cache.nixos.org" - "http://hydra.nixos.org" - ]; - - nix.useChroot = true; - } - { - environment.profileRelativeEnvVars.PATH = mkForce [ "/bin" ]; - - environment.systemPackages = with pkgs; [ - rxvt_unicode.terminfo - ]; - - environment.shellAliases = mkForce { - # alias cal='cal -m3' - gp = "${pkgs.pari}/bin/gp -q"; - df = "df -h"; - du = "du -h"; - # alias grep='grep --color=auto' - - # TODO alias cannot contain #\' - # "ps?" = "ps ax | head -n 1;ps ax | fgrep -v ' grep --color=auto ' | grep"; - - # alias la='ls -lA' - lAtr = "ls -lAtr"; - # alias ll='ls -l' - ls = "ls -h --color=auto --group-directories-first"; - dmesg = "dmesg -L --reltime"; - view = "vim -R"; - }; - - programs.bash = { - interactiveShellInit = '' - HISTCONTROL='erasedups:ignorespace' - HISTSIZE=65536 - HISTFILESIZE=$HISTSIZE - - shopt -s checkhash - shopt -s histappend histreedit histverify - shopt -s no_empty_cmd_completion - complete -d cd - - ${readFile ./bash_completion.sh} - - # TODO source bridge - ''; - promptInit = '' - case $UID in - 0) - PS1='\[\e[1;31m\]\w\[\e[0m\] ' - ;; - 1337) - PS1='\[\e[1;32m\]\w\[\e[0m\] ' - ;; - *) - PS1='\[\e[1;35m\]\u \[\e[1;32m\]\w\[\e[0m\] ' - ;; - esac - if test -n "$SSH_CLIENT"; then - PS1='\[\e[35m\]\h'" $PS1" - fi - if test -n "$SSH_AGENT_PID"; then - PS1="ssh-agent[$SSH_AGENT_PID] $PS1" - fi - ''; - }; - - programs.ssh.startAgent = false; - } - - { - services.cron.enable = false; - services.nscd.enable = false; - services.ntp.enable = false; - } - - { - boot.kernel.sysctl = { - # Enable IPv6 Privacy Extensions - "net.ipv6.conf.all.use_tempaddr" = 2; - "net.ipv6.conf.default.use_tempaddr" = 2; - }; - } - - { - services.openssh = { - enable = true; - hostKeys = [ - { type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; } - ]; - }; - } - - { - # TODO: exim - security.setuidPrograms = [ - "sendmail" # for sudo - ]; - } - ]; -} diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix new file mode 100644 index 000000000..d3f4eed0d --- /dev/null +++ b/tv/2configs/default.nix @@ -0,0 +1,168 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + krebs.enable = true; + + networking.hostName = config.krebs.build.host.name; + + imports = [ + ./vim.nix + { + # stockholm dependencies + environment.systemPackages = with pkgs; [ + git + ]; + } + { + # TODO never put hashedPassword into the store + users.extraUsers = + mapAttrs (_: h: { hashedPassword = h; }) + (import ); + } + { + users.groups.subusers.gid = 1093178926; # genid subusers + } + { + users.defaultUserShell = "/run/current-system/sw/bin/bash"; + users.mutableUsers = false; + } + { + users.extraUsers = { + root = { + openssh.authorizedKeys.keys = [ + config.krebs.users.tv.pubkey + config.krebs.users.tv_xu.pubkey + ]; + }; + tv = { + uid = 1337; + group = "users"; + home = "/home/tv"; + createHome = true; + useDefaultShell = true; + extraGroups = [ + "audio" + "video" + "wheel" + ]; + openssh.authorizedKeys.keys = [ + config.krebs.users.tv.pubkey + ]; + }; + }; + } + { + security.sudo.extraConfig = '' + Defaults mailto="${config.krebs.users.tv.mail}" + ''; + time.timeZone = "Europe/Berlin"; + } + { + # TODO check if both are required: + nix.chrootDirs = [ "/etc/protocols" pkgs.iana_etc.outPath ]; + + nix.trustedBinaryCaches = [ + "https://cache.nixos.org" + "http://cache.nixos.org" + "http://hydra.nixos.org" + ]; + + nix.useChroot = true; + } + { + environment.profileRelativeEnvVars.PATH = mkForce [ "/bin" ]; + + environment.systemPackages = with pkgs; [ + rxvt_unicode.terminfo + ]; + + environment.shellAliases = mkForce { + # alias cal='cal -m3' + gp = "${pkgs.pari}/bin/gp -q"; + df = "df -h"; + du = "du -h"; + # alias grep='grep --color=auto' + + # TODO alias cannot contain #\' + # "ps?" = "ps ax | head -n 1;ps ax | fgrep -v ' grep --color=auto ' | grep"; + + # alias la='ls -lA' + lAtr = "ls -lAtr"; + # alias ll='ls -l' + ls = "ls -h --color=auto --group-directories-first"; + dmesg = "dmesg -L --reltime"; + view = "vim -R"; + }; + + programs.bash = { + interactiveShellInit = '' + HISTCONTROL='erasedups:ignorespace' + HISTSIZE=65536 + HISTFILESIZE=$HISTSIZE + + shopt -s checkhash + shopt -s histappend histreedit histverify + shopt -s no_empty_cmd_completion + complete -d cd + + ${readFile ./bash_completion.sh} + + # TODO source bridge + ''; + promptInit = '' + case $UID in + 0) + PS1='\[\e[1;31m\]\w\[\e[0m\] ' + ;; + 1337) + PS1='\[\e[1;32m\]\w\[\e[0m\] ' + ;; + *) + PS1='\[\e[1;35m\]\u \[\e[1;32m\]\w\[\e[0m\] ' + ;; + esac + if test -n "$SSH_CLIENT"; then + PS1='\[\e[35m\]\h'" $PS1" + fi + if test -n "$SSH_AGENT_PID"; then + PS1="ssh-agent[$SSH_AGENT_PID] $PS1" + fi + ''; + }; + + programs.ssh.startAgent = false; + } + + { + services.cron.enable = false; + services.nscd.enable = false; + services.ntp.enable = false; + } + + { + boot.kernel.sysctl = { + # Enable IPv6 Privacy Extensions + "net.ipv6.conf.all.use_tempaddr" = 2; + "net.ipv6.conf.default.use_tempaddr" = 2; + }; + } + + { + services.openssh = { + enable = true; + hostKeys = [ + { type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; } + ]; + }; + } + + { + # TODO: exim + security.setuidPrograms = [ + "sendmail" # for sudo + ]; + } + ]; +} -- cgit v1.2.3 From bae469d2a64165a42d93cdb31e231fa75e9813a5 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2015 22:36:01 +0100 Subject: tv: condense krebs.build --- tv/2configs/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index d3f4eed0d..d31862b60 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -5,6 +5,25 @@ with lib; { krebs.enable = true; + krebs.build = { + user = config.krebs.users.tv; + target = mkDefault "root@${config.krebs.build.host.name}"; + source = { + git.nixpkgs = { + url = mkDefault https://github.com/NixOS/nixpkgs; + rev = mkDefault "c44a593aa43bba6a0708f6f36065a514a5110613"; + target-path = mkDefault "/var/src/nixpkgs"; + }; + dir.secrets = { + path = mkDefault "/home/tv/secrets/${config.krebs.build.host.name}"; + }; + dir.stockholm = { + path = mkDefault "/home/tv/stockholm"; + target-path = mkDefault "/var/src/stockholm"; + }; + }; + }; + networking.hostName = config.krebs.build.host.name; imports = [ -- cgit v1.2.3 From a3f6dcb75ce73f57e1053054cf70667c2daef22d Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2015 10:04:46 +0100 Subject: tv: move X-based tools to xserver --- tv/2configs/xserver/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index df00203be..7a48db6b8 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -34,7 +34,13 @@ let }; environment.systemPackages = [ + pkgs.ff + pkgs.gitAndTools.qgit + pkgs.mpv + pkgs.pavucontrol pkgs.slock + pkgs.sxiv + pkgs.zathura ]; security.setuidPrograms = [ -- cgit v1.2.3 From e35e3b5eb05cea1e3c033423c2f6ee4e0a511817 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2015 19:24:25 +0100 Subject: tv: mv user xr to sub --- tv/2configs/sub/xr.nix | 22 ++++++++++++++++++++++ tv/2configs/xserver/default.nix | 1 + tv/2configs/z.nix | 11 +---------- 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 tv/2configs/sub/xr.nix (limited to 'tv/2configs') diff --git a/tv/2configs/sub/xr.nix b/tv/2configs/sub/xr.nix new file mode 100644 index 000000000..6c9cbb93e --- /dev/null +++ b/tv/2configs/sub/xr.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + krebs.per-user.xr.packages = [ + pkgs.cr + ]; + + security.sudo.extraConfig = "tv ALL=(xr) NOPASSWD: ALL"; + + users.users.xr = { + extraGroups = [ + "audio" + "video" + ]; + group = "subusers"; + home = "/home/xr"; + uid = 1660006127; # genid xr + useDefaultShell = true; + }; +} diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 7a48db6b8..afc2d699c 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -40,6 +40,7 @@ let pkgs.pavucontrol pkgs.slock pkgs.sxiv + pkgs.xsel pkgs.zathura ]; diff --git a/tv/2configs/z.nix b/tv/2configs/z.nix index e5494ecc9..3acd168d4 100644 --- a/tv/2configs/z.nix +++ b/tv/2configs/z.nix @@ -4,16 +4,7 @@ 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 \ - "%@" - '') + pkgs.cr ]; programs.bash.interactiveShellInit = '' -- cgit v1.2.3 From 60faa6e3cf3b592a4aad71b246fbe2abdd699b9c Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2015 11:53:29 +0100 Subject: tv: remove legacy users --- tv/2configs/default.nix | 43 +++++++++---------------------------------- tv/2configs/sub/xr.nix | 22 ---------------------- tv/2configs/z.nix | 31 ------------------------------- 3 files changed, 9 insertions(+), 87 deletions(-) delete mode 100644 tv/2configs/sub/xr.nix delete mode 100644 tv/2configs/z.nix (limited to 'tv/2configs') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index d31862b60..688f8f9cf 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -27,6 +27,7 @@ with lib; networking.hostName = config.krebs.build.host.name; imports = [ + ./vim.nix { # stockholm dependencies @@ -35,40 +36,14 @@ with lib; ]; } { - # TODO never put hashedPassword into the store - users.extraUsers = - mapAttrs (_: h: { hashedPassword = h; }) - (import ); - } - { - users.groups.subusers.gid = 1093178926; # genid subusers - } - { - users.defaultUserShell = "/run/current-system/sw/bin/bash"; - users.mutableUsers = false; - } - { - users.extraUsers = { - root = { - openssh.authorizedKeys.keys = [ - config.krebs.users.tv.pubkey - config.krebs.users.tv_xu.pubkey - ]; - }; - tv = { - uid = 1337; - group = "users"; - home = "/home/tv"; - createHome = true; - useDefaultShell = true; - extraGroups = [ - "audio" - "video" - "wheel" - ]; - openssh.authorizedKeys.keys = [ - config.krebs.users.tv.pubkey - ]; + users = { + defaultUserShell = "/run/current-system/sw/bin/bash"; + mutableUsers = false; + users = { + tv = { + isNormalUser = true; + uid = 1337; + }; }; }; } diff --git a/tv/2configs/sub/xr.nix b/tv/2configs/sub/xr.nix deleted file mode 100644 index 6c9cbb93e..000000000 --- a/tv/2configs/sub/xr.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - krebs.per-user.xr.packages = [ - pkgs.cr - ]; - - security.sudo.extraConfig = "tv ALL=(xr) NOPASSWD: ALL"; - - users.users.xr = { - extraGroups = [ - "audio" - "video" - ]; - group = "subusers"; - home = "/home/xr"; - uid = 1660006127; # genid xr - useDefaultShell = true; - }; -} diff --git a/tv/2configs/z.nix b/tv/2configs/z.nix deleted file mode 100644 index 3acd168d4..000000000 --- a/tv/2configs/z.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -{ - krebs.per-user.z.packages = [ - pkgs.cr - ]; - - 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; - }; -} -- cgit v1.2.3 From 0faad027e7e241edbe842cf6a54aad606d00adf7 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2015 12:28:53 +0100 Subject: tv configs: set NIX_PATH --- tv/2configs/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tv/2configs') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 688f8f9cf..6ed1c65f9 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -90,6 +90,15 @@ with lib; view = "vim -R"; }; + environment.variables = { + NIX_PATH = + with config.krebs.build.source; with dir; with git; + mkForce (concatStringsSep ":" [ + "nixpkgs=${nixpkgs.target-path}" + "secrets=${stockholm.target-path}/null" + ]); + }; + programs.bash = { interactiveShellInit = '' HISTCONTROL='erasedups:ignorespace' -- cgit v1.2.3