summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-12-26 02:25:13 +0100
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-12-26 02:25:13 +0100
commitf374938c70940f3f9a503763931c0f512e07690b (patch)
tree3cda4735501630792e369f13f4acb564690b0ee6
parentAdd botcore-v4 to config (diff)
downloadRory-Open-Architecture-f374938c70940f3f9a503763931c0f512e07690b.tar.xz
Cleanup, add postgres base
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
-rw-r--r--flake.nix7
-rw-r--r--host/Rory-discordbots/configuration.nix7
-rw-r--r--host/Rory-postgres/configuration.nix22
-rw-r--r--modules/base-server.nix10
-rw-r--r--modules/base.nix2
5 files changed, 45 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index 6796add..6f2968a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -28,6 +28,13 @@
           inherit botcore-v4;
         };
       };
+      Rory-postgres = nixpkgs.lib.nixosSystem {
+        system = "x86_64-linux";
+        modules = [
+          ./host/Rory-postgres/configuration.nix
+          ./hardware-configuration.nix
+        ];
+      };
     };
   };
 }
\ No newline at end of file
diff --git a/host/Rory-discordbots/configuration.nix b/host/Rory-discordbots/configuration.nix
index 719d3a9..47f1265 100644
--- a/host/Rory-discordbots/configuration.nix
+++ b/host/Rory-discordbots/configuration.nix
@@ -9,7 +9,7 @@
 
   networking = {
     hostName = "Rory-discordbots";
-    networkmanager.enable = true;
+    networkmanager.enable = false;
     wireless.enable = false;
       
     firewall = {
@@ -17,6 +17,10 @@
       # allowedTCPPorts = [ ... ];
       # allowedUDPPorts = [ ... ];
     };
+    interfaces.ens18.ipv4.addresses = [ { 
+      address = "192.168.1.50";
+      prefixLength = 24;
+    } ];
   };
 
   #time.timeZone = "Europe/Brussels";
@@ -46,7 +50,6 @@
   };
 
   environment.systemPackages = with pkgs; [
-    dotnet-sdk_7
     botcore-v4.packages.x86_64-linux.default
   ];
 
diff --git a/host/Rory-postgres/configuration.nix b/host/Rory-postgres/configuration.nix
new file mode 100644
index 0000000..d224e78
--- /dev/null
+++ b/host/Rory-postgres/configuration.nix
@@ -0,0 +1,22 @@
+{ config, pkgs, lib, ... }:
+
+{
+  imports =
+    [
+      ../../modules/base-server.nix
+    ];
+
+  networking = {
+    hostName = "Rory-postgres";
+    interfaces.ens18.ipv4.addresses = [ { 
+      address = "192.168.1.3";
+      prefixLength = 24;
+    } ];
+  };
+
+  environment.systemPackages = with pkgs; [
+  ];
+
+  system.stateVersion = "22.11"; # DO NOT EDIT!
+}
+
diff --git a/modules/base-server.nix b/modules/base-server.nix
index b8eda0b..028296b 100644
--- a/modules/base-server.nix
+++ b/modules/base-server.nix
@@ -24,13 +24,21 @@
 
   networking = {
 	  hostName = lib.mkDefault "Rory-nix-base-server";
+    networkmanager.enable = false;
+    wireless.enable = false;
+    enableIPv6 = false;
     firewall = {
       enable = false;
       # allowedTCPPorts = [ ... ];
       # allowedUDPPorts = [ ... ];
     };
+
+    useDHCP = false;
+    nameservers = [ "1.1.1.1" ];
+    defaultGateway = "192.168.1.1";
   };
 
+  i18n.defaultLocale = "en_US.UTF-8";
   services = {
 	  openssh = {
       enable = true;
@@ -40,6 +48,8 @@
         '';
     };	
   };
+  security.sudo.wheelNeedsPassword = false;
+  nixpkgs.config.allowUnfree = true;
 
 
   system.stateVersion = "22.11"; # DO NOT EDIT!
diff --git a/modules/base.nix b/modules/base.nix
index 6c2d809..edfabd9 100644
--- a/modules/base.nix
+++ b/modules/base.nix
@@ -13,7 +13,7 @@
       enable = false;
       # allowedTCPPorts = [ ... ];
       # allowedUDPPorts = [ ... ];
-    };
+    };botcore-v4.packages.x86_64-linux.default
   };
 
   #time.timeZone = "Europe/Brussels";