summaryrefslogtreecommitdiff
path: root/os/srv/zzz.nix
blob: cd9a67e48ee8dcb64fb3129d73de902c305d36c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ config, lib, pkgs, ... }:
let
  cfg = config.os.srv.zzz;
in
{
  options.os.srv.zzz.enable = lib.mkEnableOption "enables the zzz rpc service";
  config = lib.mkIf cfg.enable {
    systemd.user.services.zzz-presence = {
      description = "Zenless Zone Zero Discord Rich Presence";
      wantedBy = [ "default.target" ];

      serviceConfig = {
        ExecStart = "${pkgs.python3.withPackages (ps: [ ps.pypresence ])}/bin/python3 /etc/nixos/resources/zzz.py";
        Restart = "always";
        RestartSec = "10";
      };
    };
  };
}