System/machines/perception/configuration.nix

88 lines
2.1 KiB
Nix
Raw Normal View History

2023-04-08 23:20:43 -04:00
{ config, lib, pkgs, inputs, ... }:
{
2023-04-08 23:57:42 -04:00
# Setup hardware
imports = [ inputs.nixos-hardware.nixosModules.common-cpu-intel ];
2023-04-08 23:20:43 -04:00
# 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 = {
2023-04-08 23:36:46 -04:00
setupGrub = false;
2023-04-08 23:20:43 -04:00
nix = {
autoUpdate = true;
autoGC = true;
};
harden = false;
};
};
2023-04-08 23:36:46 -04:00
# Configure bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.kernelParams = [ "net.ifnames=0" ];
2023-04-08 23:20:43 -04:00
# 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;
2023-04-09 00:29:51 -04:00
## Media Streaming setup
2023-04-09 00:57:09 -04:00
# 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
];
};
2023-04-09 00:41:21 -04:00
# 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 {
2023-04-09 00:29:51 -04:00
enable = true;
2023-04-09 00:41:21 -04:00
package = plexPass;
openFirewall = true;
2023-04-09 00:29:51 -04:00
};
2023-04-09 00:57:09 -04:00
# Configure tatulli
services.tautulli = {
enable = true;
openFirewall = true;
};
2023-04-08 23:20:43 -04:00
}