home

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

i3.nix (758B)


      1 { config, lib, pkgs, ... }:
      2 
      3 with lib;
      4 let
      5   cfg = config.modules.desktop.xorg.i3;
      6 in
      7 {
      8   options = {
      9     modules.desktop.xorg.i3 = {
     10       enable = mkEnableOption "Enable i3 desktop profile";
     11     };
     12   };
     13 
     14   config = mkIf cfg.enable {
     15     # Enable xorg desktop modules if not already
     16     modules.desktop.xorg.enable = true;
     17     services = {
     18       blueman.enable = true;
     19       autorandr.enable = true;
     20       xserver = {
     21         displayManager = {
     22           defaultSession = "none+i3";
     23           lightdm.enable = true;
     24           lightdm.greeters.pantheon.enable = true;
     25         };
     26         windowManager.i3.enable = true;
     27       };
     28       dbus = {
     29         enable = true;
     30         # socketActivated = true;
     31         packages = [ pkgs.dconf ];
     32       };
     33     };
     34   };
     35 }