Files
sydnix/modules/nixos/niri.nix
Madeleine Sydney ef9943b707 blah
2025-03-27 05:56:05 -06:00

32 lines
809 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.sydnix.niri;
in {
options.sydnix.niri.enable =
lib.mkEnableOption "Niri";
config = lib.mkIf cfg.enable {
programs.niri.enable = true;
# 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" ];
};
};
};
}