profiles: add wm

This commit is contained in:
Bruno BELANYI 2021-05-09 11:45:23 +02:00
parent 12b3397a20
commit 1c2193d698
2 changed files with 24 additions and 0 deletions

View file

@ -3,5 +3,6 @@
{ {
imports = [ imports = [
./bluetooth.nix ./bluetooth.nix
./wm.nix
]; ];
} }

23
profiles/wm.nix Normal file
View file

@ -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";
})
];
}