- Added support for open-webui and ollama-rocm in CLI packages. - Updated desktop packages to include filezilla, audacity, and freecad. - Expanded essentials with distrobox, dbus, cifs-utils, samba, and kdePackages.ksshaskpass. - Introduced niri-waybar and niri-session-manager services for improved session management. - Configured mako notifications with custom settings in the Niri environment. - Adjusted hyprpaper settings and enabled additional wallpapers. (TODO on niri. Not working ATM)
52 lines
1.7 KiB
Nix
52 lines
1.7 KiB
Nix
{ config, pkgs, username, project, ... }:
|
|
{
|
|
|
|
#To show logs of services run:
|
|
#journalctl --user-unit={service-name} --user
|
|
systemd.user.services.niri-waybar = {
|
|
description = "Waybar status bar for Niri";
|
|
|
|
# "wantedBy" replaces the [Install] section
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
# "partOf" and "after" replace the [Unit] section dependencies
|
|
partOf = [ "graphical-session.target" ];
|
|
after = [ "graphical-session.target" ];
|
|
|
|
# [Unit] configuration goes here
|
|
unitConfig = {
|
|
# This checks the environment variable to ensure we are in Niri
|
|
ConditionEnvironment = "XDG_CURRENT_DESKTOP=niri";
|
|
};
|
|
|
|
# [Service] configuration goes here
|
|
serviceConfig = {
|
|
ExecStart = "${pkgs.waybar}/bin/waybar";
|
|
Restart = "on-failure";
|
|
RestartSec = "1s";
|
|
};
|
|
};
|
|
|
|
# 2. The Niri Session Cleanup Service
|
|
# This service starts when the graphical session starts, and when it stops,
|
|
# it forcibly stops the graphical-session.target to ensure a clean state for the next login.
|
|
systemd.user.services.niri-session-manager = {
|
|
description = "Niri Session Management";
|
|
wantedBy = [ "graphical-session.target" ];
|
|
partOf = [ "graphical-session.target" ];
|
|
|
|
# Only run this cleanup logic for Niri
|
|
unitConfig.ConditionEnvironment = "XDG_CURRENT_DESKTOP=niri";
|
|
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
# A dummy command that stays alive. 'sleep infinity' is low resource.
|
|
ExecStart = "${pkgs.coreutils}/bin/sleep infinity";
|
|
|
|
# IMPORTANT: When this service stops (which happens when niri kills its children),
|
|
# it brings down the whole target.
|
|
ExecStopPost = "${pkgs.systemd}/bin/systemctl --user stop graphical-session.target";
|
|
};
|
|
};
|
|
}
|