moved homelab modules
This commit is contained in:
17
modules/homelab/nfs.nix
Normal file
17
modules/homelab/nfs.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
nfsExports = ''
|
||||||
|
/holocron/vault *(rw,sync,no_subtree_check,no_root_squash)
|
||||||
|
/holocron/media *(ro,sync,no_subtree_check)
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# enable nfs with all exports
|
||||||
|
services.nfs = {
|
||||||
|
server = {
|
||||||
|
enable = true;
|
||||||
|
exports = nfsExports;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/homelab/smb.nix
Normal file
27
modules/homelab/smb.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
# define smb shares
|
||||||
|
let
|
||||||
|
smbShares = {
|
||||||
|
vault = {
|
||||||
|
path = "/holocron/vault";
|
||||||
|
browseable = true;
|
||||||
|
writable = true;
|
||||||
|
guestOk = false;
|
||||||
|
};
|
||||||
|
media = {
|
||||||
|
path = "/holocron/media";
|
||||||
|
browseable = true;
|
||||||
|
writable = true;
|
||||||
|
guestOk = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# enable smb with all shares
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
settings = smbShares;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
27
modules/homelab/zfs.nix
Normal file
27
modules/homelab/zfs.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
# 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";
|
||||||
|
|
||||||
|
# datasets = {
|
||||||
|
# "rpool/data" = {
|
||||||
|
# mountPoint = "/mnt/storage";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user