add let/in with aliases

This commit is contained in:
2025-10-05 13:32:18 -05:00
parent cbbbfd954f
commit fd79b29623
12 changed files with 59 additions and 36 deletions

View File

@@ -2,17 +2,18 @@
# 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";
options.modules.homelab.nfs = {
enable = lib.mkEnableOption "enables nfs";
};
config = lib.mkIf config.modules.homelab.nfs.enable {
config = lib.mkIf cfg.enable {
# enable nfs with all exports
services.nfs = {
server = {