refactor(stasis): take the package from nixpkgs
nixpkgs carries stasis 1.5.1, so the pinned input and pkgs/stasis.nix go. It ships no unit and has no NixOS module, so modules/services.nix keeps declaring one; its actions run as `sh -lc` and it spawns niri and pactl directly, hence the unit path. stasis prefers a user config over /etc and generates its own when none exists, so moonarch's is seeded into the home directory instead of only reaching /etc.
This commit is contained in:
1 parent
72af3e0cfc
commit
b1ed5d087b
6 files changed
+23
-70
No files matched your search
@@ -96,17 +96,21 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Upstream ships a unit in the Arch package but not in the tarball, so it is
|
||||
# declared here. Mirrors /usr/lib/systemd/user/stasis.service.
|
||||
# nixpkgs ships the package but no module, and the package carries no unit of
|
||||
# its own, so it is declared here. Mirrors /usr/lib/systemd/user/stasis.service.
|
||||
systemd.user.services.stasis = {
|
||||
description = "Stasis Wayland Idle Manager";
|
||||
partOf = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
# stasis runs its actions as `sh -lc <command>` and spawns niri and pactl
|
||||
# directly, all resolved against this PATH. pulseaudio is here for pactl
|
||||
# alone; it stays off systemPackages, see modules/desktop.nix.
|
||||
path = with pkgs; [ bash swaylock brightnessctl niri pulseaudio ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${lib.getExe moonarchPkgs.stasis}";
|
||||
ExecReload = "${lib.getExe moonarchPkgs.stasis} reload";
|
||||
ExecStart = "${lib.getExe pkgs.stasis}";
|
||||
ExecReload = "${lib.getExe pkgs.stasis} reload";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 2;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user