profiles: add wm

This commit is contained in:
Bruno BELANYI 2021-05-09 11:45:23 +02:00
parent 4650c47974
commit 8c7d5cdb30
2 changed files with 24 additions and 0 deletions

View File

@ -3,5 +3,6 @@
{
imports = [
./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";
})
];
}