nixos/hosts/FredOS-Mediaserver.nix
ediblerope 7fe1ccb8a7 Add transcode-hevc script for bulk H.264 to HEVC conversion
Resumable batch script that finds H.264 files, re-encodes to HEVC
(libx265 CRF 24), verifies duration, and replaces originals.
Tracks completed files in /var/lib/transcode-hevc/completed.log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 10:25:36 +01:00

39 lines
1 KiB
Nix

{ config, pkgs, lib, ... }:
{
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
# Create symlink from home to storage
systemd.tmpfiles.rules = [
"L+ /home/fred/storage - - - - /mnt/storage"
];
# Basic system packages
environment.systemPackages = with pkgs; [
mergerfs
wget
btop
util-linux
javaPackages.compiler.temurin-bin.jre-25
unzip
screen
yt-dlp
ghostty.terminfo
(pkgs.writeShellScriptBin "transcode-hevc" ''
export PATH="${pkgs.jellyfin-ffmpeg}/bin:${pkgs.coreutils}/bin:${pkgs.findutils}/bin:${pkgs.gnugrep}/bin:${pkgs.gawk}/bin:${pkgs.bc}/bin:$PATH"
exec ${pkgs.bash}/bin/bash ${../scripts/transcode-hevc.sh} "$@"
'')
];
# Basic networking
networking.useDHCP = lib.mkDefault true;
# Open firewall for SSH
networking.firewall.allowedTCPPorts = [ 22 ];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
};
}