feat(de): add niri

This commit is contained in:
2026-04-25 20:58:14 +02:00
parent 13a2f51241
commit 42233d6439
8 changed files with 154 additions and 7 deletions
+34 -6
View File
@@ -1,6 +1,7 @@
{
pkgs,
lib,
config,
currentSystemDe,
...
}:
@@ -10,6 +11,31 @@ let
};
in
{
programs.niri.enable = true;
services.dbus.packages = [ pkgs.nautilus ];
services.dbus.implementation = "broker";
services.xserver.desktopManager.runXdgAutostartIfNone = true;
# For god's sake, never touch this code again, so much pain has been released on the following lines.
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = lib.mkForce [
pkgs.xdg-desktop-portal-wlr
pkgs.xdg-desktop-portal-gtk
];
config = {
niri = {
default = lib.mkForce [
"wlr"
"gtk"
];
"org.freedesktop.impl.portal.ScreenCast" = [ "wlr" ];
"org.freedesktop.impl.portal.Screenshot" = [ "wlr" ];
};
};
};
services = {
xserver.enable = true;
xserver.excludePackages = with pkgs; [
@@ -31,8 +57,15 @@ in
gnome.enable = libDe.ifGnome true;
};
gnome.gnome-keyring.enable = libDe.ifGnome true;
gnome.gnome-keyring.enable = true;
};
environment.etc."xdg/autostart/niri.desktop".text = ''
[Desktop Entry]
Name=Niri
Exec=${config.programs.niri.package}/bin/niri-session
Type=Application
X-GDM-SessionRegisters=true
'';
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
konsole
@@ -54,11 +87,6 @@ in
yelp
];
xdg = {
autostart.enable = true;
portal.enable = true;
};
programs.kdeconnect = libDe.ifNotNone {
enable = true;
package =