Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hosts/glyph/hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@
boot.binfmt.emulatedSystems = ["aarch64-linux"];

hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-compute-runtime
vpl-gpu-rt
];
};
}
5 changes: 1 addition & 4 deletions hosts/glyph/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
./avahi.nix
./dns.nix
./filebrowser.nix
./jellyfin.nix
./nfs.nix
./prometheus.nix
./samba.nix
Expand All @@ -17,10 +18,6 @@

services.cockpit.enable = true;
services.openssh.enable = true;
services.plex = {
enable = true;
openFirewall = true;
};
services.roon-server = {
enable = true;
openFirewall = true;
Expand Down
42 changes: 42 additions & 0 deletions hosts/glyph/services/jellyfin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
config,
pkgs,
lib,
...
}: {
services.jellyfin = {
enable = true;
group = "media";
openFirewall = true;
hardwareAcceleration = {
enable = true;
type = "qsv";
device = "/dev/dri/renderD128";
};
transcoding = {
enableHardwareEncoding = true;
enableIntelLowPowerEncoding = true;
hardwareDecodingCodecs = {
h264 = true;
hevc = true;
vp9 = true;
av1 = true;
mpeg2 = true;
vc1 = true;
};
hardwareEncodingCodecs = {
hevc = true;
av1 = false; # Intel Arc only
};
};
};

users.users.${config.services.jellyfin.user}.extraGroups = [
"video"
"render"
];

services.meilisearch = {
enable = true;
};
}
8 changes: 4 additions & 4 deletions hosts/glyph/services/samba.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
shares = {
Archive = mkShare "/mnt/archive" "mu" "users";
Backup = mkShare "/mnt/backup" "mu" "users" // {"fruit:time machine" = "yes";};
Media = mkShare "/mnt/media" config.services.plex.user config.services.plex.group;
Media = mkShare "/mnt/media" config.services.jellyfin.user config.services.jellyfin.group;
Torrents = mkShare "/mnt/torrents" config.services.transmission.user config.services.transmission.group;
Unsorted = mkShare "/mnt/unsorted" "mu" "users";
};
Expand Down Expand Up @@ -58,13 +58,13 @@
Type = "oneshot";
ExecStart = let
defaultUsrGrp = "mu:users";
plexUsrGrp = with config.services.plex; "${user}:${group}";
jellyfinUsrGrp = with config.services.jellyfin; "${user}:${group}";
transmissionUsrGrp = with config.services.transmission; "${user}:${group}";
in [
"${pkgs.coreutils}/bin/chown -R ${defaultUsrGrp} archive"
"${pkgs.coreutils}/bin/chown -R ${defaultUsrGrp} backup"
# N.B.: /mnt/media/Music is used by Roon, not Plex
"${pkgs.coreutils}/bin/chown -R ${plexUsrGrp} media/Movies media/TV media/Video"
# N.B.: /mnt/media/Music is used by Roon, not Jellyfin
"${pkgs.coreutils}/bin/chown -R ${jellyfinUsrGrp} media/Movies media/TV media/Video"
"${pkgs.coreutils}/bin/chown -R ${defaultUsrGrp} media/Music"
"${pkgs.coreutils}/bin/chown -R ${transmissionUsrGrp} torrents"
"${pkgs.coreutils}/bin/chown -R ${defaultUsrGrp} unsorted"
Expand Down