summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-07-12 19:11:29 +0200
committerlassulus <lassulus@lassul.us>2017-07-12 19:11:29 +0200
commitb19ebc2abd8f383d477d35040e833cd9c05319ab (patch)
tree778a882e0faebc82360c06165b4b00726468b8aa /shared
parent5efedd139a20d71268af2afd069dbd595414650f (diff)
parentcd47613a4d8daf185f4ac0f8ef43af11985a2f65 (diff)
Merge branch 'staging/source'
Diffstat (limited to 'shared')
-rw-r--r--shared/1systems/test-all-krebs-modules/config.nix (renamed from shared/1systems/test-all-krebs-modules.nix)2
-rw-r--r--shared/1systems/test-all-krebs-modules/source.nix3
-rw-r--r--shared/1systems/test-arch/config.nix (renamed from shared/1systems/test-arch.nix)2
-rw-r--r--shared/1systems/test-arch/source.nix3
-rw-r--r--shared/1systems/test-centos6/config.nix (renamed from shared/1systems/test-centos6.nix)4
-rw-r--r--shared/1systems/test-centos6/source.nix3
-rw-r--r--shared/1systems/test-centos7.nix16
-rw-r--r--shared/1systems/test-centos7/config.nix16
-rw-r--r--shared/1systems/test-centos7/source.nix3
-rw-r--r--shared/1systems/test-failing/config.nix (renamed from shared/1systems/test-failing.nix)2
-rw-r--r--shared/1systems/test-failing/source.nix3
-rw-r--r--shared/1systems/test-minimal-deploy/config.nix (renamed from shared/1systems/test-minimal-deploy.nix)2
-rw-r--r--shared/1systems/test-minimal-deploy/source.nix3
-rw-r--r--shared/1systems/wolf/config.nix (renamed from shared/1systems/wolf.nix)35
-rw-r--r--shared/1systems/wolf/source.nix3
-rw-r--r--shared/2configs/default.nix12
-rw-r--r--shared/source.nix19
17 files changed, 80 insertions, 51 deletions
diff --git a/shared/1systems/test-all-krebs-modules.nix b/shared/1systems/test-all-krebs-modules/config.nix
index 39d7c494b..7ebcf3b50 100644
--- a/shared/1systems/test-all-krebs-modules.nix
+++ b/shared/1systems/test-all-krebs-modules/config.nix
@@ -3,7 +3,7 @@ let
en = { enable = true;};
in {
imports = [
- ../.
+ <stockholm/shared>
];
krebs = {
enable = true;
diff --git a/shared/1systems/test-all-krebs-modules/source.nix b/shared/1systems/test-all-krebs-modules/source.nix
new file mode 100644
index 000000000..58d72365f
--- /dev/null
+++ b/shared/1systems/test-all-krebs-modules/source.nix
@@ -0,0 +1,3 @@
+import <stockholm/shared/source.nix> {
+ name = "test-all-krebs-modules";
+}
diff --git a/shared/1systems/test-arch.nix b/shared/1systems/test-arch/config.nix
index a13fea425..453483d48 100644
--- a/shared/1systems/test-arch.nix
+++ b/shared/1systems/test-arch/config.nix
@@ -2,7 +2,7 @@
{
imports = [
- ../.
+ <stockholm/shared>
{
boot.loader.grub = {
device = "/dev/sda";
diff --git a/shared/1systems/test-arch/source.nix b/shared/1systems/test-arch/source.nix
new file mode 100644
index 000000000..ca2305684
--- /dev/null
+++ b/shared/1systems/test-arch/source.nix
@@ -0,0 +1,3 @@
+import <stockholm/shared/source.nix> {
+ name = "test-arch";
+}
diff --git a/shared/1systems/test-centos6.nix b/shared/1systems/test-centos6/config.nix
index ebcece383..a81ff7c51 100644
--- a/shared/1systems/test-centos6.nix
+++ b/shared/1systems/test-centos6/config.nix
@@ -7,8 +7,8 @@ let
gw = "168.235.148.1";
in {
imports = [
- ../.
- ../2configs/os-templates/CAC-CentOS-6.5-64bit.nix
+ <stockholm/shared>
+ <stockholm/shared/2configs/os-templates/CAC-CentOS-6.5-64bit.nix>
{
networking.interfaces.enp11s0.ip4 = [
{
diff --git a/shared/1systems/test-centos6/source.nix b/shared/1systems/test-centos6/source.nix
new file mode 100644
index 000000000..0c7c78ec0
--- /dev/null
+++ b/shared/1systems/test-centos6/source.nix
@@ -0,0 +1,3 @@
+import <stockholm/shared/source.nix> {
+ name = "test-centos6";
+}
diff --git a/shared/1systems/test-centos7.nix b/shared/1systems/test-centos7.nix
deleted file mode 100644
index 9ea063c9b..000000000
--- a/shared/1systems/test-centos7.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- inherit (lib) head;
-
-in {
- imports = [
- ../.
- ../2configs/os-templates/CAC-CentOS-7-64bit.nix
- ../2configs/temp/networking.nix
- ../2configs/temp/dirs.nix
- ];
-
- sound.enable = false;
- krebs.build.host = config.krebs.hosts.test-centos7;
-}
diff --git a/shared/1systems/test-centos7/config.nix b/shared/1systems/test-centos7/config.nix
new file mode 100644
index 000000000..58f99e87c
--- /dev/null
+++ b/shared/1systems/test-centos7/config.nix
@@ -0,0 +1,16 @@
+{ config, lib, pkgs, ... }:
+
+let
+ inherit (lib) head;
+
+in {
+ imports = [
+ <stockholm/shared>
+ <stockholm/shared/2configs/os-templates/CAC-CentOS-7-64bit.nix>
+ <stockholm/shared/2configs/temp/networking.nix>
+ <stockholm/shared/2configs/temp/dirs.nix>
+ ];
+
+ sound.enable = false;
+ krebs.build.host = config.krebs.hosts.test-centos7;
+}
diff --git a/shared/1systems/test-centos7/source.nix b/shared/1systems/test-centos7/source.nix
new file mode 100644
index 000000000..5144477fe
--- /dev/null
+++ b/shared/1systems/test-centos7/source.nix
@@ -0,0 +1,3 @@
+import <stockholm/shared/source.nix> {
+ name = "test-centos7";
+}
diff --git a/shared/1systems/test-failing.nix b/shared/1systems/test-failing/config.nix
index fe1c2cb65..fb6a58397 100644
--- a/shared/1systems/test-failing.nix
+++ b/shared/1systems/test-failing/config.nix
@@ -2,7 +2,7 @@
{
imports = [
- ../.
+ <stockholm/shared>
];
programs.ssh.startAgent = true;
programs.ssh.startAgent = false;
diff --git a/shared/1systems/test-failing/source.nix b/shared/1systems/test-failing/source.nix
new file mode 100644
index 000000000..3e17d0b52
--- /dev/null
+++ b/shared/1systems/test-failing/source.nix
@@ -0,0 +1,3 @@
+import <stockholm/shared/source.nix> {
+ name = "test-failing";
+}
diff --git a/shared/1systems/test-minimal-deploy.nix b/shared/1systems/test-minimal-deploy/config.nix
index bec2b38d5..eab703671 100644
--- a/shared/1systems/test-minimal-deploy.nix
+++ b/shared/1systems/test-minimal-deploy/config.nix
@@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }:
{
imports = [
- ../.
+ <stockholm/shared>
];
krebs = {
enable = true;
diff --git a/shared/1systems/test-minimal-deploy/source.nix b/shared/1systems/test-minimal-deploy/source.nix
new file mode 100644
index 000000000..2368cdd49
--- /dev/null
+++ b/shared/1systems/test-minimal-deploy/source.nix
@@ -0,0 +1,3 @@
+import <stockholm/shared/source.nix> {
+ name = "test-minimal-deploy";
+}
diff --git a/shared/1systems/wolf.nix b/shared/1systems/wolf/config.nix
index 584ee0373..636f8e822 100644
--- a/shared/1systems/wolf.nix
+++ b/shared/1systems/wolf/config.nix
@@ -4,24 +4,24 @@ let
in
{
imports = [
- ../.
+ <stockholm/shared>
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
- ../2configs/collectd-base.nix
- ../2configs/central-stats-client.nix
- ../2configs/save-diskspace.nix
-
- ../2configs/cgit-mirror.nix
- ../2configs/graphite.nix
- ../2configs/repo-sync.nix
- ../2configs/shared-buildbot.nix
-
- ../2configs/shack/worlddomination.nix
- ../2configs/shack/drivedroid.nix
- # ../2configs/shack/nix-cacher.nix
- ../2configs/shack/mqtt_sub.nix
- ../2configs/shack/muell_caller.nix
- ../2configs/shack/radioactive.nix
- ../2configs/shack/share.nix
+ <stockholm/shared/2configs/collectd-base.nix>
+ <stockholm/shared/2configs/central-stats-client.nix>
+ <stockholm/shared/2configs/save-diskspace.nix>
+
+ <stockholm/shared/2configs/cgit-mirror.nix>
+ <stockholm/shared/2configs/graphite.nix>
+ <stockholm/shared/2configs/repo-sync.nix>
+ <stockholm/shared/2configs/shared-buildbot.nix>
+
+ <stockholm/shared/2configs/shack/worlddomination.nix>
+ <stockholm/shared/2configs/shack/drivedroid.nix>
+ # <stockholm/shared/2configs/shack/nix-cacher.nix>
+ <stockholm/shared/2configs/shack/mqtt_sub.nix>
+ <stockholm/shared/2configs/shack/muell_caller.nix>
+ <stockholm/shared/2configs/shack/radioactive.nix>
+ <stockholm/shared/2configs/shack/share.nix>
];
# use your own binary cache, fallback use cache.nixos.org (which is used by
@@ -43,6 +43,7 @@ in
};
nix = {
+ # use the up to date prism cache
binaryCaches = [
"http://cache.prism.r"
"https://cache.nixos.org/"
diff --git a/shared/1systems/wolf/source.nix b/shared/1systems/wolf/source.nix
new file mode 100644
index 000000000..d2bc4952a
--- /dev/null
+++ b/shared/1systems/wolf/source.nix
@@ -0,0 +1,3 @@
+import <stockholm/shared/source.nix> {
+ name = "wolf";
+}
diff --git a/shared/2configs/default.nix b/shared/2configs/default.nix
index 398f125e4..2146f42e8 100644
--- a/shared/2configs/default.nix
+++ b/shared/2configs/default.nix
@@ -7,18 +7,6 @@ with import <stockholm/lib>;
# TODO rename shared user to "krebs"
krebs.build.user = mkDefault config.krebs.users.shared;
- krebs.build.source = let inherit (config.krebs.build) host user; in {
- nixos-config.symlink = "stockholm/${user.name}/1systems/${host.name}.nix";
- nixpkgs.git = {
- url = https://github.com/NixOS/nixpkgs;
- ref = "72c9ed78d0b1d9d5f531805ddf5bf06bfd447614"; # nixos-17.03 @ 2017-06-17
- };
- secrets.file =
- if getEnv "dummy_secrets" == "true"
- then toString <stockholm/shared/6tests/data/secrets>
- else "${getEnv "HOME"}/secrets/krebs/${host.name}";
- stockholm.file = getEnv "PWD";
- };
networking.hostName = config.krebs.build.host.name;
diff --git a/shared/source.nix b/shared/source.nix
new file mode 100644
index 000000000..8ec9fbb6f
--- /dev/null
+++ b/shared/source.nix
@@ -0,0 +1,19 @@
+with import <stockholm/lib>;
+host@{ name, secure ? false }: let
+ builder = if getEnv "dummy_secrets" == "true"
+ then "buildbot"
+ else "shared";
+ _file = <stockholm> + "/shared/1systems/${name}/source.nix";
+in
+ evalSource (toString _file) {
+ nixos-config.symlink = "stockholm/shared/1systems/${name}/config.nix";
+ secrets.file = getAttr builder {
+ buildbot = toString <stockholm/shared/6tests/data/secrets>;
+ lass = "${getEnv "HOME"}/secrets/krebs/${host.name}";
+ };
+ stockholm.file = toString <stockholm>;
+ nixpkgs.git = {
+ url = https://github.com/NixOS/nixpkgs;
+ ref = "72c9ed78d0b1d9d5f531805ddf5bf06bfd447614"; # nixos-17.03 @ 2017-06-17
+ };
+ }