about summary refs log tree commit diff
path: root/modules/trayscale.nix
blob: 2aa1e744e30a4dbf268256ec2f393197a62d3485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, lib, pkgs, ... }:

# TODO: send to upstream
{
  meta = {
    maintainers = lib.maintainers.sefidel;
  };

  options.programs.trayscale = {
    enable = lib.mkEnableOption (lib.mdDoc "trayscale");
  };

  config = lib.mkIf config.programs.trayscale.enable {
    systemd.user.services.trayscale = {
      description = "Network manager applet";
      wantedBy = [ "graphical-session.target" ];
      partOf = [ "graphical-session.target" ];
      serviceConfig.ExecStart = "${pkgs.trayscale}/bin/trayscale";
    };
  };
}