users/services: remove script
option
This commit is contained in:
parent
058c95bb2c
commit
b13e7c38c7
|
@ -121,10 +121,8 @@ in
|
|||
after = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
|
||||
script = ''
|
||||
${pkgs.coreutils}/bin/rm -f $XDG_RUNTIME_DIR/bonsai
|
||||
exec bonsaid -t ${cfg.config.configFile}
|
||||
'';
|
||||
serviceConfig.ExecStart = "bonsaid -t ${cfg.config.configFile}";
|
||||
serviceConfig.ExecStopPost = "rm -f $XDG_RUNTIME_DIR/bonsai";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# send a test notification with:
|
||||
# - `ntfy pub "https://ntfy.uninsane.org/$(cat ~/.config/ntfy-sh/topic)" test`
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.sane.programs.ntfy-sh;
|
||||
in
|
||||
|
@ -28,10 +28,12 @@ in
|
|||
services.ntfy-sub = {
|
||||
description = "listen for push-notifications";
|
||||
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
|
||||
script = ''
|
||||
topic=$(cat ~/.config/ntfy-sh/topic)
|
||||
ntfy sub "https://ntfy.uninsane.org:2587/$topic"
|
||||
'';
|
||||
serviceConfig.ExecStart = let
|
||||
sub = pkgs.writeShellScriptBin "ntfy-sub" ''
|
||||
topic=$(cat ~/.config/ntfy-sh/topic)
|
||||
exec ntfy sub "https://ntfy.uninsane.org:2587/$topic"
|
||||
'';
|
||||
in "${sub}/bin/ntfy-sub";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -37,10 +37,6 @@ let
|
|||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
script = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
};
|
||||
|
||||
serviceConfig.ExecStart = mkOption {
|
||||
type = types.nullOr (types.coercedTo types.package toString types.str);
|
||||
|
|
Loading…
Reference in New Issue
Block a user