big restructure, getting there prayers for rebuild
This commit is contained in:
@@ -25,31 +25,31 @@ in
|
||||
tailscale.enable = true;
|
||||
nvidia.enable = true;
|
||||
};
|
||||
homelab = {
|
||||
enable = true;
|
||||
fileshare = {
|
||||
zfs.enable = true;
|
||||
smb.enable = true;
|
||||
nfs.enable = true;
|
||||
};
|
||||
homelab.enable = true;
|
||||
services = {
|
||||
caddy.enable = true;
|
||||
gitea.enable = true;
|
||||
glance.enable = true;
|
||||
immich.enable = true;
|
||||
hass.enable = true;
|
||||
jellyfin.enable = true;
|
||||
audiobookshelf.enable = true;
|
||||
yacreader.enable = true;
|
||||
vaultwarden.enable = true;
|
||||
gitea.enable = true;
|
||||
glance.enable = true;
|
||||
qbittorrent.enable = true;
|
||||
immich.enable = true;
|
||||
hass.enable = true;
|
||||
zigbee2mqtt.enable = true;
|
||||
mosquitto.enable = true;
|
||||
sonarr.enable = true;
|
||||
radarr.enable = true;
|
||||
bazarr.enable = true;
|
||||
prowlarr.enable = true;
|
||||
flaresolverr.enable = true;
|
||||
bazarr.enable = true;
|
||||
radarr.enable = true;
|
||||
sonarr.enable = true;
|
||||
zigbee2mqtt.enable = true;
|
||||
mosquitto.enable = true;
|
||||
caddy.enable = true;
|
||||
uptime-kuma.enable = true;
|
||||
vaultwarden.enable = true;
|
||||
};
|
||||
gameservers = {
|
||||
minecraft_recpro.enable = true;
|
||||
|
||||
@@ -39,11 +39,27 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# the order determines the order in glance :3
|
||||
imports = [
|
||||
./services
|
||||
./shares/nfs.nix
|
||||
./shares/smb.nix
|
||||
./shares/zfs.nix
|
||||
./fileshare
|
||||
./caddy
|
||||
./home/zigbee2mqtt
|
||||
./vaultwarden
|
||||
./gitea
|
||||
./home/homeassistant
|
||||
./immich
|
||||
./arr/bazarr
|
||||
./arr/prowlarr
|
||||
./arr/radarr
|
||||
./qbittorrent
|
||||
./arr/sonarr
|
||||
./yacreader
|
||||
./audiobookshelf
|
||||
./jellyfin
|
||||
./arr/flaresolverr
|
||||
./home/mosquitto
|
||||
./uptime-kuma
|
||||
./glance
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
13
modules/homelab/fileshare/default.nix
Normal file
13
modules/homelab/fileshare/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# services show up in glance in reverse import order lmao
|
||||
imports = [
|
||||
./shares/nfs.nix
|
||||
./shares/smb.nix
|
||||
./shares/zfs.nix
|
||||
];
|
||||
}
|
||||
@@ -1,14 +1,17 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
# define nfs exports
|
||||
let
|
||||
cfg = config.modules.homelab.nfs;
|
||||
cfg = config.modules.fileshare.nfs;
|
||||
nfs_exports = ''
|
||||
/holocron/vault *(rw,sync,no_subtree_check,no_root_squash)
|
||||
/holocron/media *(ro,sync,no_subtree_check)
|
||||
'';
|
||||
in
|
||||
{
|
||||
#/holocron/vault *(rw,sync,no_subtree_check,no_root_squash)
|
||||
in {
|
||||
options.modules.homelab.nfs = {
|
||||
enable = lib.mkEnableOption "enables nfs";
|
||||
};
|
||||
@@ -1,8 +1,12 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
# define smb shares
|
||||
let
|
||||
cfg = config.modules.homelab.smb;
|
||||
cfg = config.modules.fileshare.smb;
|
||||
smb_shares = {
|
||||
vault = {
|
||||
path = "/holocron/vault";
|
||||
@@ -17,8 +21,7 @@ let
|
||||
guestOk = false;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.modules.homelab.smb = {
|
||||
enable = lib.mkEnableOption "enables smb";
|
||||
};
|
||||
@@ -1,9 +1,11 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.homelab.zfs;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.modules.fileshare.zfs;
|
||||
in {
|
||||
options.modules.homelab.zfs = {
|
||||
enable = lib.mkEnableOption "enables zfs";
|
||||
};
|
||||
@@ -13,8 +15,8 @@ in
|
||||
networking.hostId = "3e6e7055";
|
||||
|
||||
# enable zfs support
|
||||
boot.kernelModules = [ "zfs" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.kernelModules = ["zfs"];
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
|
||||
# enable smart monitoring
|
||||
services.smartd.enable = true;
|
||||
@@ -28,8 +30,7 @@ in
|
||||
fileSystems."/holocron" = {
|
||||
device = "holocron";
|
||||
fsType = "zfs";
|
||||
options = [ "nofail" ];
|
||||
options = ["nofail"];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -293,5 +293,14 @@ in
|
||||
paths = [ cfg.data_dir ];
|
||||
};
|
||||
};
|
||||
|
||||
# add to udr to glance
|
||||
modules.services.glance.links.system = [{
|
||||
title = "bebe";
|
||||
url = "https://bebe.lan";
|
||||
error-url = "https://10.10.0.1";
|
||||
check-url = "https://10.10.0.1";
|
||||
icon = "di:unifi";
|
||||
allow-insecure = true; }];
|
||||
};
|
||||
}
|
||||
@@ -5,34 +5,8 @@
|
||||
|
||||
# services show up in glance in reverse import order lmao
|
||||
imports = [
|
||||
./home/zigbee2mqtt
|
||||
./vaultwarden
|
||||
./gitea
|
||||
./home/homeassistant
|
||||
./immich
|
||||
./arr/bazarr
|
||||
./arr/prowlarr
|
||||
./arr/radarr
|
||||
./qbittorrent
|
||||
./arr/sonarr
|
||||
./yacreader
|
||||
./audiobookshelf
|
||||
./jellyfin
|
||||
./caddy
|
||||
./arr/flaresolverr
|
||||
./home/mosquitto
|
||||
./uptime-kuma
|
||||
./glance
|
||||
];
|
||||
|
||||
# add to udr to glance
|
||||
modules.services.glance.links.system = [{
|
||||
title = "bebe";
|
||||
url = "https://bebe.lan";
|
||||
error-url = "https://10.10.0.1";
|
||||
check-url = "https://10.10.0.1";
|
||||
icon = "di:unifi";
|
||||
allow-insecure = true; }];
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user