nichts/modules/wms/wayland/niri/module.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

2025-05-30 18:19:51 +02:00
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkForce mkIf;
inherit (lib.options) mkEnableOption;
2025-06-12 20:12:47 +02:00
inherit (config.modules.system) isGraphical;
2025-05-30 18:19:51 +02:00
cfg = config.modules.desktops.niri;
in {
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
2025-06-12 20:12:47 +02:00
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;
2025-05-26 12:23:30 +02:00
2025-06-12 20:12:47 +02:00
environment.etc."niri/config.kdl".source = ./config.kdl;
environment.systemPackages = builtins.attrValues {
inherit (pkgs) xwayland-satellite avizo;
};
2025-06-04 08:29:36 +02:00
2025-06-12 20:12:47 +02:00
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
config = {
common.default = ["*"];
hyprland.default = ["gtk"];
};
2025-06-04 08:29:36 +02:00
};
};
2025-05-30 18:19:51 +02:00
}