Add initial sway module

This commit is contained in:
DashieTM 2025-02-25 21:40:41 +01:00
parent d88a6c3e4d
commit c2ca2e5b71
6 changed files with 540 additions and 259 deletions

30
modules/programs/sway.nix Normal file
View 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;
}
);
}