move nas to internal ssd
This commit is contained in:
@@ -22,6 +22,7 @@ in
|
|||||||
./nas-apps/mariadb.nix
|
./nas-apps/mariadb.nix
|
||||||
./nas-apps/nextcloud.nix
|
./nas-apps/nextcloud.nix
|
||||||
./nas-apps/collabora.nix
|
./nas-apps/collabora.nix
|
||||||
|
./nas-apps/jellyseerr.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable nix flakes and nix-command tools
|
# Enable nix flakes and nix-command tools
|
||||||
@@ -54,6 +55,7 @@ in
|
|||||||
supportedFilesystems = [ "zfs" ];
|
supportedFilesystems = [ "zfs" ];
|
||||||
|
|
||||||
zfs.extraPools = [ "junk" ];
|
zfs.extraPools = [ "junk" ];
|
||||||
|
zfs.requestEncryptionCredentials = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hardware configs
|
# Hardware configs
|
||||||
@@ -176,17 +178,20 @@ in
|
|||||||
systemd.services.nas-mounts = {
|
systemd.services.nas-mounts = {
|
||||||
path = [ pkgs.zfs pkgs.bash ];
|
path = [ pkgs.zfs pkgs.bash ];
|
||||||
script = ''
|
script = ''
|
||||||
if test -d /mnt/Safe\ SSD/ssd_app_data; then
|
if test -d /mnt/ssd/ssd_app_data; then
|
||||||
echo "NAS ZFS Pools Mounted."
|
echo "NAS ZFS Pools Mounted."
|
||||||
else
|
else
|
||||||
zpool import -R /mnt -f "Main Pool"
|
zpool import -f "MainPool"
|
||||||
zpool import -R /mnt -f "Safe SSD"
|
zpool import -f "SSD"
|
||||||
zfs load-key -L file:///root/main-pool.key "Main Pool"
|
zfs load-key -L file:///root/main-pool.key "MainPool"
|
||||||
zfs load-key -L file:///root/safe-ssd.key "Safe SSD"
|
zfs load-key -L file:///root/ssd.key "SSD"
|
||||||
zfs mount -a
|
zfs mount -a
|
||||||
echo "NAS ZFS Pools Mounted."
|
echo "NAS ZFS Pools Mounted."
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
# after = [ "zfs-import.target" ];
|
||||||
|
# before = [ "zfs-mount.service" ];
|
||||||
|
# wantedBy = [ "zfs-mount.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -199,6 +204,11 @@ in
|
|||||||
# Enable Network Manager
|
# Enable Network Manager
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
|
|
||||||
|
# interfaces.enp7s0.ipv4.addresses = [ {
|
||||||
|
# address = "10.0.1.18";
|
||||||
|
# prefixLength = 24;
|
||||||
|
# } ];
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowPing = true;
|
allowPing = true;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "mpt3sas" "xhci_pci" "ahci" "usb_storage" "uas" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "mpt3sas" "xhci_pci" "ahci" "uas" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
@@ -19,48 +19,61 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/CDC4-6ECC";
|
{ device = "/dev/disk/by-uuid/C6E9-7371";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" =
|
||||||
{ device = "/dev/disk/by-uuid/b7ba8986-8291-434a-ae9b-dcfcdfe01ad7";
|
{ device = "/dev/disk/by-uuid/85e2fa30-816f-4457-80a1-9f88b9ab77b3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=nix" ];
|
options = [ "subvol=nix" "compress-force=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/etc" =
|
fileSystems."/etc" =
|
||||||
{ device = "/dev/disk/by-uuid/b7ba8986-8291-434a-ae9b-dcfcdfe01ad7";
|
{ device = "/dev/disk/by-uuid/85e2fa30-816f-4457-80a1-9f88b9ab77b3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=etc" ];
|
options = [ "subvol=etc" "compress-force=zstd" "noatime" ];
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var/log" =
|
|
||||||
{ device = "/dev/disk/by-uuid/b7ba8986-8291-434a-ae9b-dcfcdfe01ad7";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=log" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/root" =
|
fileSystems."/root" =
|
||||||
{ device = "/dev/disk/by-uuid/b7ba8986-8291-434a-ae9b-dcfcdfe01ad7";
|
{ device = "/dev/disk/by-uuid/85e2fa30-816f-4457-80a1-9f88b9ab77b3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=root" ];
|
options = [ "subvol=root" "compress-force=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/log" =
|
||||||
|
{ device = "/dev/disk/by-uuid/85e2fa30-816f-4457-80a1-9f88b9ab77b3";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=log" "compress-force=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
{ device = "/dev/disk/by-uuid/b7ba8986-8291-434a-ae9b-dcfcdfe01ad7";
|
{ device = "/dev/disk/by-uuid/85e2fa30-816f-4457-80a1-9f88b9ab77b3";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=home" ];
|
options = [ "subvol=home" "compress-force=zstd"];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/c08ba901-a8a9-4006-9688-002bb24da1b6"; }
|
||||||
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.podman0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth2.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth3.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth4.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth5.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth6.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth7.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.vethd3ca67e.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -56,9 +56,9 @@
|
|||||||
-e 'NVIDIA_DRIVER_CAPABILITIES'='all' \
|
-e 'NVIDIA_DRIVER_CAPABILITIES'='all' \
|
||||||
-e 'NVIDIA_VISIBLE_DEVICES'='all' \
|
-e 'NVIDIA_VISIBLE_DEVICES'='all' \
|
||||||
-p 8096:8096 \
|
-p 8096:8096 \
|
||||||
-v '/mnt/jellyfin/jellyfin:/config' \
|
-v '/mnt/ssd/nix-app-data/jellyfin:/config' \
|
||||||
-v '/mnt/movies/Movies:/data/movies' \
|
-v '/mnt/mainpool/Movies:/data/movies' \
|
||||||
-v '/mnt/tv/TV:/data/tv' \
|
-v '/mnt/mainpool/TV:/data/tv' \
|
||||||
lscr.io/linuxserver/jellyfin:latest
|
lscr.io/linuxserver/jellyfin:latest
|
||||||
'';
|
'';
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|||||||
17
nas-apps/jellyseerr.nix
Normal file
17
nas-apps/jellyseerr.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# jellyseerr
|
||||||
|
virtualisation.oci-containers.containers."jellyseerr" = {
|
||||||
|
autoStart = true;
|
||||||
|
image = "fallenbagel/jellyseerr";
|
||||||
|
ports = [ "5055:5055" ];
|
||||||
|
volumes = [
|
||||||
|
"/mnt/ssd/ssd_app_data/jellyseerr:/config"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
PUID = "911";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "America/Chicago";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
image = "linuxserver/mariadb";
|
image = "linuxserver/mariadb";
|
||||||
ports = [ "3306:3306" ];
|
ports = [ "3306:3306" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/Safe\ SSD/mariadb:/config"
|
"/mnt/ssd/mariadb:/config"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "911";
|
PUID = "911";
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
virtualisation.oci-containers.containers."nextcloud" = {
|
virtualisation.oci-containers.containers."nextcloud" = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
image = "linuxserver/nextcloud";
|
image = "linuxserver/nextcloud";
|
||||||
ports = [ "9443:443" ];
|
ports = [ "9443:443" "9880:80" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/nextcloud:/config"
|
"/mnt/ssd/ssd_app_data/nextcloud:/config"
|
||||||
"/mnt/Main\ Pool/Nextcloud:/data"
|
"/mnt/mainpool/Nextcloud:/data"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "911";
|
PUID = "911";
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
image = "linuxserver/radarr";
|
image = "linuxserver/radarr";
|
||||||
ports = [ "7878:7878" ];
|
ports = [ "7878:7878" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/radarr:/config"
|
"/mnt/ssd/ssd_app_data/radarr:/config"
|
||||||
"/mnt/Main\ Pool/Movies:/movies"
|
"/mnt/mainpool/Movies:/movies"
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/downloads:/downloads"
|
"/mnt/ssd/ssd_app_data/downloads:/downloads"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "911";
|
PUID = "911";
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
image = "linuxserver/sabnzbd";
|
image = "linuxserver/sabnzbd";
|
||||||
ports = [ "8080:8080" ];
|
ports = [ "8080:8080" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/sabnzbd:/config"
|
"/mnt/ssd/ssd_app_data/sabnzbd:/config"
|
||||||
"/mnt/Main\ Pool/TV:/tv"
|
"/mnt/mainpool/TV:/tv"
|
||||||
"/mnt/Main\ Pool/Movies:/movies"
|
"/mnt/mainpool/Movies:/movies"
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/downloads:/downloads"
|
"/mnt/ssd/ssd_app_data/downloads:/downloads"
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/downloads-incomplete:/downloads-incomplete"
|
"/mnt/ssd/ssd_app_data/downloads-incomplete:/downloads-incomplete"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "911";
|
PUID = "911";
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
image = "linuxserver/sonarr";
|
image = "linuxserver/sonarr";
|
||||||
ports = [ "8989:8989" ];
|
ports = [ "8989:8989" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/sonarr:/config"
|
"/mnt/ssd/ssd_app_data/sonarr:/config"
|
||||||
"/mnt/Main\ Pool/TV:/tv"
|
"/mnt/mainpool/TV:/tv"
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/downloads:/downloads"
|
"/mnt/ssd/ssd_app_data/downloads:/downloads"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "911";
|
PUID = "911";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
image = "linuxserver/swag";
|
image = "linuxserver/swag";
|
||||||
ports = [ "80:80" "443:443" ];
|
ports = [ "80:80" "443:443" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/Safe\ SSD/ssd_app_data/swag:/config"
|
"/mnt/ssd/ssd_app_data/swag:/config"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PGID = "1000";
|
PGID = "1000";
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
TZ = "America/Chicago";
|
TZ = "America/Chicago";
|
||||||
URL = "mjallen.dev";
|
URL = "mjallen.dev";
|
||||||
VALIDATION = "http";
|
VALIDATION = "http";
|
||||||
SUBDOMAINS = "jellyfin,hass,cloud,jellyseer";
|
SUBDOMAINS = "jellyfin,hass,cloud,office,jellyseerr";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user