System/machines/levitation/configuration.nix

97 lines
2.2 KiB
Nix
Raw Normal View History

2022-08-01 18:10:41 -04:00
{ config, lib, pkgs, inputs, ... }:
2023-04-30 23:06:47 -04:00
let
system = pkgs.system;
unstable = import inputs.nixpkgs-unstable {
config = { allowUnfree = true; };
inherit system;
};
in {
2023-07-01 17:41:02 -04:00
imports = [ ./passthrough.nix ];
# Sops setup for this machine
sops.secrets = {
"borg-ssh-key" = {
sopsFile = ../../secrets/levitation/borg.yaml;
format = "yaml";
};
"borg-password" = {
sopsFile = ../../secrets/levitation/borg.yaml;
format = "yaml";
};
"windows-bitlocker-key" = {
sopsFile = ../../secrets/levitation/windows.yaml;
format = "yaml";
};
2023-02-12 21:54:39 -05:00
"last.fm" = {
sopsFile = ../../secrets/levitation/last.fm;
format = "binary";
owner = "nathan";
mode = "0400";
};
2022-07-03 00:43:50 -04:00
};
# Setup system configuration
nathan = {
programs = { games = true; };
2022-07-03 00:43:50 -04:00
services = {
borg = {
enable = true;
extraExcludes = [
"/home/${config.nathan.config.user}/Music"
"/var/lib/docker"
"/var/log"
];
passwordFile = config.sops.secrets."borg-password".path;
sshKey = config.sops.secrets."borg-ssh-key".path;
};
2022-11-22 22:16:10 -05:00
kubo = { enable = true; };
2022-12-26 09:54:23 -05:00
# resolved = { enable = true; };
2022-07-03 00:43:50 -04:00
};
2022-11-05 23:54:11 -04:00
hardware = {
amdPassthrough = true;
printing = true;
};
2022-07-03 00:43:50 -04:00
config = {
isDesktop = true;
setupGrub = true;
nix.autoUpdate = false;
2022-07-18 16:37:10 -04:00
harden = false;
2023-06-23 05:51:13 -04:00
virtualization = {
docker = false;
podman = true;
};
2023-07-03 20:12:19 -04:00
windows = { enable = false; };
2022-07-03 00:43:50 -04:00
};
};
# Configure networking
networking = {
domain = "mccarty.io";
2023-07-03 19:56:15 -04:00
interfaces.enp6s0.useDHCP = true;
2023-07-03 19:41:32 -04:00
nat.externalInterface = "enp6s0";
2023-06-28 19:40:04 -04:00
# Open ports for soulseek and weylus
2022-07-03 00:43:50 -04:00
firewall = {
2023-06-28 19:40:04 -04:00
allowedTCPPorts = [ 61377 1701 9001 ];
allowedUDPPorts = [ 61377 1701 9001 ];
2022-07-03 00:43:50 -04:00
};
};
# Setup home manager
home-manager.users.nathan = import ./home.nix;
2022-07-24 13:52:34 -04:00
2023-06-13 23:12:52 -04:00
# Disable session persistance
services.logind.killUserProcesses = true;
2022-07-24 13:52:34 -04:00
# TPM setup
security = { tpm2 = { enable = true; }; };
2022-08-01 18:10:41 -04:00
2022-09-20 13:12:24 -04:00
# Configure nix build
nix.settings = {
2023-03-14 12:06:46 -04:00
cores = 16;
max-jobs = 4;
2022-09-20 13:12:24 -04:00
};
2022-11-05 03:18:08 -04:00
2023-04-30 23:06:47 -04:00
# vmware
virtualisation.vmware.host = {
enable = true;
package = unstable.vmware-workstation;
};
2022-07-03 00:43:50 -04:00
}