Skip to content

Commit

Permalink
fix(stalonetray): added systemd target to run application on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Jan 4, 2025
1 parent 1e231c6 commit cb81090
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions home-manager/stalonetray.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
with lib;
{
options.services.stalonetray.wittano.enable = mkEnableOption "Custom stalonetray configuration";

config = {
config = mkIf config.services.stalonetray.wittano.enable {
systemd.user.targets.tray.Unit = rec {
Description = "System tray target";
Requires = [ "graphical-session.target" ];
After = Requires;
};

desktop.autostart.programs = [
"${pkgs.systemd}/bin/systemctl --user restart stalonetray.service"
];

services.stalonetray = {
enable = config.services.stalonetray.wittano.enable;
enable = true;
config = {
background = "#24273a";
icon_size = 28;
Expand Down

0 comments on commit cb81090

Please sign in to comment.