add de.p1st.monitor

This commit is contained in:
Daniel Langbein 2023-10-05 19:59:40 +02:00
parent 14eb642c4f
commit 0278b5f140
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -22,6 +22,26 @@ let
];
}
)
# de-p1st-monitor is not (yet) packaged, thus we build it from PyPI
(
buildPythonPackage rec {
pname = "de.p1st.monitor";
version = "0.10.5";
# https://nixos.wiki/wiki/Packaging/Python#Fix_Missing_setup.py
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-WF/+oUQjSaQY+p+1uo2i35CciGCKrB4hn9a3m8oEXpI=";
};
propagatedBuildInputs = [
# Dependencies
pkgs.python3Packages.psutil
# Build dependencies
build
twine
];
}
)
];
in
{
@ -31,10 +51,13 @@ in
"/mnt/backup".options = [ "compress=zstd" "noatime" "commit=120" ];
};
# Install netcup-dns.
# Install de.p1st.monitor and netcup-dns Python packages.
environment.systemPackages = [
(pkgs.python3.withPackages my-python-packages)
# Dependency of de.p1st.monitor.
pkgs.smartmontools
];
# Configure netcup-dns.
# Create file `/etc/netcup-dns/netcup-dns-95191.json`.
deployment.keys."netcup-dns-95191.json" = {