added: custom discord rpc
This commit is contained in:
4
modules/rsRPC/default.nix
Normal file
4
modules/rsRPC/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
_: {
|
||||
home = ./home.nix;
|
||||
# nixos: ./nixos.nix;
|
||||
}
|
||||
43
modules/rsRPC/home.nix
Normal file
43
modules/rsRPC/home.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user