make sure niri homeModule use os-level package

This commit is contained in:
ulic-youthlic 2025-04-17 12:39:34 +08:00
parent 97bb957d78
commit c1dd700f20
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

View file

@ -2,10 +2,12 @@
pkgs, pkgs,
config, config,
lib, lib,
osConfig ? null,
... ...
}: }:
let let
cfg = config.youthlic.programs.niri; cfg = config.youthlic.programs.niri;
niri = osConfig.programs.niri.package;
in in
{ {
options = { options = {
@ -21,24 +23,24 @@ in
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ home.packages =
swaynotificationcenter (with pkgs; [
swaybg swaynotificationcenter
xwayland-satellite swaybg
niri-unstable xwayland-satellite
kdePackages.polkit-kde-agent-1 kdePackages.polkit-kde-agent-1
wl-clipboard wl-clipboard
cliphist cliphist
]; ])
++ [ niri ];
qt = { qt = {
enable = true; enable = true;
}; };
xdg.portal = { xdg.portal = {
configPackages = [ pkgs.niri-unstable ]; configPackages = [ niri ];
enable = true; enable = true;
extraPortals = lib.mkIf ( extraPortals = lib.mkIf (
!pkgs.niri-unstable.cargoBuildNoDefaultFeatures !niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures
|| builtins.elem "xdp-gnome-screencast" pkgs.niri-unstable.cargoBuildFeatures
) [ pkgs.xdg-desktop-portal-gnome ]; ) [ pkgs.xdg-desktop-portal-gnome ];
}; };
xdg.configFile = xdg.configFile =
@ -69,7 +71,7 @@ in
}; };
programs.niri = { programs.niri = {
config = builtins.readFile cfg.config; config = builtins.readFile cfg.config;
package = pkgs.niri-unstable; package = niri;
}; };
}; };
} }