mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 03:49:44 +00:00
feat(y2q): add restic rest-server
This commit is contained in:
parent
cee1c9bc5d
commit
10516f783a
1 changed files with 21 additions and 0 deletions
21
home/modules/runit/services/restic-rest-server.nix
Normal file
21
home/modules/runit/services/restic-rest-server.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
runit.services.restic-rest-server = {
|
||||
script = ''
|
||||
DATA_DIR=$HOME/services/restic-rest-server
|
||||
mkdir -p "$DATA_DIR"
|
||||
|
||||
exec ${pkgs.restic-rest-server}/bin/rest-server \
|
||||
--listen "$LISTEN_ADDR" \
|
||||
--log - \
|
||||
--no-auth \
|
||||
--path $DATA_DIR \
|
||||
--prometheus --prometheus-no-auth
|
||||
'';
|
||||
|
||||
environment = {
|
||||
LISTEN_ADDR = "127.0.0.1:9000";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue