fix: remove wrapper

This commit is contained in:
sinavir 2024-07-19 15:31:35 +02:00
parent 675453d43a
commit 183111ea58

View file

@ -1,10 +1,10 @@
{ pkgs, config, lib, ... }:
let
cfg = config.services.signal-irc-bridge;
mkSystemdRunOptions = opts: lib.escapeShellArgs (lib.mapAttrsToList (k: v: "-p${k}=${builtins.toString v}") opts);
commonServiceOptions = {
DynamicUser = true;
User = "signal-irc-client";
Group = "nginx";
StateDirectory = "signal-cli";
RuntimeDirectory = "signal-cli";
@ -23,12 +23,6 @@ let
RuntimeDirectoryMode="0750";
StateDirectoryMode="0750";
};
signal-cli-bridge-wrapper = pkgs.writeShellApplication {
name = "signal-cli-bridge-wrapper";
text = ''
systemd-run ${mkSystemdRunOptions commonServiceOptions} --pty --pipe --unit="signal-cli-bridge" ${lib.getExe pkgs.signal-cli} --config "\''${STATE_DIRECTORY}"/signal-cli-config/ "$@"
'';
};
in {
options = {
services.signal-irc-bridge = {
@ -45,7 +39,6 @@ in {
};
config = {
nixpkgs.overlays = [
(import ./overlay.nix)
];
@ -79,7 +72,7 @@ in {
};
};
environment.systemPackages = lib.mkIf cfg.enable [
signal-cli-bridge-wrapper
pkgs.signal-cli
];
};
}