2021-04-05 23:27:20 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
mkRelatedOption = description: relatedWMs:
|
|
|
|
let
|
|
|
|
isActivatedWm = wm: config.my.home.wm.windowManager == wm;
|
|
|
|
in
|
|
|
|
(lib.mkEnableOption description) // {
|
|
|
|
default = builtins.any isActivatedWm relatedWMs;
|
|
|
|
};
|
|
|
|
in
|
2021-04-02 21:03:29 +02:00
|
|
|
{
|
|
|
|
imports = [
|
2021-04-06 17:52:41 +02:00
|
|
|
./dunst.nix
|
2021-04-02 21:03:29 +02:00
|
|
|
./i3.nix
|
2021-04-04 21:28:34 +02:00
|
|
|
./i3bar.nix
|
2021-04-04 21:28:44 +02:00
|
|
|
./rofi.nix
|
2021-04-02 21:03:29 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
options.my.home.wm = with lib; {
|
|
|
|
windowManager = mkOption {
|
|
|
|
type = with types; nullOr (enum [ "i3" ]);
|
|
|
|
default = null;
|
|
|
|
example = "i3";
|
|
|
|
description = "Which window manager to use for home session";
|
|
|
|
};
|
2021-04-05 23:27:20 +02:00
|
|
|
|
2021-04-06 17:52:41 +02:00
|
|
|
dunst = {
|
|
|
|
enable = mkRelatedOption "dunst configuration" [ "i3" ];
|
|
|
|
};
|
|
|
|
|
2021-04-05 23:27:20 +02:00
|
|
|
i3bar = {
|
|
|
|
enable = mkRelatedOption "i3bar configuration" [ "i3" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
rofi = {
|
|
|
|
enable = mkRelatedOption "rofi menu" [ "i3" ];
|
|
|
|
};
|
2021-04-02 21:03:29 +02:00
|
|
|
};
|
|
|
|
}
|