3 krebs: put imps into user namespaces

This commit is contained in:
tv 2015-07-24 21:38:41 +02:00
parent 7e43b2cc3e
commit 85077a0cde

View File

@ -13,14 +13,7 @@ let
./urlwatch.nix ./urlwatch.nix
]; ];
options.krebs = api; options.krebs = api;
config = mkIf cfg.enable (mkMerge [ config = mkIf cfg.enable imp;
{ krebs.hosts = lass-hosts; }
{ krebs.hosts = makefu-hosts; }
{ krebs.hosts = tv-hosts; }
{ krebs.users = lass-users; }
{ krebs.users = makefu-users; }
{ krebs.users = tv-users; }
]);
}; };
api = { api = {
@ -35,9 +28,16 @@ let
}; };
}; };
lass-hosts = addNames { imp = mkMerge [
{ krebs = lass-imp; }
{ krebs = makefu-imp; }
{ krebs = tv-imp; }
];
lass-imp = {
hosts = addNames {
}; };
lass-users = addNames { users = addNames {
lass = { lass = {
pubkey = readFile ../../Zpubkeys/lass.ssh.pub; pubkey = readFile ../../Zpubkeys/lass.ssh.pub;
}; };
@ -45,16 +45,20 @@ let
pubkey = readFile ../../Zpubkeys/uriel.ssh.pub; pubkey = readFile ../../Zpubkeys/uriel.ssh.pub;
}; };
}; };
makefu-hosts = addNames {
}; };
makefu-users = addNames {
makefu-imp = {
hosts = addNames {
};
users = addNames {
makefu = { makefu = {
pubkey = readFile ../../Zpubkeys/makefu.ssh.pub; pubkey = readFile ../../Zpubkeys/makefu.ssh.pub;
}; };
}; };
};
tv-hosts = addNames { tv-imp = {
hosts = addNames {
cd = { cd = {
cores = 2; cores = 2;
dc = "tv"; #dc = "cac"; dc = "tv"; #dc = "cac";
@ -207,11 +211,12 @@ let
secure = true; secure = true;
}; };
}; };
tv-users = addNames { users = addNames {
tv = { tv = {
pubkey = readFile ../../Zpubkeys/tv_wu.ssh.pub; pubkey = readFile ../../Zpubkeys/tv_wu.ssh.pub;
}; };
}; };
};
in in
out out