Add nix arr-box config because why do this with docker in the first place
Some checks are pending
/ Build Nix targets (push) Waiting to run
Some checks are pending
/ Build Nix targets (push) Waiting to run
This commit is contained in:
parent
e0622a450e
commit
cdbdfb278d
4 changed files with 132 additions and 0 deletions
57
services/jellyfin-nvidia/default.nix
Normal file
57
services/jellyfin-nvidia/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.vm_jellyfin_nvidia;
|
||||
in {
|
||||
options.services.vm_jellyfin_nvidia = {
|
||||
enable = lib.mkEnableOption "Enable minimal config";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
nvtopPackages.nvidia
|
||||
];
|
||||
};
|
||||
# Nvidia Hardware Acceleration config
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ cudaPackages.cudatoolkit ];
|
||||
};
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
nvidiaSettings = true;
|
||||
modesetting.enable = true;
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module
|
||||
# Recommended by Nvidia for 20+ series GPU
|
||||
open = true;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
user = "tbarnouin";
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
fileSystems."/mnt/media" = {
|
||||
device = "192.168.1.125:/BIGDATA";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue