created startup_validation services and timer
This commit is contained in:
parent
d6d39dd89c
commit
c07d09b1b3
@ -1,19 +1,38 @@
|
|||||||
{ pkgs, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
{
|
{
|
||||||
systemd = {
|
systemd = {
|
||||||
services."plex_permission" = {
|
services = {
|
||||||
description = "maintains /zfs/storage/plex permissions";
|
plex_permission = {
|
||||||
serviceConfig = {
|
description = "maintains /zfs/storage/plex permissions";
|
||||||
Type = "oneshot";
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.bash}/bin/bash ${./scripts/plex_permission.sh}";
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.bash}/bin/bash ${./scripts/plex_permission.sh}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
timers."plex_permission" = {
|
startup_validation = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
timerConfig = {
|
description = "validates startup";
|
||||||
OnBootSec = "1h";
|
serviceConfig = {
|
||||||
OnCalendar = "daily 03:00";
|
Type = "oneshot";
|
||||||
Unit = "plex_permission.service";
|
ExecStart = "${inputs.server_tools.packages.x86_64-linux.server_tools}/bin/validate_jeeves";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers = {
|
||||||
|
plex_permission = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1h";
|
||||||
|
OnCalendar = "daily 03:00";
|
||||||
|
Unit = "plex_permission.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
startup_validation = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "10min";
|
||||||
|
Unit = "startup_validation.service";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# cli
|
# cli
|
||||||
@ -43,5 +43,6 @@
|
|||||||
nix-prefetch
|
nix-prefetch
|
||||||
nix-tree
|
nix-tree
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
|
inputs.server_tools.packages.x86_64-linux.server_tools
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user