Browse Source

Merge common.nix and c3d2.nix to hq.nix

storage-ng
Emery Hemingway 7 months ago
parent
commit
6f8d9f7c97

+ 1
- 1
hosts/containers/lxc-template.nix View File

@@ -9,7 +9,7 @@
9 9
     [ ../../lib/lxc-container.nix
10 10
       ../../lib/shared.nix
11 11
       ../../lib/admins.nix
12
-      ../../lib/common/common.nix
12
+      ../../lib/hq.nix
13 13
       <nixpkgs/nixos/modules/profiles/minimal.nix>
14 14
     ];
15 15
 

+ 2
- 2
hosts/hydra/configuration.nix View File

@@ -6,7 +6,7 @@
6 6
     ./adc.nix
7 7
     ./hydra.nix
8 8
     ./cache.nix
9
-    ./../../lib/common/c3d2.nix
9
+    ./../../lib/hq.nix
10 10
     ./../../lib/yggdrasil.nix
11 11
   ];
12 12
 
@@ -30,7 +30,7 @@
30 30
     device = "rootfs";
31 31
   };
32 32
 
33
-  networking.hostName = "192";
33
+  networking.hostName = "hydra";
34 34
 
35 35
   networking.useHostResolvConf = true;
36 36
 

+ 1
- 1
hosts/pulsebert/configuration.nix View File

@@ -12,7 +12,7 @@ in {
12 12
     [ # Include the results of the hardware scan.
13 13
       ./hardware-configuration.nix
14 14
       ../../lib/admins.nix
15
-      ../../lib/common/common.nix
15
+      ../../lib/hq.nix
16 16
       ../../lib/users.nix
17 17
       ../../lib/mpd.nix
18 18
       ../../lib/yggdrasil.nix

+ 1
- 1
hosts/storage-ng/configuration.nix View File

@@ -8,7 +8,7 @@
8 8
   imports =
9 9
     [ # Include the results of the hardware scan.
10 10
       ./hardware-configuration.nix
11
-      ../../lib/common/c3d2.nix
11
+      ../../lib/hq.nix
12 12
       ../../lib/shared.nix
13 13
       ../../lib/users.nix
14 14
       ./ncdc.nix

+ 0
- 29
lib/common/common.nix View File

@@ -1,29 +0,0 @@
1
-{ config, pkgs, ... }:
2
-
3
-{
4
-  networking = {
5
-    nameservers = [ "172.20.72.6" "9.9.9.9" "74.82.42.42" ];
6
-  };
7
-
8
-  # add central logging
9
-  services.journalbeat = {
10
-    enable = true;
11
-    extraConfig = ''
12
-      journalbeat:
13
-        seek_position: cursor
14
-        cursor_seek_fallback: tail
15
-        write_cursor_state: true
16
-        cursor_flush_period: 5s
17
-        clean_field_names: true
18
-        convert_to_numbers: false
19
-        move_metadata_to_field: journal
20
-        default_type: journal
21
-        kernel: true
22
-      output.logstash:
23
-        # Boolean flag to enable or disable the output module.
24
-        enabled: true
25
-        hosts: ["logging.serv.zentralwerk.org:5044", "172.20.73.13:5044"]
26
-        '';
27
-  };
28
-
29
-}

lib/common/c3d2.nix → lib/hq.nix View File

@@ -1,13 +1,9 @@
1
-{ config, pkgs, ... }:
1
+{ config, ... }:
2 2
 
3 3
 {
4
-  imports = [ ./common.nix ];
5
-
6
-  users.motd = builtins.readFile ./motd;
7
-
8 4
   networking.domain = "hq.c3d2.de";
9 5
 
10
-  nix = if config.services.nix-serve.enable then
6
+  nix = if config.networking.hostName == "hydra" then
11 7
     { }
12 8
   else {
13 9
     binaryCaches = [ "https://nix-serve.hq.c3d2.de" ];
@@ -15,4 +11,5 @@
15 11
       [ "nix-serve.hq.c3d2.de:FEi9GyFkou1Ua8INaEKmuGaww9E5y3XwrNGNRfKYeLo=" ];
16 12
   };
17 13
 
14
+  users.motd = builtins.readFile ./motd;
18 15
 }

+ 1
- 0
lib/lxc-container.nix View File

@@ -4,6 +4,7 @@
4 4
   imports =
5 5
     [ <nixpkgs/nixos/modules/profiles/minimal.nix>
6 6
       <nixpkgs/nixos/modules/profiles/docker-container.nix>
7
+      ./hq.nix
7 8
     ];
8 9
   nix.useSandbox = false;
9 10
   nix.maxJobs = lib.mkDefault 1;

lib/common/motd → lib/motd View File


+ 1
- 1
secrets

@@ -1 +1 @@
1
-Subproject commit 92b0134ccb8cb97a3d9bffb471d07654101a1aed
1
+Subproject commit 812dec2ee93dc6f2f03fe764a196067f81449314

Loading…
Cancel
Save