From ed08b6a0e44f27e1e966c907feb88cc79f4edbd6 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Wed, 3 Jul 2024 20:51:18 +0200 Subject: [PATCH] challenger: start migrating from voyager. Add nginx. Add jellyfin. --- hosts/challenger/configuration.nix | 13 ++++++++++++- hosts/challenger/filesystems.nix | 5 ++++- hosts/{voyager => challenger}/services/jellyfin.nix | 9 ++------- .../default.nix => challenger/services/nginx.nix} | 1 - hosts/voyager/configuration.nix | 2 -- 5 files changed, 18 insertions(+), 12 deletions(-) rename hosts/{voyager => challenger}/services/jellyfin.nix (90%) rename hosts/{voyager/services/nginx/default.nix => challenger/services/nginx.nix} (99%) diff --git a/hosts/challenger/configuration.nix b/hosts/challenger/configuration.nix index 8188052..88c2a08 100644 --- a/hosts/challenger/configuration.nix +++ b/hosts/challenger/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { imports = @@ -8,6 +8,9 @@ ./hardware-configuration.nix ./exports.nix ./filesystems.nix + + ./services/nginx.nix + ./services/jellyfin.nix ]; networking = { @@ -32,6 +35,14 @@ virtualisation.docker.enable = true; virtualisation.oci-containers.backend = "docker"; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "nvidia-x11" + "nvidia-settings" + ]; + hardware.nvidia.modesetting.enable = true; + hardware.opengl.enable = true; + services.xserver.videoDrivers = ["nvidia"]; + system.stateVersion = "24.05"; } diff --git a/hosts/challenger/filesystems.nix b/hosts/challenger/filesystems.nix index 4957589..4f7b902 100644 --- a/hosts/challenger/filesystems.nix +++ b/hosts/challenger/filesystems.nix @@ -6,7 +6,10 @@ # Local zfs boot = { - # zfs.extraPools = [ "tank" ]; + zfs = { + extraPools = [ "tank" ]; + requestEncryptionCredentials = false; + }; supportedFilesystems = [ "zfs" ]; kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; }; diff --git a/hosts/voyager/services/jellyfin.nix b/hosts/challenger/services/jellyfin.nix similarity index 90% rename from hosts/voyager/services/jellyfin.nix rename to hosts/challenger/services/jellyfin.nix index 25a0017..39c63aa 100644 --- a/hosts/voyager/services/jellyfin.nix +++ b/hosts/challenger/services/jellyfin.nix @@ -38,12 +38,7 @@ }; fileSystems."/tank/media/jellyfin/Music" = { - depends = [ - "/tank/media/music" - "/tank/media/jellyfin" - ]; - options = [ "bind" ]; - device = "/tank/media/music"; + device = "tank/media/music"; + fsType = "zfs"; }; } - diff --git a/hosts/voyager/services/nginx/default.nix b/hosts/challenger/services/nginx.nix similarity index 99% rename from hosts/voyager/services/nginx/default.nix rename to hosts/challenger/services/nginx.nix index 486a2a0..a3cea1a 100644 --- a/hosts/voyager/services/nginx/default.nix +++ b/hosts/challenger/services/nginx.nix @@ -19,4 +19,3 @@ /* email = "felix@albrigtsen.it"; */ /* }; */ } - diff --git a/hosts/voyager/configuration.nix b/hosts/voyager/configuration.nix index 7a99a5e..3723c1f 100644 --- a/hosts/voyager/configuration.nix +++ b/hosts/voyager/configuration.nix @@ -12,10 +12,8 @@ ./services/calibre.nix ./services/fancontrol.nix - ./services/jellyfin.nix ./services/komga.nix ./services/nextcloud.nix - ./services/nginx ./services/podgrab.nix ./services/postgres.nix ./services/snappymail.nix