From 8ffce1c9f4831de11b6718626f0df11c206fa5e8 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 18:57:16 +0200 Subject: [PATCH] ma: move systems to subdir, init source --- 1systems/{darth.nix => darth/config.nix} | 0 1systems/{drop.nix => drop/config.nix} | 0 .../{fileleech.nix => fileleech/config.nix} | 0 .../{filepimp.nix => filepimp/config.nix} | 0 1systems/{gum.nix => gum/config.nix} | 0 1systems/{iso.nix => iso/config.nix} | 0 1systems/{omo.nix => omo/config.nix} | 0 1systems/{pnp.nix => pnp/config.nix} | 0 1systems/{repunit.nix => repunit/config.nix} | 0 1systems/{sdev.nix => sdev/config.nix} | 0 1systems/{shoney.nix => shoney/config.nix} | 0 1systems/{studio.nix => studio/config.nix} | 0 1systems/{tsp.nix => tsp/config.nix} | 0 1systems/{vbob.nix => vbob/config.nix} | 0 1systems/{wbob.nix => wbob/config.nix} | 0 1systems/{wry.nix => wry/config.nix} | 0 1systems/{x.nix => x/config.nix} | 0 source.nix | 29 +++++++++++++++++++ 18 files changed, 29 insertions(+) rename 1systems/{darth.nix => darth/config.nix} (100%) rename 1systems/{drop.nix => drop/config.nix} (100%) rename 1systems/{fileleech.nix => fileleech/config.nix} (100%) rename 1systems/{filepimp.nix => filepimp/config.nix} (100%) rename 1systems/{gum.nix => gum/config.nix} (100%) rename 1systems/{iso.nix => iso/config.nix} (100%) rename 1systems/{omo.nix => omo/config.nix} (100%) rename 1systems/{pnp.nix => pnp/config.nix} (100%) rename 1systems/{repunit.nix => repunit/config.nix} (100%) rename 1systems/{sdev.nix => sdev/config.nix} (100%) rename 1systems/{shoney.nix => shoney/config.nix} (100%) rename 1systems/{studio.nix => studio/config.nix} (100%) rename 1systems/{tsp.nix => tsp/config.nix} (100%) rename 1systems/{vbob.nix => vbob/config.nix} (100%) rename 1systems/{wbob.nix => wbob/config.nix} (100%) rename 1systems/{wry.nix => wry/config.nix} (100%) rename 1systems/{x.nix => x/config.nix} (100%) create mode 100644 source.nix diff --git a/1systems/darth.nix b/1systems/darth/config.nix similarity index 100% rename from 1systems/darth.nix rename to 1systems/darth/config.nix diff --git a/1systems/drop.nix b/1systems/drop/config.nix similarity index 100% rename from 1systems/drop.nix rename to 1systems/drop/config.nix diff --git a/1systems/fileleech.nix b/1systems/fileleech/config.nix similarity index 100% rename from 1systems/fileleech.nix rename to 1systems/fileleech/config.nix diff --git a/1systems/filepimp.nix b/1systems/filepimp/config.nix similarity index 100% rename from 1systems/filepimp.nix rename to 1systems/filepimp/config.nix diff --git a/1systems/gum.nix b/1systems/gum/config.nix similarity index 100% rename from 1systems/gum.nix rename to 1systems/gum/config.nix diff --git a/1systems/iso.nix b/1systems/iso/config.nix similarity index 100% rename from 1systems/iso.nix rename to 1systems/iso/config.nix diff --git a/1systems/omo.nix b/1systems/omo/config.nix similarity index 100% rename from 1systems/omo.nix rename to 1systems/omo/config.nix diff --git a/1systems/pnp.nix b/1systems/pnp/config.nix similarity index 100% rename from 1systems/pnp.nix rename to 1systems/pnp/config.nix diff --git a/1systems/repunit.nix b/1systems/repunit/config.nix similarity index 100% rename from 1systems/repunit.nix rename to 1systems/repunit/config.nix diff --git a/1systems/sdev.nix b/1systems/sdev/config.nix similarity index 100% rename from 1systems/sdev.nix rename to 1systems/sdev/config.nix diff --git a/1systems/shoney.nix b/1systems/shoney/config.nix similarity index 100% rename from 1systems/shoney.nix rename to 1systems/shoney/config.nix diff --git a/1systems/studio.nix b/1systems/studio/config.nix similarity index 100% rename from 1systems/studio.nix rename to 1systems/studio/config.nix diff --git a/1systems/tsp.nix b/1systems/tsp/config.nix similarity index 100% rename from 1systems/tsp.nix rename to 1systems/tsp/config.nix diff --git a/1systems/vbob.nix b/1systems/vbob/config.nix similarity index 100% rename from 1systems/vbob.nix rename to 1systems/vbob/config.nix diff --git a/1systems/wbob.nix b/1systems/wbob/config.nix similarity index 100% rename from 1systems/wbob.nix rename to 1systems/wbob/config.nix diff --git a/1systems/wry.nix b/1systems/wry/config.nix similarity index 100% rename from 1systems/wry.nix rename to 1systems/wry/config.nix diff --git a/1systems/x.nix b/1systems/x/config.nix similarity index 100% rename from 1systems/x.nix rename to 1systems/x/config.nix diff --git a/source.nix b/source.nix new file mode 100644 index 0000000..18733ee --- /dev/null +++ b/source.nix @@ -0,0 +1,29 @@ +with import ; +host@{ name, secure ? false, override ? {} }: let + builder = if getEnv "dummy_secrets" == "true" + then "buildbot" + else "tv"; + _file = + "/tv/1systems/${name}/source.nix"; +in + evalSource (toString _file) [ + { + nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix"; + nixpkgs.git = { + # nixos-17.03 + ref = mkDefault "94941cb0455bfc50b1bf63186cfad7136d629f78"; + url = https://github.com/NixOS/nixpkgs; + }; + secrets.file = getAttr builder { + buildbot = toString ; + tv = "/home/tv/secrets/${name}"; + }; + stockholm.file = toString ; + } + (mkIf (builder == "tv") { + secrets-common.file = "/home/tv/secrets/common"; + }) + (mkIf (builder == "tv" && secure) { + secrets-master.file = "/home/tv/secrets/master"; + }) + override + ]