mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
attempting to fix systemd definitions
This commit is contained in:
parent
5244e49665
commit
7594dfcbf3
1 changed files with 15 additions and 11 deletions
|
|
@ -44,14 +44,17 @@ in
|
||||||
|
|
||||||
|
|
||||||
systemd.services.electrs = {
|
systemd.services.electrs = {
|
||||||
Unit = {
|
description = "Electrs Bitcoin Indexer";
|
||||||
Description = "Electrs Bitcoin Indexer";
|
|
||||||
After = [ "network.target" "bitcoind.service" ];
|
preStart = "${pkgs.coreutils}/sleep 5";
|
||||||
Requires = [ "bitcoind.service" ];
|
script = "${pkgs.electrs}/bin/electrs";
|
||||||
};
|
scriptArgs = "--config=${conf}";
|
||||||
Service = {
|
|
||||||
ExecStartPre = "${pkgs.coreutils}/sleep 10";
|
after = [
|
||||||
ExecStart = "${pkgs.electrs}/bin/electrs --conf=${conf}";
|
"bitcoind*.service"
|
||||||
|
];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
|
||||||
User = "electrs";
|
User = "electrs";
|
||||||
Group = "bitcoin";
|
Group = "bitcoin";
|
||||||
|
|
@ -62,9 +65,10 @@ in
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 60;
|
RestartSec = 60;
|
||||||
};
|
};
|
||||||
Install = {
|
requisite = [
|
||||||
WantedBy = [ "multi-user.target" ];
|
"bitcoind*.service"
|
||||||
};
|
"network.target"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue