From 24ef0f56ba48da109b7288e37304958b0320dc0e Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 2 Nov 2017 21:12:27 +0100 Subject: tv querel: init --- krebs/3modules/tv/default.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'krebs/3modules') diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index e80becfa7..98145274c 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -254,6 +254,36 @@ with import ; ssh.privkey.path = ; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIcJvu8JDVzObLUtlAQg9qVugthKSfitwCljuJ5liyHa"; }; + querel = { + ci = true; + cores = 2; + nets = { + retiolum = { + ip4.addr = "10.243.22.22"; + ip6.addr = "42::2222"; + aliases = [ + "querel.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIICCgKCAgEArv9eB8acpUhJwRaLY9kGeM7DEPvInVvoduEbec10p4Y2PFx2MjSz + 2OhyxFRkONC4EMV9oVTKD+NRtpbRGZGLYD8ZPB622SvccgB0XnL6ZZfie1feSgrn + bPyVnX8EnEgtx9IQckHyaxWgtyrluJnY2CbLkCYgD+50KFT12rdHyAa3+QoYU65x + ACQo28i9xIpsl6dm7iWBb+ecHc7fST35OqWywtVxSpHPe1nvwaYm1p3rqqtkCGVh + iXE5ruAscri7Dskc5dGR1p7LquhBaebuylH6sfRKA6kre05+/IkXi+JLeAmAtJ+W + xezYlecEvxhguql9ZmSYAYkR4KknZb56KtvCnm29o0evvEpsaYcbtgq1D0JhoGyk + 4DixS5e+5dg470icVKxPfz1AzejxrTUTtMlI28qjAIx1FcmCBGM+T6yHs/MhNGbf + aqUmN+FwtsJ2QWFYqu9zjxxyAfrAw+gqHm0LnsKK1ttwF/2fYCTRLowY+ItB3axs + UVq7DQxyunyYalKGX2RSJ5BHczREHrfgX43HCSlcAuMuow9jHLOjzul0A49rSZ9E + vOPqbjrki0KEEQj0HN3Ax4UVqZ6mPWaTQzuup+bPQ/2Sjkx6COzMSAPmKo4l6DkA + J++ZonpnOCUkwCeCU6qJgMuHeXn0uh117Ypj/3J9eKYMO/RTSs3x8l0CAwEAAQ== + -----END RSA PUBLIC KEY----- + ''; + }; + }; + ssh.privkey.path = ; + ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPFM2GdL9yOjSBmYBE07ClywNOADc/zxqXwZuWd7Mael root@querel.r"; + }; xu = { binary-cache = { pubkey = "xu-1:pYRENvaxZqGeImwLA9qHmRwHV4jfKaYx4u1VcZ31x0s="; @@ -339,6 +369,8 @@ with import ; dv = { mail = "dv@alnus.r"; }; + itak = { + }; mv-ni = { mail = "mv@ni.r"; pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGer9e2+Lew7vnisgBbsFNECEIkpNJgEaqQqgb9inWkQ mv@vod"; -- cgit v1.2.3 From ae4cb860ea2bd99d80e66e48480e0d2a9731c2bd Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 12 Nov 2017 09:43:25 +0100 Subject: per-user module: factor away api and imp --- krebs/3modules/per-user.nix | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/per-user.nix b/krebs/3modules/per-user.nix index 1b8d092bb..9cbd9e1ea 100644 --- a/krebs/3modules/per-user.nix +++ b/krebs/3modules/per-user.nix @@ -1,28 +1,19 @@ -{ config, lib, pkgs, ... }: - with import ; - -let +{ config, pkgs, ... }: let cfg = config.krebs.per-user; - - out = { - options.krebs.per-user = api; - config = imp; - }; - - api = mkOption { - type = with types; attrsOf (submodule { +in { + options.krebs.per-user = mkOption { + type = types.attrsOf (types.submodule { options = { packages = mkOption { - type = listOf path; + type = types.listOf types.path; default = []; }; }; }); default = {}; }; - - imp = { + config = { environment = { etc = flip mapAttrs' cfg (name: { packages, ... }: { name = "per-user/${name}"; @@ -34,5 +25,4 @@ let profiles = ["/etc/per-user/$LOGNAME"]; }; }; - -in out +} -- cgit v1.2.3 From 9c8680981fc93c7bce3c4a5198d1d4cb36bd876a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 12 Nov 2017 09:57:07 +0100 Subject: per-user module: symlinkJoin -> buildEnv Refs https://github.com/NixOS/nixpkgs/pull/31283 --- krebs/3modules/per-user.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/per-user.nix b/krebs/3modules/per-user.nix index 9cbd9e1ea..9080e3b44 100644 --- a/krebs/3modules/per-user.nix +++ b/krebs/3modules/per-user.nix @@ -17,9 +17,12 @@ in { environment = { etc = flip mapAttrs' cfg (name: { packages, ... }: { name = "per-user/${name}"; - value.source = pkgs.symlinkJoin { + value.source = pkgs.buildEnv { name = "per-user.${name}"; paths = packages; + pathsToLink = [ + "/bin" + ]; }; }); profiles = ["/etc/per-user/$LOGNAME"]; -- cgit v1.2.3 From 7393d245d61eac3f0c4f9f79865f8c9e8aea4839 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 12 Nov 2017 10:47:36 +0100 Subject: per-user module: create profiles only when needed Refs https://github.com/NixOS/nixpkgs/pull/25712 --- krebs/3modules/per-user.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/per-user.nix b/krebs/3modules/per-user.nix index 9080e3b44..a7a07a8e6 100644 --- a/krebs/3modules/per-user.nix +++ b/krebs/3modules/per-user.nix @@ -15,16 +15,19 @@ in { }; config = { environment = { - etc = flip mapAttrs' cfg (name: { packages, ... }: { - name = "per-user/${name}"; - value.source = pkgs.buildEnv { - name = "per-user.${name}"; - paths = packages; - pathsToLink = [ - "/bin" - ]; - }; - }); + etc = + mapAttrs' + (name: per-user: { + name = "per-user/${name}"; + value.source = pkgs.buildEnv { + name = "per-user.${name}"; + paths = per-user.packages; + pathsToLink = [ + "/bin" + ]; + }; + }) + (filterAttrs (_: per-user: per-user.packages != []) cfg); profiles = ["/etc/per-user/$LOGNAME"]; }; }; -- cgit v1.2.3