From 6437126eace57aabadce4e68829b2bc5e62310e4 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 17 Apr 2025 22:42:18 -0500 Subject: [PATCH] Move Jellyfin into Proxmox --- hosts/vm-jellyfin/default.nix | 13 ++++--- hosts/vm-jellyfin/hardware-configuration.nix | 37 ++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 hosts/vm-jellyfin/hardware-configuration.nix diff --git a/hosts/vm-jellyfin/default.nix b/hosts/vm-jellyfin/default.nix index bd633f8..146587c 100644 --- a/hosts/vm-jellyfin/default.nix +++ b/hosts/vm-jellyfin/default.nix @@ -1,9 +1,17 @@ { lib, ... }: { - boot.loader.grub.devices = [ "/dev/disk/by-label/ESP" ]; + imports = [ ./hardware-configuration.nix ]; + + # Bootloader. + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + greg = { + home = true; proxies."jellyfin.home".target = "http://localhost:8096/"; proxies."jellyfin.thehellings.lan".target = "http://localhost:8096/"; tailscale.enable = true; @@ -33,7 +41,6 @@ networking = { hostName = "vm-jellyfin"; - domain = lib.mkForce null; # The proxmox generator fails at this, somehow }; services = { @@ -43,6 +50,4 @@ }; qemuGuest.enable = true; }; - - virtualisation.diskSize = 20 * 1024; } diff --git a/hosts/vm-jellyfin/hardware-configuration.nix b/hosts/vm-jellyfin/hardware-configuration.nix new file mode 100644 index 0000000..95d03e8 --- /dev/null +++ b/hosts/vm-jellyfin/hardware-configuration.nix @@ -0,0 +1,37 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/507251f1-efe7-448d-8de8-91ee582a9afb"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7115-EFA6"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp6s18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +}