From 6e35be71f64dbb6d83bfd1d6fd8a2d8e1c9eb842 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 3 May 2018 18:49:46 +0200 Subject: kops 1.1.0 -> krops 1.0.0 --- krebs/5pkgs/simple/kops.nix | 7 ------- krebs/5pkgs/simple/krops.nix | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 krebs/5pkgs/simple/kops.nix create mode 100644 krebs/5pkgs/simple/krops.nix (limited to 'krebs') diff --git a/krebs/5pkgs/simple/kops.nix b/krebs/5pkgs/simple/kops.nix deleted file mode 100644 index 8db4b8ddd..000000000 --- a/krebs/5pkgs/simple/kops.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ fetchgit, ... }: - -fetchgit { - url = https://cgit.krebsco.de/kops; - rev = "refs/tags/v1.1.0"; - sha256 = "0k3zhv2830z4bljcdvf6ciwjihk2zzcn9y23p49c6sba5hbsd6jb"; -} diff --git a/krebs/5pkgs/simple/krops.nix b/krebs/5pkgs/simple/krops.nix new file mode 100644 index 000000000..29bfb52f5 --- /dev/null +++ b/krebs/5pkgs/simple/krops.nix @@ -0,0 +1,7 @@ +{ fetchgit, ... }: + +fetchgit { + url = https://cgit.krebsco.de/krops; + rev = "refs/tags/v1.0.0"; + sha256 = "0ahp3fxb3l1vcjylxw0cd0f4hfp98bxskkf3z9d37hl3m7v4pcb4"; +} -- cgit v1.2.3 From c1e6915ccf9dbdd38c35f4849fd2a8a89c35a62d Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 4 May 2018 20:28:15 +0200 Subject: l: add lol.lassul.us --- krebs/3modules/lass/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 48df04bcb..36fd5fc63 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -65,6 +65,7 @@ with import ; io 60 IN NS ions.lassul.us. ions 60 IN A ${config.krebs.hosts.prism.nets.internet.ip4.addr} paste 60 IN A ${config.krebs.hosts.prism.nets.internet.ip4.addr} + lol 60 IN A ${config.krebs.hosts.prism.nets.internet.ip4.addr} ''; }; nets = rec { -- cgit v1.2.3 From 8d6ab1e0bb0be7f779b721c797b937be8e452e02 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 7 May 2018 00:35:28 +0200 Subject: l: add icarus.pgp --- krebs/3modules/lass/default.nix | 1 + krebs/3modules/lass/pgp/icarus.pgp | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 krebs/3modules/lass/pgp/icarus.pgp (limited to 'krebs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 36fd5fc63..aa0b43f9a 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -698,6 +698,7 @@ with import ; lass-icarus = { mail = "lass@icarus.r"; pubkey = builtins.readFile ./ssh/icarus.rsa; + pgp.pubkeys.default = builtins.readFile ./pgp/icarus.pgp; }; lass-xerxes = { mail = "lass@xerxes.r"; diff --git a/krebs/3modules/lass/pgp/icarus.pgp b/krebs/3modules/lass/pgp/icarus.pgp new file mode 100644 index 000000000..f41478a09 --- /dev/null +++ b/krebs/3modules/lass/pgp/icarus.pgp @@ -0,0 +1,51 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFpqAGEBEADWiwVYVFXuK9kM7Y1XFL70jb2ZAZBRIpcZF81URMDFhm6ulvHq +fEhXTpiKKmfnv5Mz6r6wAWLJFKOKZuEvg8NwplRrlBHMkR3iEx4+7sP/dVey7U6f ++gI61ytFHTOKr52gstPVdXO3xhNmdrAI1hFuF2DxoXKloz8tPP92dZcCdm7+5C+2 +KSYEBrIp/Zv1cjkbAFwek5y4ut65sBh/VM+RhSLbqwzyCxwfBE9QAJdIEiSmChql +Lcz6CToYrdXhOY0ykx+QhT092k/6Xh66JeZ63WVHGrF+SSabq5NNcbWi7EISioHd +N6JXZmbXMpS/Bxg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+f/0olra5rkIyZbsvKm0g2N/bfmCfmtOClFDst2yK/FovW5PJBRx2mT38qBhHG8j2 +P7zG0/vO846FxjAGvOMGlEVGmN+R9BeecomOKsKgvUbsycAwzZi/2vWAUGbJBYjx +Yd+K8wjPE8g5CumxaLSH/dlY/0BOZygjank+aHLrwMtNnplYVJmmqDhdbgwN6DDk +cCQNLQyk61IdhtZ7UzJyFTkXnXiirrO4WzL6GJjunNzvcTUAU5vNiG+2he1GdxZF +WiLRrcC+oIMWVST8fNRwJZU+Ibw/UIfEV/rHau0fJlxZatks7Qd8gjxSHIyElUVj +CYrizbFPZ85IhkCirX2tvhycK/nseAYjDuJkJIp3Io0sl3cQ9M8Kx790LUbYzNC4 +bZn8vA1YwTr1ny3+vEhMhaaVSTeVrWYV8023kwzcLRWra7F1hJcc9+LNmqHvXR67 +uBW2KPIrXKrjJmGkMVBSrf9PJu5jNfvCWOntck7C7xOWoUcgyt3uTpP7FkHVdolh +HFNPouS3w0HoB20zdCpmyFNs6Rjhey2r5JIttd6ATVRVYA== +=gJia +-----END PGP PUBLIC KEY BLOCK----- -- cgit v1.2.3 From 47c0b0261eabdf230bfc7a375a3a008a04b61c4a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 9 May 2018 11:11:50 +0200 Subject: krebs: 6tests -> 0tests --- krebs/0tests/data/secrets/grafana_security.nix | 1 + krebs/0tests/data/secrets/hashedPasswords.nix | 1 + krebs/0tests/data/secrets/retiolum.rsa_key.priv | 0 .../data/secrets/shackspace-gitlab-ci-token.nix | 1 + krebs/0tests/data/secrets/ssh.id_ed25519 | 0 krebs/0tests/data/test-config.nix | 22 +++++ krebs/0tests/data/test-source.nix | 12 +++ krebs/0tests/default.nix | 6 ++ krebs/0tests/deploy.nix | 106 +++++++++++++++++++++ krebs/3modules/ci.nix | 2 +- krebs/6tests/data/secrets/grafana_security.nix | 1 - krebs/6tests/data/secrets/hashedPasswords.nix | 1 - krebs/6tests/data/secrets/retiolum.rsa_key.priv | 0 .../data/secrets/shackspace-gitlab-ci-token.nix | 1 - krebs/6tests/data/secrets/ssh.id_ed25519 | 0 krebs/6tests/data/test-config.nix | 22 ----- krebs/6tests/data/test-source.nix | 12 --- krebs/6tests/default.nix | 6 -- krebs/6tests/deploy.nix | 106 --------------------- krebs/kops.nix | 2 +- krebs/source.nix | 2 +- 21 files changed, 152 insertions(+), 152 deletions(-) create mode 100644 krebs/0tests/data/secrets/grafana_security.nix create mode 100644 krebs/0tests/data/secrets/hashedPasswords.nix create mode 100644 krebs/0tests/data/secrets/retiolum.rsa_key.priv create mode 100644 krebs/0tests/data/secrets/shackspace-gitlab-ci-token.nix create mode 100644 krebs/0tests/data/secrets/ssh.id_ed25519 create mode 100644 krebs/0tests/data/test-config.nix create mode 100644 krebs/0tests/data/test-source.nix create mode 100644 krebs/0tests/default.nix create mode 100644 krebs/0tests/deploy.nix delete mode 100644 krebs/6tests/data/secrets/grafana_security.nix delete mode 100644 krebs/6tests/data/secrets/hashedPasswords.nix delete mode 100644 krebs/6tests/data/secrets/retiolum.rsa_key.priv delete mode 100644 krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix delete mode 100644 krebs/6tests/data/secrets/ssh.id_ed25519 delete mode 100644 krebs/6tests/data/test-config.nix delete mode 100644 krebs/6tests/data/test-source.nix delete mode 100644 krebs/6tests/default.nix delete mode 100644 krebs/6tests/deploy.nix (limited to 'krebs') diff --git a/krebs/0tests/data/secrets/grafana_security.nix b/krebs/0tests/data/secrets/grafana_security.nix new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/krebs/0tests/data/secrets/grafana_security.nix @@ -0,0 +1 @@ +{} diff --git a/krebs/0tests/data/secrets/hashedPasswords.nix b/krebs/0tests/data/secrets/hashedPasswords.nix new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/krebs/0tests/data/secrets/hashedPasswords.nix @@ -0,0 +1 @@ +{} diff --git a/krebs/0tests/data/secrets/retiolum.rsa_key.priv b/krebs/0tests/data/secrets/retiolum.rsa_key.priv new file mode 100644 index 000000000..e69de29bb diff --git a/krebs/0tests/data/secrets/shackspace-gitlab-ci-token.nix b/krebs/0tests/data/secrets/shackspace-gitlab-ci-token.nix new file mode 100644 index 000000000..963e6db8b --- /dev/null +++ b/krebs/0tests/data/secrets/shackspace-gitlab-ci-token.nix @@ -0,0 +1 @@ +"lol" diff --git a/krebs/0tests/data/secrets/ssh.id_ed25519 b/krebs/0tests/data/secrets/ssh.id_ed25519 new file mode 100644 index 000000000..e69de29bb diff --git a/krebs/0tests/data/test-config.nix b/krebs/0tests/data/test-config.nix new file mode 100644 index 000000000..f0927ddd9 --- /dev/null +++ b/krebs/0tests/data/test-config.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + + + + ]; + + krebs.hosts.minimal = { + cores = 1; + secure = false; + }; + + boot.loader.grub.enable = false; + boot.loader.systemd-boot.enable = true; + + krebs.build = { + host = config.krebs.hosts.minimal; + user = config.krebs.users.krebs; + }; +} diff --git a/krebs/0tests/data/test-source.nix b/krebs/0tests/data/test-source.nix new file mode 100644 index 000000000..dfc6b3297 --- /dev/null +++ b/krebs/0tests/data/test-source.nix @@ -0,0 +1,12 @@ +with import ; +evalSource "" [{ + nixos-config = { + symlink.target = toString ./test-config; + }; + nixpkgs = { + symlink.target = toString ; + }; + stockholm = { + symlink.target = toString ; + }; +}] diff --git a/krebs/0tests/default.nix b/krebs/0tests/default.nix new file mode 100644 index 000000000..c0ca00296 --- /dev/null +++ b/krebs/0tests/default.nix @@ -0,0 +1,6 @@ +with import ; +{ ... }: + +{ + deploy = import ./deploy.nix; +} diff --git a/krebs/0tests/deploy.nix b/krebs/0tests/deploy.nix new file mode 100644 index 000000000..d96963500 --- /dev/null +++ b/krebs/0tests/deploy.nix @@ -0,0 +1,106 @@ +with import ; +import ({ ... }: + +let + pkgs = import { overlays = [(import ../5pkgs)]; }; + test-config = ; + privKey = '' + -----BEGIN OPENSSH PRIVATE KEY----- + b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW + QyNTUxOQAAACD1tYD8r6Fcd7bq3Z0nvo5483nXQ8c4LFh0fcw8rOCQtQAAAJBTNHK6UzRy + ugAAAAtzc2gtZWQyNTUxOQAAACD1tYD8r6Fcd7bq3Z0nvo5483nXQ8c4LFh0fcw8rOCQtQ + AAAECK2ZlEIofZyGbh7rXlUq5lUsUyotamtp9QrlvoS3qgePW1gPyvoVx3turdnSe+jnjz + eddDxzgsWHR9zDys4JC1AAAACWxhc3NAbW9ycwECAwQ= + -----END OPENSSH PRIVATE KEY----- + ''; + pubKey = '' + ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPW1gPyvoVx3turdnSe+jnjzeddDxzgsWHR9zDys4JC1 + ''; + + ssh-config = pkgs.writeText "ssh-config" '' + Host server + StrictHostKeyChecking no + UserKnownHostsFile=/dev/null + ''; + + populate-source = { + nixos-config = { + symlink.target = test-config; + type = "symlink"; + }; + nixpkgs = { + symlink.target = ; + type = "symlink"; + }; + stockholm = { + symlink.target = ; + type = "symlink"; + }; + }; + + test-deploy = pkgs.writeDash "test-deploy" '' + cd ${} + export NIX_PATH=stockholm=${}:nixpkgs=${}:$NIX_PATH + exec >&2 + source=${pkgs.writeJSON "source.json" populate-source} + LOGNAME=krebs ${pkgs.populate}/bin/populate --force root@server:22/var/src/ < "$source" + # TODO: make deploy work + #LOGNAME=krebs ${pkgs.stockholm}/bin/deploy \ + # --force-populate \ + # --source=${./data/test-source.nix} \ + # --system=server \ + ''; + minimalSystem = (import { + modules = [ + test-config + ]; + }).config.system.build.toplevel; + +in { + name = "deploy"; + + nodes = { + + server = + { config, pkgs, ... }: + + { + imports = [ test-config ]; + environment.variables = { + NIX_PATH = mkForce "nixpkgs=${}"; + }; + services.openssh.enable = true; + users.extraUsers.root.openssh.authorizedKeys.keys = [ + pubKey + ]; + virtualisation.pathsInNixDB = [ + minimalSystem + ]; + environment.systemPackages = [ pkgs.git ]; + }; + + client = + { config, pkgs, ... }: + { }; + }; + + testScript = '' + startAll; + + $server->waitForUnit("sshd"); + + $client->succeed("mkdir -p -m 700 /root/.ssh"); + $client->succeed("echo '${privKey}' > /root/.ssh/id_ed25519"); + $client->succeed("cp ${ssh-config} /root/.ssh/config"); + $client->succeed("chmod 600 /root/.ssh/id_ed25519"); + + $server->waitForUnit("network.target"); + $server->succeed("ip route show 1>&2"); + $client->waitForUnit("network.target"); + $client->succeed("${test-deploy}"); + $server->succeed("nixos-rebuild -I /var/src switch"); + + $client->shutdown; + $server->shutdown; + ''; +}) diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix index bb19f0602..e97aa16eb 100644 --- a/krebs/3modules/ci.nix +++ b/krebs/3modules/ci.nix @@ -147,7 +147,7 @@ in "dummy_secrets": "true", }, command=[ - "nix-build", "-I", "stockholm=.", "krebs/6tests", + "nix-build", "-I", "stockholm=.", "krebs/0tests", "-A", "{}".format(test) ], timeout=90001 diff --git a/krebs/6tests/data/secrets/grafana_security.nix b/krebs/6tests/data/secrets/grafana_security.nix deleted file mode 100644 index 0967ef424..000000000 --- a/krebs/6tests/data/secrets/grafana_security.nix +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/krebs/6tests/data/secrets/hashedPasswords.nix b/krebs/6tests/data/secrets/hashedPasswords.nix deleted file mode 100644 index 0967ef424..000000000 --- a/krebs/6tests/data/secrets/hashedPasswords.nix +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/krebs/6tests/data/secrets/retiolum.rsa_key.priv b/krebs/6tests/data/secrets/retiolum.rsa_key.priv deleted file mode 100644 index e69de29bb..000000000 diff --git a/krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix b/krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix deleted file mode 100644 index 963e6db8b..000000000 --- a/krebs/6tests/data/secrets/shackspace-gitlab-ci-token.nix +++ /dev/null @@ -1 +0,0 @@ -"lol" diff --git a/krebs/6tests/data/secrets/ssh.id_ed25519 b/krebs/6tests/data/secrets/ssh.id_ed25519 deleted file mode 100644 index e69de29bb..000000000 diff --git a/krebs/6tests/data/test-config.nix b/krebs/6tests/data/test-config.nix deleted file mode 100644 index f0927ddd9..000000000 --- a/krebs/6tests/data/test-config.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - - - - ]; - - krebs.hosts.minimal = { - cores = 1; - secure = false; - }; - - boot.loader.grub.enable = false; - boot.loader.systemd-boot.enable = true; - - krebs.build = { - host = config.krebs.hosts.minimal; - user = config.krebs.users.krebs; - }; -} diff --git a/krebs/6tests/data/test-source.nix b/krebs/6tests/data/test-source.nix deleted file mode 100644 index dfc6b3297..000000000 --- a/krebs/6tests/data/test-source.nix +++ /dev/null @@ -1,12 +0,0 @@ -with import ; -evalSource "" [{ - nixos-config = { - symlink.target = toString ./test-config; - }; - nixpkgs = { - symlink.target = toString ; - }; - stockholm = { - symlink.target = toString ; - }; -}] diff --git a/krebs/6tests/default.nix b/krebs/6tests/default.nix deleted file mode 100644 index c0ca00296..000000000 --- a/krebs/6tests/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -with import ; -{ ... }: - -{ - deploy = import ./deploy.nix; -} diff --git a/krebs/6tests/deploy.nix b/krebs/6tests/deploy.nix deleted file mode 100644 index 156e9239f..000000000 --- a/krebs/6tests/deploy.nix +++ /dev/null @@ -1,106 +0,0 @@ -with import ; -import ({ ... }: - -let - pkgs = import { overlays = [(import ../5pkgs)]; }; - test-config = ; - privKey = '' - -----BEGIN OPENSSH PRIVATE KEY----- - b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW - QyNTUxOQAAACD1tYD8r6Fcd7bq3Z0nvo5483nXQ8c4LFh0fcw8rOCQtQAAAJBTNHK6UzRy - ugAAAAtzc2gtZWQyNTUxOQAAACD1tYD8r6Fcd7bq3Z0nvo5483nXQ8c4LFh0fcw8rOCQtQ - AAAECK2ZlEIofZyGbh7rXlUq5lUsUyotamtp9QrlvoS3qgePW1gPyvoVx3turdnSe+jnjz - eddDxzgsWHR9zDys4JC1AAAACWxhc3NAbW9ycwECAwQ= - -----END OPENSSH PRIVATE KEY----- - ''; - pubKey = '' - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPW1gPyvoVx3turdnSe+jnjzeddDxzgsWHR9zDys4JC1 - ''; - - ssh-config = pkgs.writeText "ssh-config" '' - Host server - StrictHostKeyChecking no - UserKnownHostsFile=/dev/null - ''; - - populate-source = { - nixos-config = { - symlink.target = test-config; - type = "symlink"; - }; - nixpkgs = { - symlink.target = ; - type = "symlink"; - }; - stockholm = { - symlink.target = ; - type = "symlink"; - }; - }; - - test-deploy = pkgs.writeDash "test-deploy" '' - cd ${} - export NIX_PATH=stockholm=${}:nixpkgs=${}:$NIX_PATH - exec >&2 - source=${pkgs.writeJSON "source.json" populate-source} - LOGNAME=krebs ${pkgs.populate}/bin/populate --force root@server:22/var/src/ < "$source" - # TODO: make deploy work - #LOGNAME=krebs ${pkgs.stockholm}/bin/deploy \ - # --force-populate \ - # --source=${./data/test-source.nix} \ - # --system=server \ - ''; - minimalSystem = (import { - modules = [ - test-config - ]; - }).config.system.build.toplevel; - -in { - name = "deploy"; - - nodes = { - - server = - { config, pkgs, ... }: - - { - imports = [ test-config ]; - environment.variables = { - NIX_PATH = mkForce "nixpkgs=${}"; - }; - services.openssh.enable = true; - users.extraUsers.root.openssh.authorizedKeys.keys = [ - pubKey - ]; - virtualisation.pathsInNixDB = [ - minimalSystem - ]; - environment.systemPackages = [ pkgs.git ]; - }; - - client = - { config, pkgs, ... }: - { }; - }; - - testScript = '' - startAll; - - $server->waitForUnit("sshd"); - - $client->succeed("mkdir -p -m 700 /root/.ssh"); - $client->succeed("echo '${privKey}' > /root/.ssh/id_ed25519"); - $client->succeed("cp ${ssh-config} /root/.ssh/config"); - $client->succeed("chmod 600 /root/.ssh/id_ed25519"); - - $server->waitForUnit("network.target"); - $server->succeed("ip route show 1>&2"); - $client->waitForUnit("network.target"); - $client->succeed("${test-deploy}"); - $server->succeed("nixos-rebuild -I /var/src switch"); - - $client->shutdown; - $server->shutdown; - ''; -}) diff --git a/krebs/kops.nix b/krebs/kops.nix index abd60ee5a..561b017b9 100644 --- a/krebs/kops.nix +++ b/krebs/kops.nix @@ -38,7 +38,7 @@ secrets = if test then { - file = toString ; + file = toString ; } else { pass = { diff --git a/krebs/source.nix b/krebs/source.nix index 3ee12b37f..49f464f61 100644 --- a/krebs/source.nix +++ b/krebs/source.nix @@ -14,7 +14,7 @@ in { nixos-config.symlink = "stockholm/krebs/1systems/${name}/config.nix"; secrets = getAttr builder { - buildbot.file = toString ; + buildbot.file = toString ; krebs.pass = { dir = "${getEnv "HOME"}/brain"; name = "krebs-secrets/${name}"; -- cgit v1.2.3 From ce3a38dab187cbe085f83ea92771aa47bcdf709b Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 10 May 2018 10:50:29 +0200 Subject: thesauron: init --- krebs/5pkgs/simple/thesauron/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 krebs/5pkgs/simple/thesauron/default.nix (limited to 'krebs') diff --git a/krebs/5pkgs/simple/thesauron/default.nix b/krebs/5pkgs/simple/thesauron/default.nix new file mode 100644 index 000000000..99ab2b728 --- /dev/null +++ b/krebs/5pkgs/simple/thesauron/default.nix @@ -0,0 +1,7 @@ +{ fetchgit, callPackage }: let + src = fetchgit { + url = "https://github.com/krebscode/thesauron"; + rev = "8ac22588cf2c20465e3c9348e7ce04885599c2a5"; + "sha256"= "1ivkjl235dnm5aaqqvarnxkz7zh0gvah22b0fqwlsflrcd5wmgva"; + }; +in callPackage src {} -- cgit v1.2.3 From aa1fef9f93027aaa3ee074821e82002d81dcf712 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 14 May 2018 09:36:37 +0200 Subject: nixpkgs: b50443b -> ef74caf --- krebs/kops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/kops.nix b/krebs/kops.nix index 561b017b9..add1a359c 100644 --- a/krebs/kops.nix +++ b/krebs/kops.nix @@ -13,7 +13,7 @@ krebs-source = { nixpkgs.git = { - ref = "b50443b5c4ac0f382c49352a892b9d5d970eb4e7"; + ref = "ef74cafd3e5914fdadd08bf20303328d72d65d6c"; url = https://github.com/NixOS/nixpkgs; }; stockholm.file = toString ../.; -- cgit v1.2.3 From 942375e134fd70876ee81924ff83955473883cad Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 16 May 2018 17:26:19 +0200 Subject: l: add blue.r --- krebs/3modules/lass/default.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'krebs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index aa0b43f9a..029a0a890 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -671,6 +671,36 @@ with import ; ssh.privkey.path = ; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKd/6eCR8yxC14zBJLIQgVa4Zbutv5yr2S8k08ztmBpp"; }; + blue = { + cores = 1; + nets = { + retiolum = { + ip4.addr = "10.243.0.77"; + ip6.addr = "42:0:0:0:0:0:0:77"; + aliases = [ + "blue.r" + ]; + tinc.pubkey = '' + -----BEGIN PUBLIC KEY----- + MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA28b+WMiQaWbwUPcJlacd + QwyX4PvVm9WItPmmNy+RE2y0Mf04LxZ7RLm5+e0wPuhXXQyhZ06CNd6tjeaKfXUc + sNeC1Vjuh1hsyYJLR5Xf/YRNJQKoaHjbkXGt+rSK7PPuCcsUPOSZSEAgHYVvcFzM + wWE4kTDcBZeISB4+yLmPIZXhnDImRRMEurFNRiocoMmEIu/zyYVq8rnlTl972Agu + PMGo1HqVxCouEWstRvtX5tJmV8yruRbH4tADAruLXErLLwUAx/AYDNRjY1TYYetJ + RoaxejmZVVIvR+hWaDLkHZO89+to6wS5IVChs1anFxMNN6Chq2v8Bb2Nyy1oG/H/ + HzXxj1Rn7CN9es5Wl0UX4h9Zg+hfspoI75lQ509GLusYOyFwgmFF02eMpxgHBiWm + khSJzPkFdYJKUKaZI0nQEGGsFJOe/Se5jj70x3Q5XEuUoQqyahAqwQIYh6uwhbuP + 49RBPHpE+ry6smhUPLTitrRsqeBU4RZRNsUAYyCbwyAH1i+K3Q5PSovgPtlHVr2N + w+VZCzsrtOY2fxXw0e+mncrx/Qga62s4m6a/dyukA5RytA9f6bBsvSTqr7/EQTs6 + ZEBoPudk7ULNEbfjmJtBkeG7wKIlpgzVg/JaCAwMuSgVjrpIHrZmjOVvmOwB8W6J + Ch/o7chVljAwW4JmyRnhZbMCAwEAAQ== + -----END PUBLIC KEY----- + ''; + }; + }; + ssh.privkey.path = ; + ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILSBxtPf8yJfzzI7/iYpoRSc/TT+zYmE/HM9XWS3MZlv"; + }; }; users = { lass = { -- cgit v1.2.3 From 7722df3587a51a08fcd0ad8e367c97106d938432 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 16 May 2018 20:19:08 +0200 Subject: l: add lass-blue user --- krebs/3modules/lass/default.nix | 9 +++++++-- krebs/3modules/lass/ssh/blue.rsa | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 krebs/3modules/lass/ssh/blue.rsa (limited to 'krebs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 029a0a890..4aae26e13 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -702,8 +702,13 @@ with import ; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILSBxtPf8yJfzzI7/iYpoRSc/TT+zYmE/HM9XWS3MZlv"; }; }; - users = { - lass = { + users = rec { + lass = lass-mors; + lass-blue = { + mail = "lass@blue.r"; + pubkey = builtins.readFile ./ssh/blue.rsa; + }; + lass-mors = { mail = "lass@mors.r"; pubkey = builtins.readFile ./ssh/mors.rsa; pgp.pubkeys.default = builtins.readFile ./pgp/mors.pgp; diff --git a/krebs/3modules/lass/ssh/blue.rsa b/krebs/3modules/lass/ssh/blue.rsa new file mode 100644 index 000000000..c0bf9b817 --- /dev/null +++ b/krebs/3modules/lass/ssh/blue.rsa @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEZgHYLHcHSumTUr0jTu1XmmwRMqjLHYvo4AYuEg1QdishDbwU5KCqarSf7sxLTjeBgOugHP/oJZclin+e9GTQ5hlBEtc26IVQqirNVD1BCZrt/y5ok0p8p+2Rhzh89kfRI6Etp+8cPbot4h3Vg6tY57icKn3visaMdH0cI2pAQbPWwSY+cmyXU5cfcFC8ahcZpEgth4ycC5yM/qdHxZek2wN+58ApgjEjuvTD6y4iXqdWmqHVoGaeNV7OFiiKVaYoJND1igHLNw2VEQR5aPsmc8gadBtGIQb43YqObNBDWwMjvozmQVFPycMmMTDwA1n+IWxvwz34KEzyw5jQShUTCRDji4vK58WfC16fPLbW+ohCe+9Yyg7TRdjDFA5jTA3rFM7tZS8EhpLgyHupNi1GbUVmeyhqTdWp+H66u5zTzC5Q/PYOk1M0D/X/C6dXyIcB4lLr9mDTGvS1aOZVZJuDF4pLyI2oZzaySALjcofCJyNpBBUtUXHsiT4VNuJExl4XEXjvQKnPKojEzpTsK1rm/ZSa3vBCv0gBbjQ8uU1q86ODIDy35q2GQvsLMkAbduBLeA9m1EdZXLYComSfVLalArw3Q+4vd/FHhoOicVkrwIzcPiYg9uQZm2NrjiBkYlWCdXTFc49ghIDrPXLnwwWqPuZcs430u6Somk8XzuRZBC7ZDdjbiS5D8vQkDThQrmmFPRs+bp1N9VkC+LaBtFnbFaYARF6i2yFUD9YNSEEu2r14u+KGlg5P7ndIkE+BhAOIp4XcHejVFWfvKvYpMRZ4LDVkPIJdmZ4gIIfGbdBNMv1zRsX6O0NOhiEP1pNYb+HdY5R2YYIvtxn1sC/TrjoN3ELAQA9YBszHEaYjvmqHh08/CWCEpgHIagCccYdSzbtM9GsoAcePL4E7kqSZxIfbNjrYQEBEQbu16pj7bMxVhH8QaouOdjiioqr2tBr5HwA05HP1poGProOzsmJxdph7pb4hJ1P+OEeuwTRIVLudYYl6iBajGW2IdsUo+xGANpuPBpQyB4RajJ4XcXP8K3xVY6x7DfH3DwKfCFAc6KzyADa2xw7/uwBRi2HOyKazkPe5ESYLWY29krqH2tO+IYkgm5tAEkf79j4R9aCeZe/HyjPDlSPZ2NwAZpWKJFkBTveiwoe2noZSAeVKrcblFN5ic0or+ci+CSbmctce8mbqB7QHEJJh5flLDzBMIuh4eroH/Dp5MBbDqxu/T8yCCRHFz70KXpaIFSGlSIebTRt1Om9+CWTgTp95cM0HrAhZDnN/W9FRdAFsA/IjEJ2Eh3tHpdvFZ3XgIq52MrHJdopQo7KUoOVhJiFCo5L0PcKNRVpMbcCKVk1i9k8jqyM9AVgwGrnijiaafUaFmBIlC/U2FZZ+KRtIyDcIRrnGGKE7DEyhBQ9YavxpOFDDSXuC5aPjMNcSGydGArtDd5+5Yp0YraY0oe6UTuzypsxdI8W6IbePryvEeOXG5b/6YayC2sq+7wRconaa9DU= lass@blue -- cgit v1.2.3 From e437f49a1b604f92d875a1209b4e4f9f5b46c893 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 17 May 2018 18:54:51 +0200 Subject: l: add blue.pgp --- krebs/3modules/lass/default.nix | 1 + krebs/3modules/lass/pgp/blue.pgp | 51 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 krebs/3modules/lass/pgp/blue.pgp (limited to 'krebs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 4aae26e13..e921b1ec4 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -707,6 +707,7 @@ with import ; lass-blue = { mail = "lass@blue.r"; pubkey = builtins.readFile ./ssh/blue.rsa; + pgp.pubkeys.default = builtins.readFile ./pgp/blue.pgp; }; lass-mors = { mail = "lass@mors.r"; diff --git a/krebs/3modules/lass/pgp/blue.pgp b/krebs/3modules/lass/pgp/blue.pgp new file mode 100644 index 000000000..e7a1ac0e1 --- /dev/null +++ b/krebs/3modules/lass/pgp/blue.pgp @@ -0,0 +1,51 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFr9fAEBEACz2E2E7uBulVBBtPmk9IR2yB+uAWSe8Hi7vNiGc1Dbs40jzWuy +AqouqyC5xnVw66+cQaYOsgXiwencmu/cFEV2x2uRLDVh1E/fvc8yxAOizEIY0jm/ +WZ/4IWvTZLVPF3BOhM4p/HGNbdZhRc4RoljLTB34VuY1KSMhs3Vx7n3HgZzdbD7D +itUFU4oY5CnkQp4yl1Htat08cZmbD51VTZB1hDw2Uea+VuMQ/ImRtTqW+Ss4xyPA +DwUE/vRM3CKwBvcjbNL3uUqc5dtZuvruuFeK3ScmdNLytcgXqJzLlwuzHmSt/Tnc +DQZWKGiHnMvrAOkMEvsmiKhboWSAq4sRUPhISqZ7MSvPfhaH5Gcmhi+hL8FZhGY0 +qF7MNLHoimw6MBV6FIIA0vCDn2p5Vwc7L+LqLjWqAvxdfVoeUJjUWbWWNNWg4Tw7 +9e7rAR86e4AvhCZRubRn1aOfKGF5vg/El98OeIwBFQHpr7uznKfjmAEpoGveV+vG +amptMCBAr4Hw76U708XWOQkZ2GDY9cfdxUllhAmmPrNQ/OcT2b4x0xKvMi4nA5G8 +PBOFErkS61zNxsHgpFe2isG+VDqYLfeQhOdB101Qn6IHw3KxyW85CwImUpdRLMUi +0wtcA7M5GB94HRZ8qW6LtFBjwqm2NGudB0alfIWIq7KuRMXus3sJKQ2gDQARAQAB +tBlsYXNzQGJsdWUuciA8bGFzc0BibHVlLnI+iQJOBBMBCAA4FiEEuOpc8JA44Pd5 +NXyK8UJeZkL6H7wFAlr9fAECGwMF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cVVMHsWr5WNmo0s2C7+j+iIMPEOwhRs +ZFj74cztyOF/dGeCv9ycW29g+ejXaPpFOYQz0A9bBdkEdTGWhQ== +=D854 +-----END PGP PUBLIC KEY BLOCK----- -- cgit v1.2.3 From f0ff6a61e6ae48c893b8d8a56d80a3d03f13dc35 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 20 May 2018 10:21:40 +0200 Subject: l: lass is now lass@blue.r --- krebs/3modules/lass/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index e921b1ec4..fd74983fa 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -703,7 +703,7 @@ with import ; }; }; users = rec { - lass = lass-mors; + lass = lass-blue; lass-blue = { mail = "lass@blue.r"; pubkey = builtins.readFile ./ssh/blue.rsa; -- cgit v1.2.3 From 1b11ee3fc59c5f935b18f73bfc2868a67fba9be2 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 25 May 2018 22:36:35 +0200 Subject: ejabberd: use utillinux's flock --- krebs/5pkgs/simple/ejabberd/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/ejabberd/default.nix b/krebs/5pkgs/simple/ejabberd/default.nix index 9e4ed3df5..b4ab13b43 100644 --- a/krebs/5pkgs/simple/ejabberd/default.nix +++ b/krebs/5pkgs/simple/ejabberd/default.nix @@ -1,6 +1,5 @@ { stdenv, writeScriptBin, lib, fetchurl, git, cacert , erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, utillinux, procps, gd -, flock , withMysql ? false , withPgsql ? false , withSqlite ? false, sqlite @@ -106,7 +105,7 @@ in stdenv.mkDerivation rec { postInstall = '' sed -i \ -e '2iexport PATH=${ctlpath}:$PATH' \ - -e 's,\(^ *FLOCK=\).*,\1${flock}/bin/flock,' \ + -e 's,\(^ *FLOCK=\).*,\1${utillinux}/bin/flock,' \ -e 's,\(^ *JOT=\).*,\1,' \ -e 's,\(^ *CONNLOCKDIR=\).*,\1/var/lock/ejabberdctl,' \ $out/sbin/ejabberdctl -- cgit v1.2.3 From 0bc240981ba485e144befd69be9861dfa218ad44 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 31 May 2018 19:27:06 +0200 Subject: tv kaepsele: RIP --- krebs/3modules/tv/default.nix | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index 8dbdc7e65..71670d336 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -32,30 +32,6 @@ with import ; ssh.privkey.path = ; ssh.pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDP9JS2Nyjx4Pn+/4MrFi1EvBBYVKkGm2Q4lhgaAiSuiGLol53OSsL2KIo01mbcSSBWow9QpQpn8KDoRnT2aMLDrdTFqL20ztDLOXmtrSsz3flgCjmW4f6uOaoZF0RNjAybd1coqwSJ7EINugwoqOsg1zzN2qeIGKYFvqFIKibYFAnQ8hcksmkvPdIO5O8CbdIiP9sZSrSDp0ZyLK2T0PML2jensVZOeqSPulQDFqLsbmavpVLkpDjdzzPRwbZWNB4++YeipbYNOkX4GR1EB4wMZ93IbBV7kpJtib2Zb2AnUf7UW37hxWBjILdstj9ClwNOQggn8kD9ub7YxBzH1dz0Xd8a0mPOAWIDJz9MypXgFRc3vdvPB/W1I4Se0CLbgOkORun9CkgijKr9oEY8JNt8HFd6viZcAaQxOyIm6PNHZTnHfdSc7bIBS2n3e3IZBv0fTd77knGLXg402aTuu2bm/kxsKivxsILXIaGbeXe4ceN3Fynr3FzSM2bUkzHb0mAHu1BQ9YaX0xzCwjVueA5nzGls7ODSFkXsiBfg2FvMN/sTLFca6tnwyqcnD6nujoiS5+BxjDWPgnZYqCaW3B/IkpTsRMsX6QrfhOFcsP8qlJ2Cp82orWoDK/D0vZ9pdzAc6PFGga0RofuJKY2yiq+SRZ7/e9E6VncIVCYZ1OfN0Q=="; }; - kaepsele = { - external = true; - nets = { - retiolum = { - ip4.addr = "10.243.166.2"; - ip6.addr = "42:b9d:6660:d07c:2bb7:4e91:1a01:2e7d"; - aliases = [ - "kaepsele.r" - ]; - tinc.pubkey = '' - -----BEGIN RSA PUBLIC KEY----- - MIIBCgKCAQEA4+kDaKhCBNlpHqRCA2R6c4UEFk0OaiPwHvjmBBjpihTJVyffIEYm - QFZ5ZNkaVumSOAgKk9ygppO9WsNasl1ag+IRWik9oupdzEkNjgvOMBVJGhcwGZGF - 6UEY5sdA1n0qg74og5BGSiXUBiaahVM0rAfCNk8gV3qrot5kWJMQLb9BKabJ56eb - JrgWepxuVaw3BoEhz6uusuvw5i1IF382L8R11hlvyefifXONFOAUjCrCr0bCb4uK - ZZcRUU35pbHLDXXTOrOarOO1tuVGu85VXo3S1sLaaouHYjhTVT8bxqbwcNhxBXYf - ONLv0f7G5XwecgUNbE6ZTfjV5PQKaww3lwIDAQAB - -----END RSA PUBLIC KEY----- - ''; - }; - }; - ssh.privkey.path = ; - ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC5Wr36T0MmB8pnSO5/pw9/Dfe5+IMgVHOhm6EUa55jj"; - }; mu = { ci = true; cores = 2; -- cgit v1.2.3 From 113f4bf82e3b4fad14b13cceeeff2319d1f1270a Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 4 Jun 2018 06:29:37 +0200 Subject: add lass-mors to authorizedKeys --- krebs/2configs/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/2configs/default.nix b/krebs/2configs/default.nix index 90aaa254a..7b970923d 100644 --- a/krebs/2configs/default.nix +++ b/krebs/2configs/default.nix @@ -50,6 +50,7 @@ with import ; users.extraUsers.root.openssh.authorizedKeys.keys = [ # TODO config.krebs.users.lass.pubkey + config.krebs.users.lass-mors.pubkey config.krebs.users.makefu.pubkey # TODO HARDER: config.krebs.users.makefu-omo.pubkey -- cgit v1.2.3 From 680e063c0fe208da326eaa8fe01c9c712e8e04db Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 4 Jun 2018 12:55:49 +0200 Subject: kops -> krops --- krebs/kops.nix | 64 -------------------------------------------------------- krebs/krops.nix | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ krebs/source.nix | 2 +- 3 files changed, 64 insertions(+), 65 deletions(-) delete mode 100644 krebs/kops.nix create mode 100644 krebs/krops.nix (limited to 'krebs') diff --git a/krebs/kops.nix b/krebs/kops.nix deleted file mode 100644 index add1a359c..000000000 --- a/krebs/kops.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ name }: rec { - - kops = (import {}).fetchgit { - url = https://cgit.krebsco.de/kops/; - rev = "e89cf20d4310070a877c2e24a287659546b561c9"; - sha256 = "0wg8d80sxa46z4i7ir79sci2hwmv3qskzqdg0si64p6vazy8vckb"; - }; - - lib = import "${kops}/lib"; - - # TODO document why pkgs should be used like this - pkgs = import "${kops}/pkgs" {}; - - krebs-source = { - nixpkgs.git = { - ref = "ef74cafd3e5914fdadd08bf20303328d72d65d6c"; - url = https://github.com/NixOS/nixpkgs; - }; - stockholm.file = toString ../.; - stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" '' - set -efu - cd $HOME/stockholm - V=$(${pkgs.coreutils}/bin/date +%y.%m) - if test -d .git; then - V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty) - case $V in (*-dirty) - V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)} - esac - fi - printf %s "$V" - ''); - }; - - source ={ test }: lib.evalSource [ - krebs-source - { - nixos-config.symlink = "stockholm/krebs/1systems/${name}/config.nix"; - secrets = - if test - then { - file = toString ; - } - else { - pass = { - dir = "${lib.getEnv "HOME"}/brain"; - name = "krebs-secrets/${name}"; - }; - } - ; - } - ]; - - # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) - deploy = pkgs.kops.writeDeploy "${name}-deploy" { - source = source { test = false; }; - target = "root@${name}/var/src"; - }; - - # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test) - test = pkgs.kops.writeTest "${name}-test" { - source = source { test = true; }; - target = "${lib.getEnv "HOME"}/tmp/${name}-kops-test-src"; - }; -} diff --git a/krebs/krops.nix b/krebs/krops.nix new file mode 100644 index 000000000..03bcdc83e --- /dev/null +++ b/krebs/krops.nix @@ -0,0 +1,63 @@ +{ name }: rec { + + krops = builtins.fetchGit { + url = https://cgit.krebsco.de/krops/; + rev = "4e466eaf05861b47365c5ef46a31a188b70f3615"; + }; + + lib = import "${krops}/lib"; + + # TODO document why pkgs should be used like this + pkgs = import "${krops}/pkgs" {}; + + krebs-source = { + nixpkgs.git = { + ref = "ef74cafd3e5914fdadd08bf20303328d72d65d6c"; + url = https://github.com/NixOS/nixpkgs; + }; + stockholm.file = toString ../.; + stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" '' + set -efu + cd $HOME/stockholm + V=$(${pkgs.coreutils}/bin/date +%y.%m) + if test -d .git; then + V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty) + case $V in (*-dirty) + V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)} + esac + fi + printf %s "$V" + ''); + }; + + source ={ test }: lib.evalSource [ + krebs-source + { + nixos-config.symlink = "stockholm/krebs/1systems/${name}/config.nix"; + secrets = + if test + then { + file = toString ; + } + else { + pass = { + dir = "${lib.getEnv "HOME"}/brain"; + name = "krebs-secrets/${name}"; + }; + } + ; + } + ]; + + # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) + deploy = pkgs.krops.writeDeploy "${name}-deploy" { + source = source { test = false; }; + target = "root@${name}/var/src"; + }; + + # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test) + test = pkgs.krops.writeTest "${name}-test" { + source = source { test = true; }; + target = "${lib.getEnv "HOME"}/tmp/${name}-krops-test-src"; + }; +} diff --git a/krebs/source.nix b/krebs/source.nix index 49f464f61..2aaa27b2b 100644 --- a/krebs/source.nix +++ b/krebs/source.nix @@ -22,7 +22,7 @@ in }; stockholm.file = toString ; stockholm-version.pipe = "${pkgs.stockholm}/bin/get-version"; - nixpkgs = (import ./kops.nix { name = ""; }).krebs-source.nixpkgs; + nixpkgs = (import ./krops.nix { name = ""; }).krebs-source.nixpkgs; } override ] -- cgit v1.2.3 From 90774818a3fc1428ecb044843e544452346c464a Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 4 Jun 2018 14:05:14 +0200 Subject: nixpkgs: ef74caf -> 7295e17 --- krebs/krops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/krops.nix b/krebs/krops.nix index 03bcdc83e..97cd6a939 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -12,7 +12,7 @@ krebs-source = { nixpkgs.git = { - ref = "ef74cafd3e5914fdadd08bf20303328d72d65d6c"; + ref = "7295e175bf6c6e8aa54f1b4d99256ee95d13d385"; url = https://github.com/NixOS/nixpkgs; }; stockholm.file = toString ../.; -- cgit v1.2.3 From 16d306c784ce586cc72ff24f2ab65f6431f9c5d5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 May 2018 08:27:12 +0200 Subject: ci: build steps dynamically, cleanup --- krebs/1systems/hotdog/config.nix | 3 +- krebs/2configs/buildbot-all.nix | 9 -- krebs/2configs/buildbot-krebs.nix | 12 --- krebs/2configs/buildbot-stockholm.nix | 178 +++++++++++++++++++++++++++++++ krebs/3modules/ci.nix | 192 ---------------------------------- krebs/3modules/default.nix | 1 - 6 files changed, 179 insertions(+), 216 deletions(-) delete mode 100644 krebs/2configs/buildbot-all.nix delete mode 100644 krebs/2configs/buildbot-krebs.nix create mode 100644 krebs/2configs/buildbot-stockholm.nix delete mode 100644 krebs/3modules/ci.nix (limited to 'krebs') diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index 662e094d1..dc13b03a8 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -9,7 +9,7 @@ - + @@ -20,6 +20,5 @@ boot.isContainer = true; networking.useDHCP = false; - krebs.ci.stockholmSrc = "http://cgit.prism.r/stockholm"; environment.variables.NIX_REMOTE = "daemon"; } diff --git a/krebs/2configs/buildbot-all.nix b/krebs/2configs/buildbot-all.nix deleted file mode 100644 index d85cde175..000000000 --- a/krebs/2configs/buildbot-all.nix +++ /dev/null @@ -1,9 +0,0 @@ -with import ; -{ lib, config, pkgs, ... }: -{ - networking.firewall.allowedTCPPorts = [ 80 8010 9989 ]; - krebs.ci.enable = true; - krebs.ci.treeStableTimer = 1; - krebs.ci.hosts = filter (getAttr "ci") (attrValues config.krebs.hosts); -} - diff --git a/krebs/2configs/buildbot-krebs.nix b/krebs/2configs/buildbot-krebs.nix deleted file mode 100644 index a09b3b98b..000000000 --- a/krebs/2configs/buildbot-krebs.nix +++ /dev/null @@ -1,12 +0,0 @@ -with import ; -{ lib, config, pkgs, ... }: -{ - imports = [ - - ]; - - networking.firewall.allowedTCPPorts = [ 80 8010 9989 ]; - krebs.ci.enable = true; - krebs.ci.treeStableTimer = 120; - krebs.ci.hosts = [ config.krebs.build.host ]; -} diff --git a/krebs/2configs/buildbot-stockholm.nix b/krebs/2configs/buildbot-stockholm.nix new file mode 100644 index 000000000..04b1c999f --- /dev/null +++ b/krebs/2configs/buildbot-stockholm.nix @@ -0,0 +1,178 @@ +{ config, pkgs, ... }: with import ; + +let + + hostname = config.networking.hostName; + +in +{ + networking.firewall.allowedTCPPorts = [ 80 ]; + services.nginx = { + enable = true; + virtualHosts.build = { + serverAliases = [ "build.${hostname}.r" ]; + locations."/".extraConfig = '' + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_pass http://127.0.0.1:${toString config.krebs.buildbot.master.web.port}; + ''; + }; + }; + + krebs.buildbot.master = { + slaves = { + testslave = "lasspass"; + }; + change_source.stockholm = '' + stockholm_repo = 'http://cgit.prism.r/stockholm' + cs.append( + changes.GitPoller( + stockholm_repo, + workdir='stockholm-poller', branches=True, + project='stockholm', + pollinterval=10 + ) + ) + ''; + scheduler = { + auto-scheduler = '' + sched.append( + schedulers.SingleBranchScheduler( + change_filter=util.ChangeFilter(branch_re=".*"), + treeStableTimer=60, + name="build-all-branches", + builderNames=[ + "hosts", + ] + ) + ) + ''; + force-scheduler = '' + sched.append( + schedulers.ForceScheduler( + name="hosts", + builderNames=[ + "hosts", + ] + ) + ) + ''; + }; + builder_pre = '' + # prepare grab_repo step for stockholm + grab_repo = steps.Git( + repourl=stockholm_repo, + mode='full', + ) + ''; + builder = { + hosts = '' + from buildbot import interfaces + from buildbot.steps.shell import ShellCommand + + class StepToStartMoreSteps(ShellCommand): + def __init__(self, **kwargs): + ShellCommand.__init__(self, **kwargs) + + def addBuildSteps(self, steps_factories): + for sf in steps_factories: + step = interfaces.IBuildStepFactory(sf).buildStep() + step.setBuild(self.build) + step.setBuildSlave(self.build.slavebuilder.slave) + step_status = self.build.build_status.addStepWithName(step.name) + step.setStepStatus(step_status) + self.build.steps.append(step) + + def start(self): + props = self.build.getProperties() + hosts = json.loads(props.getProperty('hosts_json')) + for host in hosts: + user = hosts[host]['owner'] + + self.addBuildSteps([steps.ShellCommand( + name=str(host), + env={ + "NIX_PATH": "secrets=/var/src/stockholm/null:stockholm=./:/var/src", + "NIX_REMOTE": "daemon", + "dummy_secrets": "true", + }, + command=[ + "nix-shell", "-I", "stockholm=.", "--run", " ".join(["test", + "--user={}".format(user), + "--system={}".format(host), + "--force-populate", + "--target=$LOGNAME@${config.krebs.build.host.name}$HOME/{}".format(user), + ]) + ], + timeout=90001, + workdir='build', # TODO figure out why we need this? + )]) + + ShellCommand.start(self) + + + f = util.BuildFactory() + f.addStep(grab_repo) + + f.addStep(steps.SetPropertyFromCommand( + env={ + "NIX_PATH": "secrets=/var/src/stockholm/null:stockholm=./:/var/src", + "NIX_REMOTE": "daemon", + }, + name="get_hosts", + command=["nix-instantiate", "--json", "--strict", "--eval", "-E", """ + with import {}; + let + eval-config = cfg: + import { + modules = [ + (import cfg) + ]; + } + ; + + system = eval-config ./krebs/1systems/hotdog/config.nix; # TODO put a better config here + + ci-systems = lib.filterAttrs (_: v: v.ci) system.config.krebs.hosts; + + filtered-attrs = lib.mapAttrs ( n: v: { + owner = v.owner.name; + }) ci-systems; + + in filtered-attrs + """], + property="hosts_json" + )) + f.addStep(StepToStartMoreSteps(command=["echo"])) # TODO remove dummy command from here + + bu.append( + util.BuilderConfig( + name="hosts", + slavenames=slavenames, + factory=f + ) + ) + ''; + }; + enable = true; + web.enable = true; + irc = { + enable = true; + nick = "build|${hostname}"; + server = "irc.r"; + channels = [ "noise" "xxx" ]; + allowForce = true; + }; + extraConfig = '' + c['buildbotURL'] = "http://build.${hostname}.r/" + ''; + }; + + krebs.buildbot.slave = { + enable = true; + masterhost = "localhost"; + username = "testslave"; + password = "lasspass"; + packages = with pkgs; [ gnumake jq nix populate ]; + }; +} diff --git a/krebs/3modules/ci.nix b/krebs/3modules/ci.nix deleted file mode 100644 index e97aa16eb..000000000 --- a/krebs/3modules/ci.nix +++ /dev/null @@ -1,192 +0,0 @@ -{ config, pkgs, ... }: -with import ; -let - cfg = config.krebs.ci; - - hostname = config.networking.hostName; -in -{ - options.krebs.ci = { - enable = mkEnableOption "krebs continous integration"; - stockholmSrc = mkOption { - type = types.str; - default = "http://cgit.${hostname}.r/stockholm"; - }; - treeStableTimer = mkOption { - type = types.int; - default = 10; - description = "how long to wait until we test changes (in minutes)"; - }; - hosts = mkOption { - type = types.listOf types.host; - default = []; - description = '' - List of hosts that should be build - ''; - }; - tests = mkOption { - type = types.listOf types.str; - default = []; - description = '' - List of tests that should be build - ''; - }; - }; - - config = mkIf cfg.enable { - services.nginx = { - enable = true; - virtualHosts.build = { - serverAliases = [ "build.${hostname}.r" ]; - locations."/".extraConfig = '' - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_pass http://127.0.0.1:${toString config.krebs.buildbot.master.web.port}; - ''; - }; - }; - - krebs.buildbot.master = { - slaves = { - testslave = "lasspass"; - }; - change_source.stockholm = '' - stockholm_repo = '${cfg.stockholmSrc}' - cs.append( - changes.GitPoller( - stockholm_repo, - workdir='stockholm-poller', branches=True, - project='stockholm', - pollinterval=10 - ) - ) - ''; - scheduler = { - build-scheduler = '' - sched.append( - schedulers.SingleBranchScheduler( - change_filter=util.ChangeFilter(branch_re=".*"), - treeStableTimer=${toString cfg.treeStableTimer}*60, - name="build-all-branches", - builderNames=[ - ${optionalString (cfg.hosts != []) ''"hosts",''} - ${optionalString (cfg.tests != []) ''"tests",''} - ] - ) - ) - ''; - force-scheduler = '' - sched.append( - schedulers.ForceScheduler( - name="force", - builderNames=[ - ${optionalString (cfg.hosts != []) ''"hosts",''} - ${optionalString (cfg.tests != []) ''"tests",''} - ] - ) - ) - ''; - }; - builder_pre = '' - # prepare grab_repo step for stockholm - grab_repo = steps.Git( - repourl=stockholm_repo, - mode='full' - ) - - # prepare addShell function - def addShell(factory,**kwargs): - factory.addStep(steps.ShellCommand(**kwargs)) - ''; - builder = { - hosts = mkIf (cfg.hosts != []) '' - f = util.BuildFactory() - f.addStep(grab_repo) - - def build_host(user, host): - addShell(f, - name="{}".format(host), - env={ - "NIX_PATH": "secrets=/var/src/stockholm/null:/var/src", - "NIX_REMOTE": "daemon", - "dummy_secrets": "true", - }, - command=[ - "nix-shell", "-I", "stockholm=.", "--run", " ".join(["test", - "--user={}".format(user), - "--system={}".format(host), - "--force-populate", - "--target=$LOGNAME@${config.krebs.build.host.name}$HOME/{}".format(user), - ]) - ], - timeout=90001 - ) - - ${concatMapStringsSep "\n" (host: - "build_host(\"${host.owner.name}\", \"${host.name}\")" - ) cfg.hosts} - - bu.append( - util.BuilderConfig( - name="hosts", - slavenames=slavenames, - factory=f - ) - ) - ''; - tests = mkIf (cfg.tests != []) '' - f = util.BuildFactory() - f.addStep(grab_repo) - - def run_test(test): - addShell(f, - name="{}".format(test), - env={ - "NIX_PATH": "secrets=/var/src/stockholm/null:/var/src", - "NIX_REMOTE": "daemon", - "dummy_secrets": "true", - }, - command=[ - "nix-build", "-I", "stockholm=.", "krebs/0tests", - "-A", "{}".format(test) - ], - timeout=90001 - ) - - ${concatMapStringsSep "\n" (test: - "run_test(\"${test}\")" - ) cfg.tests} - - bu.append( - util.BuilderConfig( - name="tests", - slavenames=slavenames, - factory=f - ) - ) - ''; - }; - enable = true; - web.enable = true; - irc = { - enable = true; - nick = "build|${hostname}"; - server = "irc.r"; - channels = [ "xxx" "noise" ]; - allowForce = true; - }; - extraConfig = '' - c['buildbotURL'] = "http://build.${hostname}.r/" - ''; - }; - - krebs.buildbot.slave = { - enable = true; - masterhost = "localhost"; - username = "testslave"; - password = "lasspass"; - packages = with pkgs; [ gnumake jq nix populate ]; - }; - - }; -} diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 6fe01e466..afc96e9ee 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -13,7 +13,6 @@ let ./buildbot/master.nix ./buildbot/slave.nix ./build.nix - ./ci.nix ./current.nix ./exim.nix ./exim-retiolum.nix -- cgit v1.2.3 From c9615eed5383a7b896e3be2c9b56f9c48135677f Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 8 Jun 2018 04:53:53 +0200 Subject: Reaktor plugins: remove wiki-todo --- krebs/2configs/reaktor-krebs.nix | 7 ------- krebs/5pkgs/simple/Reaktor/plugins.nix | 20 -------------------- 2 files changed, 27 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix index 6b17b457d..f1e6e2b17 100644 --- a/krebs/2configs/reaktor-krebs.nix +++ b/krebs/2configs/reaktor-krebs.nix @@ -13,13 +13,6 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - wiki-todo-add - wiki-todo-done - wiki-todo-show ]; }; - services.nginx.virtualHosts."lassul.us".locations."/wiki-todo".extraConfig = '' - default_type "text/plain"; - alias /var/lib/Reaktor/state/wiki-todo; - ''; } diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index f3b771190..52e080625 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -141,25 +141,5 @@ rec { ''; }); - wiki-todo-add = buildSimpleReaktorPlugin "wiki-todo-add" { - pattern = "^wiki-todo: (?P.*)$$"; - script = pkgs.writeDash "wiki-todo-add" '' - echo "$*" >> wiki-todo - echo "added todo. check on http://lassul.us/wiki-todo" - ''; - }; - wiki-todo-done = buildSimpleReaktorPlugin "wiki-todo-done" { - pattern = "^wiki-done: (?P.*)$$"; - script = pkgs.writeDash "wiki-todo-done" '' - ${pkgs.gnugrep}/bin/grep -Fvxe "$*" wiki-todo > wiki-todo.tmp - ${pkgs.coreutils}/bin/mv wiki-todo.tmp wiki-todo - echo "thank you for resolving todo: $*" - ''; - }; - wiki-todo-show = buildSimpleReaktorPlugin "wiki-todo" { - pattern = "^wiki-show$"; - script = pkgs.writeDash "wiki-show" '' - ${pkgs.coreutils}/bin/cat wiki-todo - ''; }; } -- cgit v1.2.3 From 3f2b46087481b79281901302896e903261ec71a5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 8 Jun 2018 04:56:25 +0200 Subject: Reaktor plugins: add todo plugin generator --- krebs/5pkgs/simple/Reaktor/plugins.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 52e080625..c39e39799 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -141,5 +141,27 @@ rec { ''; }); + todo = name: { + add = buildSimpleReaktorPlugin "${name}-add" { + pattern = "^${name}-add: (?P.*)$$"; + script = pkgs.writeDash "${name}-add" '' + echo "$*" >> ${name}-todo + echo "added ${name} todo" + ''; + }; + delete = buildSimpleReaktorPlugin "${name}-delete" { + pattern = "^${name}-delete: (?P.*)$$"; + script = pkgs.writeDash "${name}-delete" '' + ${pkgs.gnugrep}/bin/grep -Fvxe "$*" ${name}-todo > ${name}-todo.tmp + ${pkgs.coreutils}/bin/mv ${name}-todo.tmp ${name}-todo + echo "removed ${name} todo: $*" + ''; + }; + show = buildSimpleReaktorPlugin "${name}-show" { + pattern = "^${name}-show$"; + script = pkgs.writeDash "${name}-show" '' + ${pkgs.coreutils}/bin/cat ${name}-todo + ''; + }; }; } -- cgit v1.2.3 From a9e4d55fc5c60b059fad62d5e3a2a2c135a1f69d Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 8 Jun 2018 04:56:58 +0200 Subject: reaktor: add agenda todo plugin --- krebs/2configs/reaktor-krebs.nix | 4 +++- krebs/2configs/reaktor-retiolum.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix index f1e6e2b17..fa51b84f0 100644 --- a/krebs/2configs/reaktor-krebs.nix +++ b/krebs/2configs/reaktor-krebs.nix @@ -13,6 +13,8 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - ]; + ] ++ + (attrValues (todo "agenda")) + ; }; } diff --git a/krebs/2configs/reaktor-retiolum.nix b/krebs/2configs/reaktor-retiolum.nix index 144b7d484..b32d39b7e 100644 --- a/krebs/2configs/reaktor-retiolum.nix +++ b/krebs/2configs/reaktor-retiolum.nix @@ -10,6 +10,8 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - ]; + ] ++ + (attrValues (todo "agenda")) + ; }; } -- cgit v1.2.3 From bc0cd03da463c9cf67ba47b034bbbe32d9391beb Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 8 Jun 2018 04:57:52 +0200 Subject: move Reaktor|krebs from prism to hotdog --- krebs/1systems/hotdog/config.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index dc13b03a8..18b751a7e 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -14,6 +14,7 @@ + ]; krebs.build.host = config.krebs.hosts.hotdog; -- cgit v1.2.3 From c01b6860809fb455c060e143c596590f61fc62c5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 12 Jun 2018 18:43:12 +0200 Subject: github krebscode -> krebs --- krebs/2configs/news-spam.nix | 2 +- krebs/2configs/news.nix | 4 ++-- krebs/5pkgs/simple/buildbot-classic/default.nix | 2 +- krebs/5pkgs/simple/painload/default.nix | 2 +- krebs/5pkgs/simple/repo-sync/default.nix | 2 +- krebs/5pkgs/simple/retiolum-bootstrap/default.nix | 4 ++-- krebs/5pkgs/simple/thesauron/default.nix | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/news-spam.nix b/krebs/2configs/news-spam.nix index 69c503bf9..a3f39b40e 100644 --- a/krebs/2configs/news-spam.nix +++ b/krebs/2configs/news-spam.nix @@ -94,7 +94,7 @@ [SPAM]npr_world|http://www.npr.org/rss/rss.php?id=1004|#snews [SPAM]nsa|https://www.nsa.gov/rss.xml|#snews #bullerei [SPAM]nytimes|http://rss.nytimes.com/services/xml/rss/nyt/World.xml|#snews - [SPAM]painload|https://github.com/krebscode/painload/commits/master.atom|#snews + [SPAM]painload|https://github.com/krebs/painload/commits/master.atom|#snews [SPAM]phys|http://phys.org/rss-feed/|#snews [SPAM]piraten|https://www.piratenpartei.de/feed/|#snews [SPAM]polizei_berlin|http://www.berlin.de/polizei/presse-fahndung/_rss_presse.xml|#snews diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix index 49a5e3459..6c59f4d84 100644 --- a/krebs/2configs/news.nix +++ b/krebs/2configs/news.nix @@ -8,7 +8,7 @@ ethereum|http://blog.ethereum.org/feed|#news LtU|http://lambda-the-ultimate.org/rss.xml|#news mongrel2_master|https://github.com/zedshaw/mongrel2/commits/master.atom|#news - painload|https://github.com/krebscode/painload/commits/master.atom|#news + painload|http