home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

xorg.nix (736B)


      1 { config, lib, pkgs, ... }:
      2 let
      3   inherit (lib) mkIf mkEnableOption mkDefault;
      4   cfg = config.modules.desktop.xorg;
      5 in
      6 {
      7   options = {
      8     modules.desktop.xorg = {
      9       enable = mkEnableOption "Enable Xorg desktop";
     10     };
     11   };
     12   config = mkIf cfg.enable {
     13     modules.desktop.enable = true;
     14     # Extra packages to add to the system
     15     environment.systemPackages = with pkgs; [
     16       xorg.xmessage
     17     ];
     18 
     19     services = {
     20       # Enable xserver on desktop
     21       xserver = {
     22         enable = true;
     23         enableTCP = false;
     24         libinput.enable = true;
     25         synaptics.enable = false;
     26         layout = "fr";
     27         xkbVariant = "bepo";
     28         xkbOptions = "grp:menu_toggle,grp_led:caps,compose:caps";
     29       };
     30     };
     31 
     32   };
     33 }