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