From 8c7d5cdb309d82aa0b9dd4949f796b5af2c10421 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 9 May 2021 11:45:23 +0200 Subject: [PATCH] profiles: add wm --- profiles/default.nix | 1 + profiles/wm.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 profiles/wm.nix 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"; + }) + ]; +}