From 0503a81ee899dc4d8976636c8ef74e592fe8ad24 Mon Sep 17 00:00:00 2001
From: Matei Adriel <rafaeladriel11@gmail.com>
Date: Sun, 28 May 2023 00:41:22 +0200
Subject: [PATCH] Started to rework euporie

---
 hosts/nixos/euoprie/configuration.nix | 18 -------------
 hosts/nixos/euoprie/default.nix       | 37 +++++++++++++++++++++++----
 hosts/nixos/tethys/default.nix        | 35 ++++++-------------------
 3 files changed, 40 insertions(+), 50 deletions(-)
 delete mode 100644 hosts/nixos/euoprie/configuration.nix

diff --git a/hosts/nixos/euoprie/configuration.nix b/hosts/nixos/euoprie/configuration.nix
deleted file mode 100644
index 92a9b08..0000000
--- a/hosts/nixos/euoprie/configuration.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ pkgs, ... }: {
-  # Enable the firewall.
-  networking.firewall.enable = true;
-
-  # Set the name of this machine!
-  networking.hostName = "euporie";
-
-  # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
-  system.stateVersion = "22.11";
-
-
-  services.sourcehut = {
-    # enable = true;
-    # meta.enable = true;
-    # paste.enable = true;
-    # hub.enable = true;
-  };
-}
diff --git a/hosts/nixos/euoprie/default.nix b/hosts/nixos/euoprie/default.nix
index db4e2e5..f65d386 100644
--- a/hosts/nixos/euoprie/default.nix
+++ b/hosts/nixos/euoprie/default.nix
@@ -1,7 +1,34 @@
-{
-  privateNetwork = true;
-  hostAddress = "10.250.0.1";
-  localAddress = "10.250.0.2";
+{ inputs, outputs, lib, config, pkgs, ... }: {
+  imports = [
+    ../common/global
+    ../common/users/adrielus.nix
 
-  config = import ./configuration.nix;
+    ../common/optional/pipewire.nix
+    ../common/optional/touchpad.nix
+    ../common/optional/xserver.nix
+    ../common/optional/lightdm.nix
+    ../common/optional/steam.nix
+    ../common/optional/slambda.nix
+    ../common/optional/xdg-portal.nix
+    ../common/optional/hyprland.nix
+    ../common/optional/xmonad
+
+    ./hardware-configuration.nix
+    ./boot.nix
+  ];
+
+  # Set the name of this machine!
+  networking.hostName = "tethys";
+
+  # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
+  system.stateVersion = "22.11";
+
+  # {{{ A few ad-hoc hardware settings
+  hardware.opengl.enable = true;
+  hardware.opentabletdrivers.enable = true;
+  # }}}
+  # {{{ A few ad-hoc programs
+  programs.kdeconnect.enable = true;
+  programs.extra-container.enable = true;
+  # }}}
 }
diff --git a/hosts/nixos/tethys/default.nix b/hosts/nixos/tethys/default.nix
index 8c6d777..f65d386 100644
--- a/hosts/nixos/tethys/default.nix
+++ b/hosts/nixos/tethys/default.nix
@@ -20,34 +20,15 @@
   # Set the name of this machine!
   networking.hostName = "tethys";
 
-  # A few ad-hoc settings
-  hardware.opengl.enable = true;
-  programs.kdeconnect.enable = true;
-  programs.extra-container.enable = true;
-
   # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
   system.stateVersion = "22.11";
 
-  # Temp stuff: enable when running lunarbox
-  # services.postgresql = {
-  #   enable = true;
-  #   package = pkgs.postgresql_15;
-  #   enableTCPIP = true;
-  #   authentication = pkgs.lib.mkOverride 10 ''
-  #     local all all trust
-  #     host all all 127.0.0.1/32 trust
-  #     host all all ::1/128 trust
-  #   '';
-  #   initialScript = pkgs.writeText "backend-initScript" ''
-  #     CREATE ROLE adrielus WITH
-  #            LOGIN
-  #            SUPERUSER
-  #            INHERIT
-  #            CREATEDB
-  #            CREATEROLE
-  #            REPLICATION;
-  #     CREATE DATABASE lunarbox;
-  #     GRANT ALL PRIVILEGES ON DATABASE lunarbox TO adrielus;
-  #   '';
-  # };
+  # {{{ A few ad-hoc hardware settings
+  hardware.opengl.enable = true;
+  hardware.opentabletdrivers.enable = true;
+  # }}}
+  # {{{ A few ad-hoc programs
+  programs.kdeconnect.enable = true;
+  programs.extra-container.enable = true;
+  # }}}
 }