Browse Source

Move hail into the c3d2 module

storage-ng
Emery Hemingway 2 months ago
parent
commit
654f2ecf1f

+ 1
- 2
hosts/containers/grafana/configuration.nix View File

@@ -7,13 +7,12 @@
7 7
     ../../../lib/lxc-container.nix
8 8
     ../../../lib/shared.nix
9 9
     ../../../lib/admins.nix
10
-    ../../../lib/hail.nix
11 10
   ];
12 11
 
13 12
   c3d2 = {
14 13
     isInHq = true;
15
-    mapHqHosts = true;
16 14
     hq.interface = "eth0";
15
+    enableHail = true;
17 16
   };
18 17
 
19 18
   services.openssh.enable = true;

+ 11
- 5
hosts/containers/mpd-index/configuration.nix View File

@@ -9,14 +9,20 @@
9 9
     ../../../lib/lxc-container.nix
10 10
     ../../../lib/shared.nix
11 11
     ../../../lib/admins.nix
12
-    ../../../lib/hail.nix
12
+    ../../../lib
13 13
   ];
14 14
 
15
-  environment.systemPackages = with pkgs; [
16
-    ncmpcpp
17
-  ];
15
+  c3d2 = {
16
+    isInHq = true;
17
+    enableHail = true;
18
+  };
18 19
 
19
-  fileSystems."/mnt/music" = { fsType = "nfs"; device = "172.22.99.10:/mnt/zroot/storage/rpool/Music"; };
20
+  environment.systemPackages = with pkgs; [ ncmpcpp ];
21
+
22
+  fileSystems."/mnt/music" = {
23
+    fsType = "nfs";
24
+    device = "172.22.99.10:/mnt/zroot/storage/rpool/Music";
25
+  };
20 26
 
21 27
   networking.hostName = "mpd-index";
22 28
 

+ 12
- 10
hosts/glotzbert/configuration.nix View File

@@ -6,21 +6,23 @@
6 6
 
7 7
 let
8 8
   #x11vnc-service = with pkgs; import ./x11vnc-service.nix { inherit stdenv pkgs; };
9
-in
10
-{
9
+in {
11 10
   nixpkgs.config.allowUnfree = true;
12 11
   nix = {
13 12
     useSandbox = true;
14 13
     buildCores = 2;
15 14
   };
16
-  imports =
17
-    [ # Include the results of the hardware scan.
18
-      ./hardware-configuration.nix
19
-      ../../lib/default-gateway.nix
20
-      ../../lib/hail.nix
21
-      ../../lib/hq.nix
22
-      ../../lib/yggdrasil.nix
23
-    ];
15
+  imports = [ # Include the results of the hardware scan.
16
+    ./hardware-configuration.nix
17
+    ../../lib
18
+    ../../lib/yggdrasil.nix
19
+  ];
20
+
21
+  c3d2 = {
22
+    isInHq = true;
23
+    mapHqHosts = true;
24
+    enableHail = true;
25
+  };
24 26
 
25 27
   # Use the systemd-boot EFI boot loader.
26 28
   boot.loader.systemd-boot.enable = true;

+ 11
- 12
hosts/pulsebert/configuration.nix View File

@@ -8,24 +8,23 @@ let
8 8
   ympdPort = 8080;
9 9
   mpdVhost = "mpd.hq.c3d2.de";
10 10
 in {
11
-  imports =
12
-    [ # Include the results of the hardware scan.
13
-      ./hardware-configuration.nix
14
-      ../../lib
15
-      ../../lib/admins.nix
16
-      ../../lib/hq.nix
17
-      ../../lib/users.nix
18
-      ../../lib/mpd.nix
19
-      ../../lib/yggdrasil.nix
20
-      ../../lib/hail.nix
21
-      ../../lib/emery.nix
11
+  imports = [ # Include the results of the hardware scan.
12
+    ./hardware-configuration.nix
13
+    ../../lib
14
+    ../../lib/admins.nix
15
+    ../../lib/hq.nix
16
+    ../../lib/users.nix
17
+    ../../lib/mpd.nix
18
+    ../../lib/yggdrasil.nix
19
+    ../../lib/emery.nix
22 20
     ./mpdConsole.nix
23
-    ];
21
+  ];
24 22
 
25 23
   c3d2 = {
26 24
     isInHq = true;
27 25
     mapHqHosts = true;
28 26
     hq.interface = "eno1";
27
+    enableHail = true;
29 28
   };
30 29
 
31 30
   # Use the systemd-boot EFI boot loader.

+ 17
- 1
lib/default.nix View File

@@ -55,12 +55,19 @@ in {
55 55
 
56 56
       mapHqHosts = mkOption {
57 57
         type = bool;
58
-        default = false;
58
+        default = cfg.isInHq;
59 59
         description = ''
60 60
           Whether to add all internal HQ host mappings to /etc/hosts.
61 61
         '';
62 62
       };
63 63
 
64
+      enableHail = mkOption {
65
+        type = bool;
66
+        default = false;
67
+        description =
68
+          "Whether to enable Hail continuous deployment from the local Hydra.";
69
+      };
70
+
64 71
       hq = {
65 72
 
66 73
         /* externalInterface = mkOption {
@@ -208,6 +215,15 @@ in {
208 215
       '';
209 216
     };
210 217
 
218
+    services.hail = lib.mkIf cfg.enableHail {
219
+      enable = true;
220
+      hydraJobUri =
221
+        "https://hydra.hq.c3d2.de/job/c3d2/hail/${config.networking.hostName}-activator ";
222
+      # pad the end so the URL doesn't break when systemshit puts a ; on the end
223
+      package = (import <nixpkgs-unstable> { }).haskellPackages.hail;
224
+      # Only builds > 19.09
225
+    };
226
+
211 227
   };
212 228
 
213 229
   meta.maintainers = with lib.maintainers; [ ehmry ];

+ 0
- 9
lib/hail.nix View File

@@ -1,9 +0,0 @@
1
-{ config, ... }: {
2
-
3
-  services.hail = {
4
-    enable = true;
5
-    hydraJobUri = "https://hydra.hq.c3d2.de/job/c3d2/hail/${config.networking.hostName}-activator";
6
-    # Only builds > 19.09
7
-    package = (import <nixpkgs-unstable> {}).haskellPackages.hail;
8
-  };
9
-}

Loading…
Cancel
Save