From 89f6ab94b48eb6ceaf4cbc19cbb235f06cc1f7a0 Mon Sep 17 00:00:00 2001
From: Felix Tenley <dev@felschr.com>
Date: Fri, 13 Mar 2020 18:45:29 +0100
Subject: [PATCH] feat: rearrange nix modules

---
 common/xmonad.nix                             |  8 --------
 desktop/default.nix                           |  9 +++++++++
 {common => desktop}/gnome.nix                 |  0
 {common => desktop}/gtk.nix                   |  0
 {common => desktop}/x11.nix                   |  0
 common/base-hardware.nix => hardware/base.nix |  4 ++++
 {common => hardware}/gpu-bumblebee.nix        |  0
 {common => hardware}/gpu-nvidia.nix           |  0
 {common => hardware}/gpu-optimus.nix          |  0
 {common => hardware}/ledger.nix               |  0
 {common => hardware}/planck.nix               |  0
 home-pc.nix                                   | 15 +++++----------
 common/system.nix => system/default.nix       |  5 +++++
 {common => system}/i18n.nix                   |  0
 {common => system}/nix.nix                    |  0
 {common => virtualisaiton}/docker.nix         |  0
 work-pc.nix                                   | 15 +++++----------
 17 files changed, 28 insertions(+), 28 deletions(-)
 delete mode 100644 common/xmonad.nix
 create mode 100644 desktop/default.nix
 rename {common => desktop}/gnome.nix (100%)
 rename {common => desktop}/gtk.nix (100%)
 rename {common => desktop}/x11.nix (100%)
 rename common/base-hardware.nix => hardware/base.nix (95%)
 rename {common => hardware}/gpu-bumblebee.nix (100%)
 rename {common => hardware}/gpu-nvidia.nix (100%)
 rename {common => hardware}/gpu-optimus.nix (100%)
 rename {common => hardware}/ledger.nix (100%)
 rename {common => hardware}/planck.nix (100%)
 rename common/system.nix => system/default.nix (92%)
 rename {common => system}/i18n.nix (100%)
 rename {common => system}/nix.nix (100%)
 rename {common => virtualisaiton}/docker.nix (100%)

diff --git a/common/xmonad.nix b/common/xmonad.nix
deleted file mode 100644
index 8322fe5..0000000
--- a/common/xmonad.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ config, pkgs, ... }:
-
-{
-  # Enable xmonad
-  services.xserver.displayManager.lightdm.enable = true;
-  services.xserver.windowManager.default = "xmonad";
-  services.xserver.windowManager.xmonad.enable = true;
-}
diff --git a/desktop/default.nix b/desktop/default.nix
new file mode 100644
index 0000000..c92657d
--- /dev/null
+++ b/desktop/default.nix
@@ -0,0 +1,9 @@
+{ config, pkgs, ... }:
+
+{
+  imports = [
+    ./x11.nix
+    ./gtk.nix
+    ./gnome.nix
+  ];
+}
diff --git a/common/gnome.nix b/desktop/gnome.nix
similarity index 100%
rename from common/gnome.nix
rename to desktop/gnome.nix
diff --git a/common/gtk.nix b/desktop/gtk.nix
similarity index 100%
rename from common/gtk.nix
rename to desktop/gtk.nix
diff --git a/common/x11.nix b/desktop/x11.nix
similarity index 100%
rename from common/x11.nix
rename to desktop/x11.nix
diff --git a/common/base-hardware.nix b/hardware/base.nix
similarity index 95%
rename from common/base-hardware.nix
rename to hardware/base.nix
index 2542cba..4042b49 100644
--- a/common/base-hardware.nix
+++ b/hardware/base.nix
@@ -1,6 +1,10 @@
 { config, pkgs, ... }:
 
 {
+  imports = [
+    ./planck.nix
+  ];
+
   boot.initrd.luks.devices = {
     root = {
       device = "/dev/disk/by-partlabel/nixos";
diff --git a/common/gpu-bumblebee.nix b/hardware/gpu-bumblebee.nix
similarity index 100%
rename from common/gpu-bumblebee.nix
rename to hardware/gpu-bumblebee.nix
diff --git a/common/gpu-nvidia.nix b/hardware/gpu-nvidia.nix
similarity index 100%
rename from common/gpu-nvidia.nix
rename to hardware/gpu-nvidia.nix
diff --git a/common/gpu-optimus.nix b/hardware/gpu-optimus.nix
similarity index 100%
rename from common/gpu-optimus.nix
rename to hardware/gpu-optimus.nix
diff --git a/common/ledger.nix b/hardware/ledger.nix
similarity index 100%
rename from common/ledger.nix
rename to hardware/ledger.nix
diff --git a/common/planck.nix b/hardware/planck.nix
similarity index 100%
rename from common/planck.nix
rename to hardware/planck.nix
diff --git a/home-pc.nix b/home-pc.nix
index 7acec39..7240cc0 100644
--- a/home-pc.nix
+++ b/home-pc.nix
@@ -4,16 +4,11 @@
   imports = [
     ./hardware-configuration.nix
     <home-manager/nixos>
-    ./common/base-hardware.nix
-    ./common/gpu-nvidia.nix
-    ./common/ledger.nix
-    ./common/planck.nix
-    ./common/system.nix
-    ./common/nix.nix
-    ./common/i18n.nix
-    ./common/x11.nix
-    ./common/gtk.nix
-    ./common/gnome.nix
+    ./hardware/base.nix
+    ./hardware/gpu-nvidia.nix
+    ./hardware/ledger.nix
+    ./system
+    ./desktop
   ];
 
   nixpkgs.config.allowUnfree = true;
diff --git a/common/system.nix b/system/default.nix
similarity index 92%
rename from common/system.nix
rename to system/default.nix
index 11b281b..0351706 100644
--- a/common/system.nix
+++ b/system/default.nix
@@ -1,6 +1,11 @@
 { config, pkgs, ... }:
 
 {
+  imports = [
+    ./i18n.nix
+    ./nix.nix
+  ];
+
   environment.systemPackages = with pkgs; [
     wget
     curl
diff --git a/common/i18n.nix b/system/i18n.nix
similarity index 100%
rename from common/i18n.nix
rename to system/i18n.nix
diff --git a/common/nix.nix b/system/nix.nix
similarity index 100%
rename from common/nix.nix
rename to system/nix.nix
diff --git a/common/docker.nix b/virtualisaiton/docker.nix
similarity index 100%
rename from common/docker.nix
rename to virtualisaiton/docker.nix
diff --git a/work-pc.nix b/work-pc.nix
index ede28c4..772cf07 100644
--- a/work-pc.nix
+++ b/work-pc.nix
@@ -4,16 +4,11 @@
   imports = [
     ./hardware-configuration.nix
     <home-manager/nixos>
-    ./common/base-hardware.nix
-    ./common/gpu-bumblebee.nix
-    ./common/planck.nix
-    ./common/system.nix
-    ./common/nix.nix
-    ./common/i18n.nix
-    ./common/x11.nix
-    ./common/gtk.nix
-    ./common/gnome.nix
-    ./common/docker.nix
+    ./hardware/base.nix
+    ./hardware/gpu-bumblebee.nix
+    ./system
+    ./desktop
+    ./virtualisaiton/docker.nix
   ];
 
   nixpkgs.config.allowUnfree = true;