Merge remote-tracking branch 'cd/master'

This commit is contained in:
makefu 2015-11-06 22:38:44 +01:00
commit 9a0e67cf65
16 changed files with 106 additions and 71 deletions

View File

@ -32,7 +32,10 @@ let stockholm = {
upath = lib.nspath current-user-name; upath = lib.nspath current-user-name;
base-module = { config, ... }: { base-module = { config, ... }: {
imports = map (f: f "3modules") [ kpath upath ]; imports = builtins.filter builtins.pathExists (lib.concatLists [
(map (f: f "2configs") [ upath ])
(map (f: f "3modules") [ kpath upath ])
]);
krebs.current.enable = true; krebs.current.enable = true;
krebs.current.host = config.krebs.hosts.${current-host-name}; krebs.current.host = config.krebs.hosts.${current-host-name};

View File

@ -29,10 +29,13 @@ let
}; };
options.krebs.build.source.dir = mkOption { options.krebs.build.source.dir = mkOption {
type = types.attrsOf (types.submodule ({ config, ... }: { type = let
default-host = config.krebs.current.host;
in types.attrsOf (types.submodule ({ config, ... }: {
options = { options = {
host = mkOption { host = mkOption {
type = types.host; type = types.host;
default = default-host;
}; };
path = mkOption { path = mkOption {
type = types.str; type = types.str;

View File

@ -15,6 +15,7 @@ let
./git.nix ./git.nix
./iptables.nix ./iptables.nix
./nginx.nix ./nginx.nix
./per-user.nix
./Reaktor.nix ./Reaktor.nix
./retiolum-bootstrap.nix ./retiolum-bootstrap.nix
./realwallpaper.nix ./realwallpaper.nix

View File

@ -0,0 +1,35 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.krebs.per-user;
out = {
options.krebs.per-user = api;
config = imp;
};
api = mkOption {
type = with types; attrsOf (submodule {
options = {
packages = mkOption {
type = listOf path;
default = [];
};
};
});
default = {};
};
imp = {
environment = {
etc = flip mapAttrs' cfg (name: { packages, ... }: {
name = "per-user/${name}";
value.source = pkgs.symlinkJoin "per-user.${name}" packages;
});
profiles = ["/etc/per-user/$LOGNAME"];
};
};
in out

View File

@ -280,14 +280,22 @@ with lib;
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID554niVFWomJjuSuQoiCdMUYrCFPpPzQuaoXXYYDxlw"; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID554niVFWomJjuSuQoiCdMUYrCFPpPzQuaoXXYYDxlw";
}; };
}; };
users = addNames { users = addNames rec {
mv = { mv = {
mail = "mv@cd.retiolum"; mail = "mv@cd.retiolum";
pubkey = readFile ../../Zpubkeys/mv_vod.ssh.pub; pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGer9e2+Lew7vnisgBbsFNECEIkpNJgEaqQqgb9inWkQ mv@vod";
}; };
tv = { tv = {
mail = "tv@wu.retiolum"; mail = "tv@wu.retiolum";
pubkey = readFile ../../Zpubkeys/tv_wu.ssh.pub; pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQDFR//RnCvEZAt0F6ExDsatKZ/DDdifanuSL360mqOhaFieKI34RoOwfQT9T+Ga52Vh5V2La6esvlph686EdgzeKLvDoxEwFM9ZYFBcMrNzu4bMTlgE7YUYw5JiORyXNfznBGnme6qpuvx9ibYhUyiZo99kM8ys5YrUHrP2JXQJMezDFZHxT4GFMOuSdh/1daGoKKD6hYL/jEHX8CI4E3BSmKK6ygYr1fVX0K0Tv77lIi5mLXucjR7CytWYWYnhM6DC3Hxpv2zRkPgf3k0x/Y1hrw3V/r0Me5h90pd2C8pFaWA2ZoUT/fmyVqvx1tZPYToU/O2dMItY0zgx2kR0yD+6g7Aahz3R+KlXkV8k5c8bbTbfGnZWDR1ZlbLRM9Yt5vosfwapUD90MmVkpmR3wUkO2sUKi80QfC7b4KvSDXQ+MImbGxMaU5Bnsq1PqLN95q+uat3nlAVBAELkcx51FlE9CaIS65y4J7FEDg8BE5JeuCNshh62VSYRXVSFt8bk3f/TFGgzC8OIo14BhVmiRQQ503Z1sROyf5xLX2a/EJavMm1i2Bs2TH6ROKY9z5Pz8hT5US0r381V8oG7TZyLF9HTtoy3wCYsgWA5EmLanjAsVU2YEeAA0rxzdtYP8Y2okFiJ6u+M4HQZ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5rOZXM1opXqVPb09nljAhhAhyCTh1e/8+mJrBo0cLQ/LupQzVxGDgm3awSMPxsZAN45PSWz76zzxdDa1MMo51do+VJHfs7Wl0NcXAQrniOBYL9Wqt0qNkn1gY5smkkISGeQ/vxNap4MmzeZE7b5fpOy+2fpcRVQLpc4nooQzJvSVTFz+25lgZ6iHf45K87gQFMIAri1Pf/EDDpL87az+bRWvWi+BA2kMe1kf+Ay1LyMz8r+g51H0ma0bNFh6+fbWMfUiD9JCepIObclnUJ4NlWfcgHxTf17d/4tl6z4DTcLpCCk8Da77JouSHgvtcRbRlFV1OfhWZLXUsrlfpaQTiItv6TGIr3k7+7b66o3Qw/GQVs5GmYifaIZIz8n8my4XjkaMBd0SZfBzzvFjHMq6YUP9+SbjvReqofuoO+5tW1wTYZXitFFBfwuHlXm6w77K5QDBW6olT7pat41/F5eGxLcz tv@wu

View File

@ -14,11 +14,9 @@ with lib;
rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; rev = "c44a593aa43bba6a0708f6f36065a514a5110613";
}; };
dir.secrets = { dir.secrets = {
host = config.krebs.hosts.wu;
path = "/home/tv/secrets/cd"; path = "/home/tv/secrets/cd";
}; };
dir.stockholm = { dir.stockholm = {
host = config.krebs.hosts.wu;
path = "/home/tv/stockholm"; path = "/home/tv/stockholm";
}; };
}; };
@ -26,7 +24,6 @@ with lib;
imports = [ imports = [
../2configs/hw/CAC-Developer-2.nix ../2configs/hw/CAC-Developer-2.nix
../2configs/fs/CAC-CentOS-7-64bit.nix ../2configs/fs/CAC-CentOS-7-64bit.nix
../2configs/base.nix
#../2configs/consul-server.nix #../2configs/consul-server.nix
../2configs/exim-smarthost.nix ../2configs/exim-smarthost.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -27,11 +27,9 @@ in
rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; rev = "c44a593aa43bba6a0708f6f36065a514a5110613";
}; };
dir.secrets = { dir.secrets = {
host = config.krebs.hosts.wu;
path = "/home/tv/secrets/mkdir"; path = "/home/tv/secrets/mkdir";
}; };
dir.stockholm = { dir.stockholm = {
host = config.krebs.hosts.wu;
path = "/home/tv/stockholm"; path = "/home/tv/stockholm";
}; };
}; };
@ -39,7 +37,6 @@ in
imports = [ imports = [
../2configs/hw/CAC-Developer-1.nix ../2configs/hw/CAC-Developer-1.nix
../2configs/fs/CAC-CentOS-7-64bit.nix ../2configs/fs/CAC-CentOS-7-64bit.nix
../2configs/base.nix
../2configs/consul-server.nix ../2configs/consul-server.nix
../2configs/exim-smarthost.nix ../2configs/exim-smarthost.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -14,18 +14,15 @@ with lib;
rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; rev = "c44a593aa43bba6a0708f6f36065a514a5110613";
}; };
dir.secrets = { dir.secrets = {
host = config.krebs.hosts.wu;
path = "/home/tv/secrets/nomic"; path = "/home/tv/secrets/nomic";
}; };
dir.stockholm = { dir.stockholm = {
host = config.krebs.hosts.wu;
path = "/home/tv/stockholm"; path = "/home/tv/stockholm";
}; };
}; };
imports = [ imports = [
../2configs/hw/AO753.nix ../2configs/hw/AO753.nix
../2configs/base.nix
#../2configs/consul-server.nix #../2configs/consul-server.nix
../2configs/git.nix ../2configs/git.nix
{ {

View File

@ -27,11 +27,9 @@ in
rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; rev = "c44a593aa43bba6a0708f6f36065a514a5110613";
}; };
dir.secrets = { dir.secrets = {
host = config.krebs.hosts.wu;
path = "/home/tv/secrets/rmdir"; path = "/home/tv/secrets/rmdir";
}; };
dir.stockholm = { dir.stockholm = {
host = config.krebs.hosts.wu;
path = "/home/tv/stockholm"; path = "/home/tv/stockholm";
}; };
}; };
@ -39,7 +37,6 @@ in
imports = [ imports = [
../2configs/hw/CAC-Developer-1.nix ../2configs/hw/CAC-Developer-1.nix
../2configs/fs/CAC-CentOS-7-64bit.nix ../2configs/fs/CAC-CentOS-7-64bit.nix
../2configs/base.nix
../2configs/consul-server.nix ../2configs/consul-server.nix
../2configs/exim-smarthost.nix ../2configs/exim-smarthost.nix
../2configs/git.nix ../2configs/git.nix

View File

@ -15,11 +15,9 @@ with lib;
target-path = "/var/src/nixpkgs"; target-path = "/var/src/nixpkgs";
}; };
dir.secrets = { dir.secrets = {
host = config.krebs.hosts.wu;
path = "/home/tv/secrets/wu"; path = "/home/tv/secrets/wu";
}; };
dir.stockholm = { dir.stockholm = {
host = config.krebs.hosts.wu;
path = "/home/tv/stockholm"; path = "/home/tv/stockholm";
target-path = "/var/src/stockholm"; target-path = "/var/src/stockholm";
}; };
@ -27,11 +25,11 @@ with lib;
imports = [ imports = [
../2configs/hw/w110er.nix ../2configs/hw/w110er.nix
../2configs/base.nix
#../2configs/consul-client.nix #../2configs/consul-client.nix
../2configs/git.nix ../2configs/git.nix
../2configs/mail-client.nix ../2configs/mail-client.nix
../2configs/xserver ../2configs/xserver
../2configs/z.nix
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -287,16 +285,6 @@ with lib;
onion = { onion = {
uid = 6660010; uid = 6660010;
}; };
zalora = {
uid = 1000301;
extraGroups = [
"audio"
# TODO remove vboxusers when hardening is active
"vboxusers"
"video"
];
};
}; };
security.sudo.extraConfig = security.sudo.extraConfig =

View File

@ -14,22 +14,20 @@ with lib;
rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; rev = "c44a593aa43bba6a0708f6f36065a514a5110613";
}; };
dir.secrets = { dir.secrets = {
host = config.krebs.hosts.wu;
path = "/home/tv/secrets/xu"; path = "/home/tv/secrets/xu";
}; };
dir.stockholm = { dir.stockholm = {
host = config.krebs.hosts.wu;
path = "/home/tv/stockholm"; path = "/home/tv/stockholm";
}; };
}; };
imports = [ imports = [
../2configs/hw/x220.nix ../2configs/hw/x220.nix
../2configs/base.nix
#../2configs/consul-client.nix #../2configs/consul-client.nix
../2configs/git.nix ../2configs/git.nix
../2configs/mail-client.nix ../2configs/mail-client.nix
../2configs/xserver ../2configs/xserver
../2configs/z.nix
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -286,16 +284,6 @@ with lib;
onion = { onion = {
uid = 6660010; uid = 6660010;
}; };
zalora = {
uid = 1000301;
extraGroups = [
"audio"
# TODO remove vboxusers when hardening is active
"vboxusers"
"video"
];
};
}; };
security.sudo.extraConfig = security.sudo.extraConfig =

View File

@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with builtins;
with lib; with lib;
{ {
@ -22,6 +21,9 @@ with lib;
mapAttrs (_: h: { hashedPassword = h; }) mapAttrs (_: h: { hashedPassword = h; })
(import <secrets/hashedPasswords.nix>); (import <secrets/hashedPasswords.nix>);
} }
{
users.groups.subusers.gid = 1093178926; # genid subusers
}
{ {
users.defaultUserShell = "/run/current-system/sw/bin/bash"; users.defaultUserShell = "/run/current-system/sw/bin/bash";
users.mutableUsers = false; users.mutableUsers = false;
@ -31,6 +33,7 @@ with lib;
root = { root = {
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
config.krebs.users.tv.pubkey config.krebs.users.tv.pubkey
config.krebs.users.tv_xu.pubkey
]; ];
}; };
tv = { tv = {
@ -69,22 +72,8 @@ with lib;
nix.useChroot = true; nix.useChroot = true;
} }
{ {
# oldvim environment.profileRelativeEnvVars.PATH = mkForce [ "/bin" ];
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; [ environment.systemPackages = with pkgs; [
rxvt_unicode.terminfo rxvt_unicode.terminfo
]; ];

View File

@ -66,9 +66,10 @@ let
au BufRead,BufNewFile *.nix so ${pkgs.writeText "nix.vim" '' au BufRead,BufNewFile *.nix so ${pkgs.writeText "nix.vim" ''
setf nix setf nix
set isk=@,48-57,_,192-255,-,'
" Ref <nix/src/libexpr/lexer.l> " Ref <nix/src/libexpr/lexer.l>
syn match INT /[0-9]\+/ syn match INT /\<[0-9]\+\>/
syn match PATH /[a-zA-Z0-9\.\_\-\+]*\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ syn match PATH /[a-zA-Z0-9\.\_\-\+]*\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/
syn match HPATH /\~\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ syn match HPATH /\~\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/
syn match SPATH /<[a-zA-Z0-9\.\_\-\+]\+\(\/[a-zA-Z0-9\.\_\-\+]\+\)*>/ syn match SPATH /<[a-zA-Z0-9\.\_\-\+]\+\(\/[a-zA-Z0-9\.\_\-\+]\+\)*>/
@ -79,8 +80,8 @@ let
hi link SPATH Constant hi link SPATH Constant
hi link URI Constant hi link URI Constant
syn match String /"\([^"]\|\\\"\)*"/ syn match String /"\([^\\"]\|\\.\)*"/
syn match Comment /\s#.*/ syn match Comment /\(^\|\s\)#.*/
''} ''}
au BufRead,BufNewFile /dev/shm/* set nobackup nowritebackup noswapfile au BufRead,BufNewFile /dev/shm/* set nobackup nowritebackup noswapfile

View File

@ -70,14 +70,6 @@ let
ExecStart = "${xserver}/bin/xserver"; ExecStart = "${xserver}/bin/xserver";
}; };
}; };
programs.bash.interactiveShellInit = ''
case ''${XMONAD_SPAWN_WORKSPACE-} in
za|zh|zj|zs)
exec sudo -u zalora -i
;;
esac
'';
}; };
xmonad-environment = { xmonad-environment = {

40
tv/2configs/z.nix Normal file
View File

@ -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;
};
}