From 9b1ef080e62e5010f4903704e2d7a822840a7bc5 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 16 Jul 2017 15:16:45 +0200 Subject: [PATCH] ma: move torrent secrets to source.nix --- 1systems/gum/source.nix | 1 + 1systems/x/config.nix | 1 + 1systems/x/source.nix | 1 + 2configs/torrent.nix | 5 ----- 2configs/unstable-sources.nix | 8 -------- source.nix | 10 +++++++--- 6 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 2configs/unstable-sources.nix diff --git a/1systems/gum/source.nix b/1systems/gum/source.nix index 82d42b4..b3ce743 100644 --- a/1systems/gum/source.nix +++ b/1systems/gum/source.nix @@ -1,3 +1,4 @@ import { name="gum"; + torrent = true; } diff --git a/1systems/x/config.nix b/1systems/x/config.nix index 2dd2321..80c09df 100644 --- a/1systems/x/config.nix +++ b/1systems/x/config.nix @@ -19,6 +19,7 @@ with import ; # # Testing + # # # # diff --git a/1systems/x/source.nix b/1systems/x/source.nix index 54ec3c8..6dc17b6 100644 --- a/1systems/x/source.nix +++ b/1systems/x/source.nix @@ -1,4 +1,5 @@ import { name="x"; full = true; + # torrent = true; } diff --git a/2configs/torrent.nix b/2configs/torrent.nix index 85d2e6c..d063ad3 100644 --- a/2configs/torrent.nix +++ b/2configs/torrent.nix @@ -10,11 +10,6 @@ let daemon-port = 58846; dl-dir = config.makefu.dl-dir; in { - # prepare secrets - krebs.build.source.torrent-secrets.file = - if getEnv "dummy_secrets" == "true" - then toString - else config.makefu.torrent-secrets ; users.users = { download = { diff --git a/2configs/unstable-sources.nix b/2configs/unstable-sources.nix deleted file mode 100644 index a343776..0000000 --- a/2configs/unstable-sources.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: - -{ - krebs.build.source.nixpkgs = { - url = https://github.com/makefu/nixpkgs; - rev = "15b5bbfbd1c8a55e7d9e05dd9058dc102fac04fe"; # cherry-picked collectd - }; -} diff --git a/source.nix b/source.nix index a24af4d..586b9c2 100644 --- a/source.nix +++ b/source.nix @@ -1,5 +1,5 @@ with import ; -host@{ name, secure ? false, override ? {}, full ? false }: let +host@{ name, secure ? false, override ? {}, full ? false, torrent ? false }: let builder = if getEnv "dummy_secrets" == "true" then "buildbot" else "makefu"; @@ -29,10 +29,14 @@ in buildbot = toString ; makefu = "/home/makefu/secrets/${name}"; }; + stockholm.file = toString ; } - (mkIf (builder == "makefu") { - secrets-common.file = "/home/makefu/secrets/common"; + (mkIf ( torrent ) { + torrent-secrets.file = getAttr builder { + buildbot = toString ; + makefu = "/home/makefu/secrets/torrent" ; + }; }) override ]