home: wm: add i3
This is only the basic default configuration. The full configuration will come later. I am not a fan of `wm.windowManager`, I might rename that option at some point.
This commit is contained in:
parent
ff4745e1e6
commit
ca48df5674
|
@ -14,6 +14,7 @@
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./vim
|
./vim
|
||||||
|
./wm
|
||||||
./x
|
./x
|
||||||
./xdg.nix
|
./xdg.nix
|
||||||
./zsh
|
./zsh
|
||||||
|
|
15
home/wm/default.nix
Normal file
15
home/wm/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./i3.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
15
home/wm/i3.nix
Normal file
15
home/wm/i3.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
isEnabled = config.my.home.wm.windowManager == "i3";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = lib.mkIf isEnabled {
|
||||||
|
xsession.windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
modifier = "Mod4"; # `Super` key
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue