diff --git a/profiles/default.nix b/profiles/default.nix index 30d76c2..c012eee 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -3,5 +3,6 @@ { imports = [ ./bluetooth.nix + ./wm.nix ]; } diff --git a/profiles/wm.nix b/profiles/wm.nix new file mode 100644 index 0000000..a2e9dd2 --- /dev/null +++ b/profiles/wm.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: +let + cfg = config.my.profiles.wm; +in +{ + options.my.profiles.wm = with lib; { + windowManager = mkOption { + type = with types; nullOr (enum [ "i3" ]); + default = null; + example = "i3"; + description = "Which window manager to use"; + }; + }; + + config = lib.mkMerge [ + (lib.mkIf (cfg.windowManager == "i3") { + # Enable i3 + services.xserver.windowManager.i3.enable = true; + # i3 settings + my.home.wm.windowManager = "i3"; + }) + ]; +}