mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
de.p1st.monitor timer
This commit is contained in:
parent
e22978b758
commit
a5db5f870d
@ -26,12 +26,12 @@ let
|
||||
(
|
||||
buildPythonPackage rec {
|
||||
pname = "de.p1st.monitor";
|
||||
version = "0.10.5";
|
||||
version = "0.10.6";
|
||||
# https://nixos.wiki/wiki/Packaging/Python#Fix_Missing_setup.py
|
||||
format = "pyproject";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-WF/+oUQjSaQY+p+1uo2i35CciGCKrB4hn9a3m8oEXpI=";
|
||||
sha256 = "sha256-7RLDkgi/Bp5ceEHBtQQDfEAsUe6F0GzNAr5hL2J4k5o=";
|
||||
};
|
||||
propagatedBuildInputs = [
|
||||
# Dependencies
|
||||
@ -67,12 +67,12 @@ in
|
||||
group = "netcup-dns";
|
||||
};
|
||||
# Create netcup-dns daemon user.
|
||||
users.users.netcup-dns = {
|
||||
users.users."netcup-dns" = {
|
||||
isSystemUser = true;
|
||||
group = "netcup-dns";
|
||||
description = "netcup-dns daemon";
|
||||
};
|
||||
users.groups.netcup-dns = {};
|
||||
users.groups."netcup-dns" = {};
|
||||
# Create netcup-dns timer.
|
||||
systemd.timers."netcup-dns" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
@ -96,6 +96,35 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Create de.p1st.monitor timer.
|
||||
systemd.timers."de.p1st.monitor" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "de.p1st.monitor.service" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "0m";
|
||||
OnUnitInactiveSec = "3m";
|
||||
|
||||
AccuracySec = "15s";
|
||||
RandomizedDelaySec = "15s";
|
||||
};
|
||||
};
|
||||
systemd.services."de.p1st.monitor" = {
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
PrivateTmp = true;
|
||||
# `smartctl` requires root to access /dev/* devices and read their temperatures.
|
||||
User = "root";
|
||||
Nice = 19;
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${pkgs.python3.withPackages my-python-packages}/bin/de-p1st-monitor";
|
||||
};
|
||||
path = with pkgs; [
|
||||
# Provides `findmnt` binary.
|
||||
libuuid
|
||||
smartmontools
|
||||
];
|
||||
};
|
||||
|
||||
# Start Jinja-Compose project during boot.
|
||||
# To few the log, run
|
||||
# journalctl -b -u Jinja-Compose -f
|
||||
|
Loading…
Reference in New Issue
Block a user