# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- { lib, config, pkgs, flakeRoot, ... }: let username = config.defaultUser or "henrov"; assetPath = "${flakeRoot}/generated/.config/swaync"; in { environment.systemPackages = [ pkgs.swaynotificationcenter ]; home-manager.users.${username} = { # Do NOT enable services.swaync — it would claim the config files # and conflict with our home.file entries below. home.file = { ".config/swaync/config.jsonc" = { text = builtins.readFile "${assetPath}/config.jsonc"; force = true; }; ".config/swaync/style.css" = { text = builtins.replaceStrings ["henrov"] [username] (builtins.readFile "${assetPath}/style.css"); force = true; }; }; }; # Autostart swaync as a systemd user service instead systemd.user.services.swaync = { description = "SwayNotificationCenter"; after = [ "graphical-session.target" ]; serviceConfig = { ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync"; Restart = "always"; Environment = [ "WAYLAND_DISPLAY=${config.environment.sessionVariables.WAYLAND_DISPLAY or "wayland-1"}" "XDG_CURRENT_DESKTOP=Hyprland" ]; }; wantedBy = [ "default.target" ]; }; }