tahani: add headless niri workstation with Sunshine streaming
This commit is contained in:
39
profiles/wayland-headless.nix
Normal file
39
profiles/wayland-headless.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
services.seatd.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
programs.niri.enable = true;
|
||||
|
||||
users.users.${user}.linger = true;
|
||||
|
||||
systemd.user.services.niri-headless = {
|
||||
description = "Niri headless session";
|
||||
environment = {
|
||||
WLR_BACKENDS = "headless";
|
||||
WLR_HEADLESS_OUTPUTS = "1";
|
||||
WAYLAND_DISPLAY = "wayland-1";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.niri}/bin/niri --session";
|
||||
Restart = "always";
|
||||
RestartSec = 2;
|
||||
};
|
||||
wantedBy = ["default.target"];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user