Add initial sway module
This commit is contained in:
parent
d88a6c3e4d
commit
c2ca2e5b71
6 changed files with 540 additions and 259 deletions
30
modules/programs/sway.nix
Normal file
30
modules/programs/sway.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: {
|
||||
options.mods.sway = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables sway";
|
||||
};
|
||||
config = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "sway config";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.sway.enable (
|
||||
lib.optionalAttrs (options ? wayland.windowManger) {
|
||||
wayland.windowManager.sway =
|
||||
{
|
||||
enable = true;
|
||||
}
|
||||
// config.mods.sway.config;
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue