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