niri: enable if isGraphical is true

This commit is contained in:
Bloxx12 2025-06-12 20:12:47 +02:00
commit cbcb45221d
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E

View file

@ -7,35 +7,39 @@
inherit (lib.modules) mkForce mkIf;
inherit (lib.options) mkEnableOption;
inherit (config.modules.system) isGraphical;
cfg = config.modules.desktops.niri;
in {
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
config = mkIf cfg.enable {
programs.niri = {
enable = true;
package = pkgs.niri;
};
# The niri module auto enables the gnome keyring,
# which is something I direly want to avoid.
services.gnome.gnome-keyring.enable = mkForce false;
# set niri's config location to /etc/niri/config.kdl.
environment.etc."niri/config.kdl".source = ./config.kdl;
config =
mkIf (cfg.enable
|| isGraphical)
{
programs.niri = {
enable = true;
package = pkgs.niri;
};
# The niri module auto enables the gnome keyring,
# which is something I direly want to avoid.
services.gnome.gnome-keyring.enable = mkForce false;
environment.systemPackages = builtins.attrValues {
inherit (pkgs) xwayland-satellite avizo;
};
environment.etc."niri/config.kdl".source = ./config.kdl;
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
config = {
common.default = ["*"];
hyprland.default = ["gtk"];
environment.systemPackages = builtins.attrValues {
inherit (pkgs) xwayland-satellite avizo;
};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
config = {
common.default = ["*"];
hyprland.default = ["gtk"];
};
};
};
};
}