Files
sydnix/modules/nixos/niri.nix
Madeleine Sydney 370687f1e2 fix: Wayland fixes
- Use 144hz.
- Fix XAuthority issues.
2025-03-30 01:34:01 -06:00

36 lines
923 B
Nix

{ config, lib, pkgs, ... }@inputs:
let
cfg = config.sydnix.niri;
in {
options.sydnix.niri.enable =
lib.mkEnableOption "Niri";
config = lib.mkIf cfg.enable {
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
programs.niri = {
enable = true;
package = pkgs.niri-unstable;
};
# Necessary for e.g. screensharing.
xdg.portal = {
enable = true;
# See https://github.com/YaLTeR/niri/wiki/Important-Software#portals.
# Niri's NixOS module appears to automatically bring in
# xdg-desktop-portal-gnome and gnome-keyring.
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-wlr
];
xdgOpenUsePortal = true;
config.preferred = {
default = [ "gtk" ];
"org.freedesktop.impl.portal.Screenshot" = [ "wlr" ];
"org.freedesktop.impl.portal.ScreenCast" = [ "wlr" ];
};
};
};
}