nixos/modules/services/logs-share/default.nix
2024-02-02 13:45:05 +01:00

31 lines
551 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.az-logs-share;
in
{
options = {
services.az-logs-share.enable = lib.mkEnableOption "Enable mount share";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ unstable.lnav ];
fileSystems."/mnt/server_logs" = {
device = "10.7.89.108:logs";
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
"x-systemd.idle-timeout=300"
"noatime"
"nfsvers=4.0"
"ro"
];
};
};
}