mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-23 20:11:27 +00:00
feat: support binds for prometheus monitoring service
This commit is contained in:
parent
dd9663b497
commit
3dbc056cc0
|
@ -6,8 +6,21 @@ in {
|
||||||
default = false;
|
default = false;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
location = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
fileSystems = lib.mkIf config.selfprivacy.useBinds {
|
||||||
|
"/var/lib/prometheus2" = {
|
||||||
|
device = "/volumes/${cfg.location}/prometheus";
|
||||||
|
options = [
|
||||||
|
"bind"
|
||||||
|
"x-systemd.required-by=prometheus.service"
|
||||||
|
"x-systemd.before=prometheus.service"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 9001;
|
port = 9001;
|
||||||
|
|
Loading…
Reference in a new issue