media1: add NixOS media PC configuration
GMKtec G3 (Intel N100) replacing the old Ubuntu media PC on VLAN 31. Hyprland compositor with Kodi on workspace 1 and Firefox on workspace 2, greetd auto-login, PipeWire audio, VA-API hardware decode, and NFS mount for media from NAS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
84
hosts/media1/configuration.nix
Normal file
84
hosts/media1/configuration.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../system
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "media1";
|
||||
networking.domain = "home.2rjus.net";
|
||||
networking.useNetworkd = true;
|
||||
networking.useDHCP = false;
|
||||
networking.firewall.enable = false;
|
||||
services.resolved.enable = true;
|
||||
networking.nameservers = [
|
||||
"10.69.13.5"
|
||||
"10.69.13.6"
|
||||
];
|
||||
|
||||
systemd.network.enable = true;
|
||||
systemd.network.networks."10-lan" = {
|
||||
matchConfig.Name = "enp*";
|
||||
address = [
|
||||
"10.69.31.51/24"
|
||||
];
|
||||
routes = [
|
||||
{ Gateway = "10.69.31.1"; }
|
||||
];
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
homelab.host = {
|
||||
tier = "prod";
|
||||
priority = "low";
|
||||
role = "media";
|
||||
};
|
||||
|
||||
# Intel N100 (Alder Lake-N) graphics
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # VA-API driver for Broadwell+
|
||||
];
|
||||
};
|
||||
|
||||
# NFS for media access
|
||||
environment.systemPackages = with pkgs; [
|
||||
nfs-utils
|
||||
];
|
||||
services.rpcbind.enable = true;
|
||||
|
||||
systemd.mounts = [
|
||||
{
|
||||
type = "nfs";
|
||||
mountConfig = {
|
||||
Options = "ro,soft,noatime";
|
||||
};
|
||||
what = "nas.home.2rjus.net:/mnt/hdd-pool/media";
|
||||
where = "/mnt/nas/media";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.automounts = [
|
||||
{
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
automountConfig = {
|
||||
TimeoutIdleSec = "5min";
|
||||
};
|
||||
where = "/mnt/nas/media";
|
||||
}
|
||||
];
|
||||
|
||||
vault.enable = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
Reference in New Issue
Block a user