big restructure, getting there prayers for rebuild
This commit is contained in:
@@ -25,31 +25,31 @@ in
|
|||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
nvidia.enable = true;
|
nvidia.enable = true;
|
||||||
};
|
};
|
||||||
homelab = {
|
fileshare = {
|
||||||
enable = true;
|
|
||||||
zfs.enable = true;
|
zfs.enable = true;
|
||||||
smb.enable = true;
|
smb.enable = true;
|
||||||
nfs.enable = true;
|
nfs.enable = true;
|
||||||
};
|
};
|
||||||
|
homelab.enable = true;
|
||||||
services = {
|
services = {
|
||||||
caddy.enable = true;
|
gitea.enable = true;
|
||||||
|
glance.enable = true;
|
||||||
|
immich.enable = true;
|
||||||
|
hass.enable = true;
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
audiobookshelf.enable = true;
|
audiobookshelf.enable = true;
|
||||||
yacreader.enable = true;
|
yacreader.enable = true;
|
||||||
vaultwarden.enable = true;
|
|
||||||
gitea.enable = true;
|
|
||||||
glance.enable = true;
|
|
||||||
qbittorrent.enable = true;
|
qbittorrent.enable = true;
|
||||||
immich.enable = true;
|
sonarr.enable = true;
|
||||||
hass.enable = true;
|
radarr.enable = true;
|
||||||
zigbee2mqtt.enable = true;
|
bazarr.enable = true;
|
||||||
mosquitto.enable = true;
|
|
||||||
prowlarr.enable = true;
|
prowlarr.enable = true;
|
||||||
flaresolverr.enable = true;
|
flaresolverr.enable = true;
|
||||||
bazarr.enable = true;
|
zigbee2mqtt.enable = true;
|
||||||
radarr.enable = true;
|
mosquitto.enable = true;
|
||||||
sonarr.enable = true;
|
caddy.enable = true;
|
||||||
uptime-kuma.enable = true;
|
uptime-kuma.enable = true;
|
||||||
|
vaultwarden.enable = true;
|
||||||
};
|
};
|
||||||
gameservers = {
|
gameservers = {
|
||||||
minecraft_recpro.enable = true;
|
minecraft_recpro.enable = true;
|
||||||
|
|||||||
@@ -39,11 +39,27 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# the order determines the order in glance :3
|
||||||
imports = [
|
imports = [
|
||||||
./services
|
./fileshare
|
||||||
./shares/nfs.nix
|
./caddy
|
||||||
./shares/smb.nix
|
./home/zigbee2mqtt
|
||||||
./shares/zfs.nix
|
./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 {
|
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
|
# define nfs exports
|
||||||
let
|
let
|
||||||
cfg = config.modules.homelab.nfs;
|
cfg = config.modules.fileshare.nfs;
|
||||||
nfs_exports = ''
|
nfs_exports = ''
|
||||||
/holocron/vault *(rw,sync,no_subtree_check,no_root_squash)
|
|
||||||
/holocron/media *(ro,sync,no_subtree_check)
|
/holocron/media *(ro,sync,no_subtree_check)
|
||||||
'';
|
'';
|
||||||
in
|
#/holocron/vault *(rw,sync,no_subtree_check,no_root_squash)
|
||||||
{
|
in {
|
||||||
options.modules.homelab.nfs = {
|
options.modules.homelab.nfs = {
|
||||||
enable = lib.mkEnableOption "enables nfs";
|
enable = lib.mkEnableOption "enables nfs";
|
||||||
};
|
};
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
# define smb shares
|
# define smb shares
|
||||||
let
|
let
|
||||||
cfg = config.modules.homelab.smb;
|
cfg = config.modules.fileshare.smb;
|
||||||
smb_shares = {
|
smb_shares = {
|
||||||
vault = {
|
vault = {
|
||||||
path = "/holocron/vault";
|
path = "/holocron/vault";
|
||||||
@@ -17,8 +21,7 @@ let
|
|||||||
guestOk = false;
|
guestOk = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.modules.homelab.smb = {
|
options.modules.homelab.smb = {
|
||||||
enable = lib.mkEnableOption "enables 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 = {
|
options.modules.homelab.zfs = {
|
||||||
enable = lib.mkEnableOption "enables zfs";
|
enable = lib.mkEnableOption "enables zfs";
|
||||||
};
|
};
|
||||||
@@ -13,8 +15,8 @@ in
|
|||||||
networking.hostId = "3e6e7055";
|
networking.hostId = "3e6e7055";
|
||||||
|
|
||||||
# enable zfs support
|
# enable zfs support
|
||||||
boot.kernelModules = [ "zfs" ];
|
boot.kernelModules = ["zfs"];
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = ["zfs"];
|
||||||
|
|
||||||
# enable smart monitoring
|
# enable smart monitoring
|
||||||
services.smartd.enable = true;
|
services.smartd.enable = true;
|
||||||
@@ -28,8 +30,7 @@ in
|
|||||||
fileSystems."/holocron" = {
|
fileSystems."/holocron" = {
|
||||||
device = "holocron";
|
device = "holocron";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
options = [ "nofail" ];
|
options = ["nofail"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -293,5 +293,14 @@ in
|
|||||||
paths = [ cfg.data_dir ];
|
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
|
# services show up in glance in reverse import order lmao
|
||||||
imports = [
|
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