added: custom discord rpc

This commit is contained in:
2025-12-13 15:02:29 +00:00
parent dcbc756ac5
commit ba87100421
5 changed files with 140 additions and 5 deletions

43
modules/rsRPC/home.nix Normal file
View File

@@ -0,0 +1,43 @@
{
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";
};
};
}