29 lines
849 B
Nix
29 lines
849 B
Nix
{ config, pkgs, lib, flakeRoot, ... }:
|
|
let
|
|
repoConf = flakeRoot + "/assets/conf/desktop/notifications/swaync/config.json";
|
|
repoStyle = flakeRoot + "/assets/conf/desktop/notifications/swaync/style.css";
|
|
in
|
|
{
|
|
home.packages = [
|
|
pkgs.swaynotificationcenter
|
|
pkgs.libnotify
|
|
];
|
|
# Ensure config directory exists in ~/.config
|
|
xdg.configFile."swaync/config.json".source = repoConf;
|
|
xdg.configFile."swaync/style.css".source = repoStyle;
|
|
# Start swaync automatically (systemd user service)
|
|
systemd.user.services.swaync = {
|
|
Unit = {
|
|
Description = "Sway Notification Center";
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
Service = {
|
|
ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync";
|
|
Restart = "always";
|
|
};
|
|
Install = {
|
|
WantedBy = [ "graphical-session.target" ];
|
|
};
|
|
};
|
|
}
|