hello,
i am using labwc and i would like it to start automatically, without using a connection manager.
with greetd no problem, but graphical-session.target does not start.
and i was thinking that with systemd would be the best approach without using something else like greetd.
what is the right way to do it? here is my labwc.nix if it helps.
{ config, lib, pkgs, inputs, username, ... }: {
programs.labwc = {
enable = true;
};
environment.loginShellInit = ''
[[ "$(tty)" == /dev/tty1 ]] && labwc
'';
systemd = {
user.targets.labwc-session = {
bindsTo = [ "graphical-session.target" ];
wants = [ "graphical-session-pre.target" ];
after = [ "graphical-session-pre.target" ];
wantedBy = ["multi-user.target"];
};
};
environment.variables = {
WLR_NO_HARDWARE_CURSORS = 1;
WLR_DRM_NO_ATOMIC = 1;
MOZ_ENABLE_WAYLAND = 1;
XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "labwc:wlroots";
SDL_VIDEODRIVER = "wayland";
NIXOS_OZONE_WL = 1;
# WLR_RENDERER = "vulkan";
# GDK_BACKEND = "wayland";
# QT_QPA_PLATFORM = "wayland";
AMD_VULKAN_ICD = "RADV";
VULKAN_DRIVER = "radv";
};
environment.systemPackages = with pkgs; [
mpvpaper
chayang
imv
wlr-randr
wl-clipboard
wtype
python3Minimal
];
programs.xwayland.enable = true;
xdg.portal = {
enable = true;
# wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
config.wlroots.default = [ "wlr" "gtk" ];
};
security.pam.loginLimits = [
{ domain = "@users"; item = "rtprio"; type = "-"; value = 1; }
];
environment.persistence."/persist/system/impermanence" = {
hideMounts = true;
users.nosirus = {
directories = [
".config/labwc"
];
};
};
systemd.services.seatd = {
enable = true;
description = "Seat management daemon";
script = "${pkgs.seatd}/bin/seatd -g wheel";
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = "1";
};
wantedBy = ["multi-user.target"];
};
}