Refactor gui module

This commit is contained in:
ulic-youthlic 2025-07-01 23:17:40 +08:00
parent edfe0e5bf9
commit e65183b4a4
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
36 changed files with 236 additions and 309 deletions

View file

@ -0,0 +1,24 @@
{
lib,
config,
...
}: let
cfg = config.david.programs.swaync;
in {
options = {
david.programs.swaync = {
enable = lib.mkEnableOption "swaync";
systemd.enable = lib.mkEnableOption "systemd service for swaync";
};
};
config = lib.mkMerge [
(lib.mkIf cfg.enable {
services.swaync = {
enable = true;
};
})
(lib.mkIf (!cfg.systemd.enable) {
systemd.user.services.swaync = lib.mkForce {};
})
];
}