add jellyfin

This commit is contained in:
Tyler Starr 2023-07-23 17:10:08 -07:00
parent 511a106e0c
commit 3bcac3cc72
5 changed files with 44 additions and 18 deletions

View File

@ -61,12 +61,12 @@
]; ];
# Enable user services # Enable user services
services = { #services = {
syncthing = { # syncthing = {
enable = true; # enable = true;
user = "${user}"; # user = "${user}";
}; # };
}; #};
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
@ -80,9 +80,15 @@
# Enable modules # Enable modules
imports = [ ../../modules ]; imports = [ ../../modules ];
modules = { modules = {
server = {
jellyfin.enable = true;
};
services = { services = {
samba.enable = true; samba.enable = true;
}; };
devel = {
tooling.enable = true;
};
}; };
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?

View File

@ -8,43 +8,48 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" ]; options = [ "subvol=root" ];
}; };
fileSystems."/engi" =
{ device = "/dev/disk/by-uuid/89227565-1b54-41ec-adef-cd4ddd8565c5";
fsType = "btrfs";
};
fileSystems."/home" = fileSystems."/home" =
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=home" ]; options = [ "subvol=home" ];
}; };
fileSystems."/nix" = fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" ]; options = [ "subvol=nix" ];
}; };
fileSystems."/persist" = fileSystems."/persist" =
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=persist" ]; options = [ "subvol=persist" ];
}; };
fileSystems."/var/log" = fileSystems."/var/log" =
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=log" ]; options = [ "subvol=var/log" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/37EE-81E0"; { device = "/dev/disk/by-uuid/C42C-A103";
fsType = "vfat"; fsType = "vfat";
}; };
@ -55,8 +60,9 @@
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -1,4 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./desktop ./gaming ./devel ./services ]; imports = [ ./desktop ./gaming ./devel ./services ./server ];
} }

View File

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./jellyfin.nix ];
}

View File

@ -0,0 +1,10 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.server.jellyfin;
in {
options.modules.server.jellyfin.enable = lib.mkEnableOption "jellyfin";
config = lib.mkIf cfg.enable {
services.jellyfin.enable = true;
};
}