1
0
Fork 0

fix(nix): change notification service

This commit is contained in:
Lucas Sta Maria 2025-08-17 13:47:55 +00:00
parent 1d1804f3fc
commit d0dc106ccb
Signed by: lucas
GPG key ID: F07FB16A826E3B47
3 changed files with 40 additions and 20 deletions

View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.swaynotificationcenter;
in {
options.services.swaynotificationcenter = with lib; {
enable = lib.mkEnableOption "SwayNotificationCenter daemon";
package = lib.mkOption {
type = types.package;
default = pkgs.swaynotificationcenter;
description = "The SwayNotificationCenter package to use.";
};
};
config = lib.mkIf cfg.enable {
systemd.user.services.swaync = {
description = "SwayNotificationCenter daemon";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
after = [ "graphical-session-pre.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${cfg.package}/bin/swaync";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
environment.systemPackages = [ cfg.package ];
};
}