41 lines
1002 B
Nix
41 lines
1002 B
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}: {
|
|
imports = [
|
|
inputs.niri.nixosModules.niri
|
|
];
|
|
|
|
programs.niri.enable = true;
|
|
|
|
# Use KDE portal instead of GNOME for better KDE integration
|
|
xdg.portal = {
|
|
enable = true;
|
|
extraPortals = with pkgs; [
|
|
kdePackages.xdg-desktop-portal-kde
|
|
];
|
|
config.common.default = "kde";
|
|
};
|
|
|
|
# Use KDE polkit for authentication instead of GNOME
|
|
security.polkit.enable = true;
|
|
systemd = {
|
|
user.services.polkit-kde-authentication-agent-1 = {
|
|
description = "polkit-kde-authentication-agent-1";
|
|
wantedBy = ["graphical-session.target"];
|
|
wants = ["graphical-session.target"];
|
|
after = ["graphical-session.target"];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1";
|
|
Restart = "on-failure";
|
|
RestartSec = 1;
|
|
TimeoutStopSec = 10;
|
|
};
|
|
};
|
|
};
|
|
|
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
|
}
|