88 lines
2.1 KiB
Nix
88 lines
2.1 KiB
Nix
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
{
|
|
# Setup hardware
|
|
imports = [ inputs.nixos-hardware.nixosModules.common-cpu-intel ];
|
|
# Sops setup for this machine
|
|
sops.secrets = {
|
|
"borg-ssh-key" = {
|
|
sopsFile = ../../secrets/perception/borg.yaml;
|
|
format = "yaml";
|
|
};
|
|
"borg-password" = {
|
|
sopsFile = ../../secrets/perception/borg.yaml;
|
|
format = "yaml";
|
|
};
|
|
};
|
|
# Setup system configuration
|
|
nathan = {
|
|
services = {
|
|
borg = {
|
|
enable = true;
|
|
extraExcludes = [ "/var/log" ];
|
|
passwordFile = config.sops.secrets."borg-password".path;
|
|
sshKey = config.sops.secrets."borg-ssh-key".path;
|
|
};
|
|
};
|
|
config = {
|
|
setupGrub = false;
|
|
nix = {
|
|
autoUpdate = true;
|
|
autoGC = true;
|
|
};
|
|
harden = false;
|
|
};
|
|
};
|
|
|
|
# Configure bootloader
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
boot.kernelParams = [ "net.ifnames=0" ];
|
|
# Configure networking
|
|
networking = {
|
|
domain = "mccarty.io";
|
|
useDHCP = true;
|
|
# Open ports in firewall
|
|
firewall = {
|
|
allowedTCPPorts = [ ];
|
|
allowedUDPPorts = [ ];
|
|
};
|
|
};
|
|
|
|
# Setup home manager
|
|
home-manager.users.nathan = import ./home.nix;
|
|
|
|
## Media Streaming setup
|
|
# Setup hardware
|
|
hardware.opengl = {
|
|
enable = true;
|
|
extraPackages = with pkgs; [
|
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
|
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
|
vaapiVdpau
|
|
libvdpau-va-gl
|
|
];
|
|
};
|
|
# Configure plex
|
|
services.plex = let
|
|
plexPass = pkgs.plex.overrideAttrs (_: rec {
|
|
version = "1.32.0.6918-6f393eda1";
|
|
src = pkgs.fetchurl {
|
|
url =
|
|
"https://downloads.plex.tv/plex-media-server-new/${version}/redhat/plexmediaserver-${version}.x86_64.rpm";
|
|
hash = "sha256-O8JGZUPqGjx+WamnBWjnnwPRuUuf1AzaOFmEv+6GZZo=";
|
|
};
|
|
});
|
|
in {
|
|
enable = true;
|
|
package = plexPass;
|
|
openFirewall = true;
|
|
};
|
|
# Configure tatulli
|
|
services.tautulli = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
}
|