44 lines
1.0 KiB
Nix
44 lines
1.0 KiB
Nix
{
|
|
inputs,
|
|
nix-meow,
|
|
rsRPC,
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
system,
|
|
...
|
|
}:
|
|
let
|
|
# rsRPC = pkgs.fetchFromGitHub {
|
|
# owner = "Doloro1978";
|
|
# repo = "rsRPC";
|
|
# rev = "main";
|
|
# hash = "sha256-cE9iWVYclynDGAt24Hgjd2kbSOlTraq8czTfesAQl4M=";
|
|
# };
|
|
rsRPC = inputs.rsRPC.packages.${system}.app;
|
|
detectable = pkgs.fetchurl {
|
|
url = "https://raw.githubusercontent.com/Doloro1978/arrpc/refs/heads/main/src/process/detectable.json";
|
|
hash = "sha256-RglaVHAIVXHnFL9j55r8t5S8tS7LXWZ82A2RvW1mtno=";
|
|
};
|
|
cfg = config.modules.rsRPC;
|
|
in
|
|
{
|
|
options.modules.rsRPC = {
|
|
enable = lib.mkEnableOption "quickshell configuration module";
|
|
};
|
|
config.systemd.user.services.rsRPC = lib.mkIf cfg.enable {
|
|
Unit = {
|
|
Description = "discord rpc daemon";
|
|
After = [ "hyprland-session.target" ];
|
|
};
|
|
Install = {
|
|
WantedBy = [ "default.target" ];
|
|
};
|
|
Service = {
|
|
ExecStart = "${rsRPC}/bin/rsrpc-cli -d ${detectable}";
|
|
Restart = "on-failure";
|
|
RestartSec = "5s";
|
|
};
|
|
};
|
|
}
|