nas fixes
This commit is contained in:
@@ -148,14 +148,31 @@ in
|
|||||||
flatpak.enable = false;
|
flatpak.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Networking configs
|
systemd.services.nas-mounts = {
|
||||||
|
path = [ pkgs.zfs ];
|
||||||
|
script = ''
|
||||||
|
zpool import -R /mnt -f "Main Pool"
|
||||||
|
zpool import -R /mnt -f "Safe SSD"
|
||||||
|
zpool import -R /mnt -f "Junk"
|
||||||
|
zfs load-key -L file:///root/main-pool.key "Main Pool"
|
||||||
|
zfs load-key -L file:///root/safe-ssd.key "Safe SSD"
|
||||||
|
zfs mount -a
|
||||||
|
'';
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Networking configs enp7s0
|
||||||
networking = {
|
networking = {
|
||||||
hostName = hostname;
|
hostName = hostname;
|
||||||
|
interfaces.enp7s0.ipv4.routes = [{
|
||||||
|
address = "10.0.1.18";
|
||||||
|
prefixLength = 16;
|
||||||
|
}];
|
||||||
|
|
||||||
hostId = "4b501480";
|
hostId = "4b501480";
|
||||||
|
|
||||||
# Enable Network Manager
|
# Enable Network Manager
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Time config
|
# Time config
|
||||||
@@ -213,6 +230,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.docker.enableNvidia = true;
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
"/mnt/Safe\ SSD/ssd_app_data/jellyfin/cache:/cache"
|
"/mnt/Safe\ SSD/ssd_app_data/jellyfin/cache:/cache"
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/jellyfin/log:/log"
|
"/mnt/Safe\ SSD/ssd_app_data/jellyfin/log:/log"
|
||||||
"/mnt/Main\ Pool/Movies:/movies"
|
"/mnt/Main\ Pool/Movies:/movies"
|
||||||
"/mnt/Main\ Pool/tv:/TV"
|
"/mnt/Main\ Pool/TV:/tv"
|
||||||
];
|
];
|
||||||
ports = [ "8096:8096" ];
|
ports = [ "8096:8096" ];
|
||||||
environment = {
|
environment = {
|
||||||
JELLYFIN_LOG_DIR = "/log";
|
JELLYFIN_LOG_DIR = "/log";
|
||||||
PUID = 911;
|
PUID = "911";
|
||||||
PGID = 1000;
|
PGID = "1000";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
# Swag
|
# Swag
|
||||||
virtualisation.oci-containers.containers."portainer" = {
|
virtualisation.oci-containers.containers."swag" = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
image = "linuxserver/swag";
|
image = "linuxserver/swag";
|
||||||
ports = [ "80:80" "443:443" ];
|
ports = [ "80:80" "443:443" ];
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
"/mnt/Safe\ SSD/ssd_app_data/swag:/config"
|
"/mnt/Safe\ SSD/ssd_app_data/swag:/config"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PGID = 1000;
|
PGID = "1000";
|
||||||
PUID = 1000;
|
PUID = "1000";
|
||||||
TZ = "America/Chicago";
|
TZ = "America/Chicago";
|
||||||
URL = "mjallen.dev";
|
URL = "mjallen.dev";
|
||||||
VALIDATION = "http";
|
VALIDATION = "http";
|
||||||
|
|||||||
7
scripts/nas-init
Executable file
7
scripts/nas-init
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
zpool import -R /mnt -f "Main Pool"
|
||||||
|
zpool import -R /mnt -f "Safe SSD"
|
||||||
|
zpool import -R /mnt -f "Junk"
|
||||||
|
zfs load-key -L file:///root/main-pool.key "Main Pool"
|
||||||
|
zfs load-key -L file:///root/safe-ssd.key "Safe SSD"
|
||||||
|
zfs mount -a
|
||||||
Reference in New Issue
Block a user