jellyfin on nas

This commit is contained in:
mjallen18
2024-02-18 17:49:41 -06:00
parent b9cbddf44c
commit 78e3bae2cc
2 changed files with 44 additions and 13 deletions

View File

@@ -8,11 +8,13 @@ let
password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06";
hostname = "jallen-nas";
timezone = "America/Chicago";
main-pool = ''"Main\ Pool"'';
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration-nas.nix
./hardware-configuration.nix
./nas-apps/jellyfin.nix
];
# Enable nix flakes and nix-command tools
@@ -33,14 +35,25 @@ in
};
# Override kernel to latest
kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = [
# none for now
"nohibernate"
];
consoleLogLevel = 3;
bootspec.enable = true;
supportedFilesystems = [ "zfs" ];
# zfs = {
# extraPools = [
# #"Main" + " " + "Pool"
# #main-pool
# #''"Safe\ SSD"''
# "Junk"
# ];
# };
};
# Hardware configs
@@ -62,11 +75,11 @@ in
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = true;
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = true;
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
@@ -92,6 +105,8 @@ in
# Services configs
services = {
openssh.enable = true;
# Enable firmware updates
fwupd.enable = true;
@@ -105,9 +120,9 @@ in
# Enable the Plasma 6 Desktop Environment.
displayManager = {
sddm.enable = true;
defaultSession = "plasma";
defaultSession = "plasmawayland";
};
desktopManager.plasma6.enable = true;
desktopManager.plasma5.enable = true;
};
# Enable CUPS to print documents.
@@ -122,11 +137,11 @@ in
};
# enable auto discovery of printers
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
# avahi = {
# enable = true;
# nssmdns4 = true;
# openFirewall = true;
# };
# Enable Flatpak
flatpak.enable = false;
@@ -136,6 +151,8 @@ in
networking = {
hostName = hostname;
hostId = "4b501480";
# Enable Network Manager
networkmanager.enable = true;
};
@@ -179,6 +196,7 @@ in
users.users."${user}" = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
initialHashedPassword = password;
shell = pkgs.fish;
packages = with pkgs; [
neofetch
@@ -212,4 +230,3 @@ in
system.stateVersion = "23.11"; # Did you read the comment?
}

14
nas-apps/jellyfin.nix Normal file
View File

@@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
environment.systemPackages = [
pkgs.jellyfin
pkgs.jellyfin-web
pkgs.jellyfin-ffmpeg
];
services.jellyfin = {
enable = true;
openFirewall = true;
};
}