Move logs-share into options

This commit is contained in:
Andreas Zweili 2023-05-31 22:01:26 +02:00
parent 573e9a173e
commit c8a5e7d395
5 changed files with 25 additions and 15 deletions

View File

@ -10,6 +10,7 @@
./hunspell
./libimobiledevice
./lockscreen
./logs-share
./makemkv
./nix-direnv
./pipewire

View File

@ -1,11 +1,20 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.services.az-logs-share;
in
{
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" ];
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" ];
};
};
}

View File

@ -1,8 +1,5 @@
{ hostname }: { config, inputs, ... }:
{
imports = [
"${inputs.self}/modules/logs-share"
];
boot.initrd.availableKernelModules = [
"ata_piix"
"ohci_pci"
@ -37,6 +34,7 @@
profiles.az-desktop.enable = true;
services = {
az-logs-share.enable = true;
az-virtualbox-guest.enable = true;
az-x86.enable = true;
};

View File

@ -4,7 +4,6 @@
inputs.nixos-hardware.nixosModules.dell-precision-5530
inputs.nixos-hardware.nixosModules.common-gpu-nvidia
inputs.nixos-hardware.nixosModules.common-gpu-intel
"${inputs.self}/modules/logs-share"
"${inputs.self}/modules/restic-client-desktop"
"${inputs.self}/modules/tlp"
];
@ -60,6 +59,7 @@
};
services = {
az-logs-share.enable = true;
az-rdp.enable = true;
az-x86.enable = true;
};

View File

@ -5,7 +5,6 @@
ip = "10.7.89.150";
inherit hostname;
})
"${inputs.self}/modules/logs-share"
"${inputs.self}/modules/rclone-webdav"
(import "${inputs.self}/modules/restic-client-server" {
path = "/home/andreas";
@ -22,8 +21,11 @@
};
# Features
services.az-data-share.enable = true;
services.az-docker.enable = true;
services = {
az-data-share.enable = true;
az-docker.enable = true;
az-logs-share.enable = true;
};
# Enable dictionaries
programs = {
az-hunspell.enable = true;