nixos/hosts/FredOS-Mediaserver.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

2026-01-20 09:59:20 +00:00
{ config, pkgs, lib, ... }:
{
2026-01-20 14:35:20 +00:00
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
2026-01-20 14:42:21 +00:00
# Create symlink from home to storage
systemd.tmpfiles.rules = [
"L+ /home/fred/storage - - - - /mnt/storage"
];
2026-01-20 09:59:20 +00:00
2026-01-20 14:42:21 +00:00
# Basic system packages
2026-01-20 14:35:20 +00:00
environment.systemPackages = with pkgs; [
mergerfs
wget
btop
util-linux
2026-01-25 16:01:40 +00:00
javaPackages.compiler.temurin-bin.jre-25
2026-01-25 16:06:34 +00:00
unzip
2026-01-25 16:40:19 +00:00
screen
2026-01-26 15:22:01 +00:00
yt-dlp
2026-04-09 10:07:38 +01:00
ghostty.terminfo
matugen
(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:${pkgs.curl}/bin:$PATH"
exec ${pkgs.bash}/bin/bash ${../scripts/transcode-hevc.sh} "$@"
'')
2026-01-20 14:35:20 +00:00
];
2026-01-20 09:59:20 +00:00
2026-01-20 14:42:21 +00:00
# Basic networking
networking.useDHCP = lib.mkDefault true;
2026-01-20 21:38:23 +00:00
# Open firewall for SSH
networking.firewall.allowedTCPPorts = [ 22 ];
2026-01-20 14:42:21 +00:00
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
2026-01-20 14:42:21 +00:00
};
2026-01-20 14:35:20 +00:00
};
2026-01-20 09:59:20 +00:00
}