about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.nix6
-rw-r--r--modules/desktop/default.nix1
-rw-r--r--modules/desktop/xserver.nix32
-rw-r--r--users/fcuny/i3.nix24
4 files changed, 38 insertions, 25 deletions
diff --git a/flake.nix b/flake.nix
index 2accd12..388fb48 100644
--- a/flake.nix
+++ b/flake.nix
@@ -29,11 +29,7 @@
           home-manager.nixosModules.home-manager {
             home-manager.useGlobalPkgs = true;
             home-manager.useUserPackages = true;
-            home-manager.users.fcuny = {
-              imports = [
-                ./users/fcuny/home-manager.nix
-              ];
-            };
+            home-manager.users.fcuny = import ./users/fcuny/home-manager.nix;
           }
         ];
       };
diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix
index b2d2101..f150066 100644
--- a/modules/desktop/default.nix
+++ b/modules/desktop/default.nix
@@ -3,5 +3,6 @@
   imports = [
     ./fonts.nix
     ./sound.nix
+    ./xserver.nix
   ];
 }
diff --git a/modules/desktop/xserver.nix b/modules/desktop/xserver.nix
new file mode 100644
index 0000000..ba19c1a
--- /dev/null
+++ b/modules/desktop/xserver.nix
@@ -0,0 +1,32 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.xserver = {
+    enable = true;
+    layout = "us";
+    xkbOptions = "eurosign:e";
+    libinput.enable = true;
+
+    desktopManager = {
+      xterm.enable = false;
+    };
+
+    displayManager = {
+      lightdm.enable = true;
+      defaultSession = "none+i3";
+    };
+
+    windowManager = {
+      i3.enable = true;
+      extraPackages = with pkgs; [
+        rofi
+        i3status
+        i3lock
+        alacritty
+      ];
+    };
+  };
+
+  services.gnome.gnome-keyring.enable = true;
+  services.gvfs.enable = true;
+}
diff --git a/users/fcuny/i3.nix b/users/fcuny/i3.nix
index 3e1a626..74fefb2 100644
--- a/users/fcuny/i3.nix
+++ b/users/fcuny/i3.nix
@@ -1,24 +1,11 @@
 { config, pkgs, lib, ... }:
 
 {
-  services.xserver = {
-    enable = true;
-    layout = "us";
-    xkbOptions = "eurosign:e";
-    libinput.enable = true;
-
-    desktopManager = {
-      xterm.enable = false;
-    };
-
-    displayManager = {
-      lightdm.enable = true;
-    };
+  xsession.enable = true;
 
-    windowManager = {
-      i3.enable = true;
-    };
-  };
+  xsession.windowManager.i3 = {
+    enable = true;
+  }
 
   programs.rofi = {
     enable = true;
@@ -31,7 +18,4 @@
       combi-modi = "window,drun,ssh";
     };
   };
-
-  services.gnome.gnome-keyring.enable = true;
-  services.gvfs.enable = true;
 }