refactor niri config and put fcitx and satellite into systemd service

This commit is contained in:
ulic-youthlic 2025-05-09 14:55:35 +08:00
parent cf70828749
commit dfe2db681d
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
7 changed files with 98 additions and 9 deletions

View file

@ -13,6 +13,9 @@ in {
extraConfig = lib.mkOption {
type = inputs.niri-flake.lib.kdl.types.kdl-document;
};
DISPLAY = lib.mkOption {
type = lib.types.str;
};
};
};
config = lib.mkMerge [
@ -21,9 +24,30 @@ in {
}
(
lib.mkIf cfg.enable {
home.sessionVariables = {
inherit (cfg) DISPLAY;
};
david.programs = {
xwayland-satellite = {
inherit (cfg) DISPLAY;
enable = true;
};
fcitx5-reload = {
enable = true;
};
};
systemd.user.services = {
"fcitx5-reload".Unit.After = ["xwayland-satellite.service"];
"xwayland-satellite".Unit.Before = ["fcitx5-reload.service"];
};
youthlic.programs.niri = {
# settings = lib.mkMerge [(import ./settings.nix args) cfg.settings];
config = (lib.toList (import ./config.nix args)) ++ (lib.toList cfg.extraConfig);
config =
(lib.toList (import ./config.nix (args
// {
inherit (cfg) DISPLAY;
})))
++ (lib.toList cfg.extraConfig);
};
david.programs.wluma.enable = true;
}