From 477bda8a0850836516877c74d7fc3658e4bf4d22 Mon Sep 17 00:00:00 2001 From: blake Date: Thu, 9 Oct 2025 11:38:10 -0500 Subject: [PATCH] 149 current 2025-10-09 03:59:16 25.05.20251006.20c4598 6.12.50 * --- modules/homelab/default.nix | 4 +++- modules/homelab/nfs.nix | 25 ------------------------- modules/homelab/smb.nix | 33 --------------------------------- modules/homelab/zfs.nix | 35 ----------------------------------- 4 files changed, 3 insertions(+), 94 deletions(-) delete mode 100644 modules/homelab/nfs.nix delete mode 100644 modules/homelab/smb.nix delete mode 100644 modules/homelab/zfs.nix diff --git a/modules/homelab/default.nix b/modules/homelab/default.nix index c9afb81..8fc8808 100644 --- a/modules/homelab/default.nix +++ b/modules/homelab/default.nix @@ -31,6 +31,9 @@ in imports = [ ./services + ./shares/nfs.nix + ./shares/smb.nix + ./shares/zfs.nix.nix ]; config = lib.mkIf cfg.enable { @@ -45,4 +48,3 @@ in }; }; } -} diff --git a/modules/homelab/nfs.nix b/modules/homelab/nfs.nix deleted file mode 100644 index 9d987e0..0000000 --- a/modules/homelab/nfs.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs, config, lib, ... }: - -# define nfs exports -let - cfg = config.modules.homelab.nfs; - nfs_exports = '' - /holocron/vault *(rw,sync,no_subtree_check,no_root_squash) - /holocron/media *(ro,sync,no_subtree_check) - ''; -in -{ - options.modules.homelab.nfs = { - enable = lib.mkEnableOption "enables nfs"; - }; - - config = lib.mkIf cfg.enable { - # enable nfs with all exports - services.nfs = { - server = { - enable = true; - exports = nfs_exports; - }; - }; - }; -} diff --git a/modules/homelab/smb.nix b/modules/homelab/smb.nix deleted file mode 100644 index 1eed22d..0000000 --- a/modules/homelab/smb.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ pkgs, config, lib, ... }: - -# define smb shares -let - cfg = config.modules.homelab.smb; - smb_shares = { - vault = { - path = "/holocron/vault"; - browseable = true; - writable = true; - guestOk = false; - }; - media = { - path = "/holocron/media"; - browseable = true; - writable = true; - guestOk = false; - }; - }; -in -{ - options.modules.homelab.smb = { - enable = lib.mkEnableOption "enables smb"; - }; - - config = lib.mkIf cfg.enable { - # enable smb with all shares - services.samba = { - enable = true; - settings = smb_shares; - }; - }; -} diff --git a/modules/homelab/zfs.nix b/modules/homelab/zfs.nix deleted file mode 100644 index 2ed5643..0000000 --- a/modules/homelab/zfs.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ pkgs, config, lib, ... }: - -let - cfg = config.modules.homelab.zfs; -in -{ - options.modules.homelab.zfs = { - enable = lib.mkEnableOption "enables zfs"; - }; - - config = lib.mkIf cfg.enable { - # set network host id - networking.hostId = "3e6e7055"; - - # enable zfs support - boot.kernelModules = [ "zfs" ]; - boot.supportedFilesystems = [ "zfs" ]; - - # enable smart monitoring - services.smartd.enable = true; - - # enable zfs - services.zfs = { - autoScrub.enable = true; - autoScrub.interval = "weekly"; - }; - - fileSystems."/holocron" = { - device = "holocron"; - fsType = "zfs"; - options = [ "nofail" ]; - }; - }; - -}