From b01d6771164f64362a27188cd3a0b10fbce1a6c5 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 8 Feb 2022 09:31:18 -0800 Subject: xserver: initial configuration Enable it for the desktop. --- hosts/carmel/configuration.nix | 8 -------- modules/desktop/default.nix | 1 + modules/desktop/xserver.nix | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 modules/desktop/xserver.nix diff --git a/hosts/carmel/configuration.nix b/hosts/carmel/configuration.nix index 8f8a5fb..d892bda 100644 --- a/hosts/carmel/configuration.nix +++ b/hosts/carmel/configuration.nix @@ -34,15 +34,7 @@ keyMap = "us"; }; - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Configure keymap in X11 - services.xserver.layout = "us"; - services.xserver.xkbOptions = "eurosign:e"; - # Enable CUPS to print documents. - # Enable sound. # sound.enable = true; # hardware.pulseaudio.enable = true; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index be7eaaf..d62c75d 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -1,6 +1,7 @@ {lib, config, pkgs, ...}: { imports = [ + ./desktop.nix ./fonts.nix ]; } diff --git a/modules/desktop/xserver.nix b/modules/desktop/xserver.nix new file mode 100644 index 0000000..3ae324c --- /dev/null +++ b/modules/desktop/xserver.nix @@ -0,0 +1,24 @@ +{ pkgs, config, lib, ... }: + +{ + # Enable the X11 windowing system. + services.xserver = { + enable = true; + layout = "us"; + xkbOptions = "eurosign:e"; + + desktopManager = { + xterm.enable = false; + }; + + displayManager = { + defaultSession = "none+i3"; + lightdm.enable = true; + }; + + windowManager = { + default = "i3"; + i3.enable = true; + }; + }; +} -- cgit 1.4.1