summary refs log tree commit diff
path: root/modules/base-server.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base-server.nix')
-rwxr-xr-xmodules/base-server.nix72
1 files changed, 43 insertions, 29 deletions
diff --git a/modules/base-server.nix b/modules/base-server.nix
index 35279e4..29949ef 100755
--- a/modules/base-server.nix
+++ b/modules/base-server.nix
@@ -1,20 +1,26 @@
-{ config, pkgs, lib, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
 
 {
-  imports =
-    [
-       ./base.nix
-       ./users/chris.nix
-    ];
+  imports = [
+    ./base.nix
+    ./users/chris.nix
+  ];
   documentation.nixos.enable = false;
   documentation.enable = false;
   documentation.info.enable = false;
   documentation.man.enable = false;
 
-  
   environment.variables.BROWSER = "echo";
 
-  nix.settings.trusted-users = [ "root" "@wheel" ];
+  nix.settings.trusted-users = [
+    "root"
+    "@wheel"
+  ];
 
   time.timeZone = lib.mkDefault "UTC";
   systemd = {
@@ -46,8 +52,8 @@
 
   systemd.services.NetworkManager-wait-online.enable = false;
   systemd.network.wait-online.enable = false;
- # systemd.services.systemd-networkd.stopIfChanged = false;
- # systemd.services.systemd-resolved.stopIfChanged = false;
+  # systemd.services.systemd-networkd.stopIfChanged = false;
+  # systemd.services.systemd-resolved.stopIfChanged = false;
   nix.settings.max-free = lib.mkDefault (1000 * 1000 * 1000);
   nix.settings.min-free = lib.mkDefault (128 * 1000 * 1000);
 
@@ -82,8 +88,15 @@
     };
 
     useDHCP = false;
-#     nameservers = [ "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ];
-    nameservers = [ "10.10.0.4" "10.10.0.5" "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ];
+    #     nameservers = [ "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ];
+    nameservers = [
+      "10.10.0.4"
+      "10.10.0.5"
+      "1.1.1.1"
+      "1.0.0.1"
+      "8.8.8.8"
+      "8.4.4.8"
+    ];
     resolvconf.enable = true;
     defaultGateway = "192.168.1.1";
   };
@@ -125,25 +138,26 @@
         positions = {
           filename = "/tmp/positions.yaml";
         };
-        clients = [{
-          url = "https://loki.regional.seian.cloud/loki/api/v1/push";
-        }];
-        scrape_configs = [{
-          job_name = "journal";
-          journal = {
-            max_age = "12h";
-            labels = {
-              job = "systemd-journal";
-              host = "${toString config.networking.hostName}";
+        clients = [ { url = "https://loki.regional.seian.cloud/loki/api/v1/push"; } ];
+        scrape_configs = [
+          {
+            job_name = "journal";
+            journal = {
+              max_age = "12h";
+              labels = {
+                job = "systemd-journal";
+                host = "${toString config.networking.hostName}";
+              };
             };
-          };
-          relabel_configs = [{
-            source_labels = [ "__journal__systemd_unit" ];
-            target_label = "unit";
-          }];
-        }];
+            relabel_configs = [
+              {
+                source_labels = [ "__journal__systemd_unit" ];
+                target_label = "unit";
+              }
+            ];
+          }
+        ];
       };
     };
   };
 }
-