System/machines/fusion/configuration.nix

71 lines
1.6 KiB
Nix
Raw Normal View History

2022-11-23 20:36:59 -05:00
{ config, lib, pkgs, inputs, ... }:
{
# Sops setup for this machine
2022-11-29 00:22:23 -05:00
sops.secrets = {
"borg-ssh-key" = {
2022-11-29 00:31:24 -05:00
sopsFile = ../../secrets/fusion/borg.yaml;
2022-11-29 00:22:23 -05:00
format = "yaml";
};
"borg-password" = {
2022-11-29 00:31:24 -05:00
sopsFile = ../../secrets/fusion/borg.yaml;
2022-11-29 00:22:23 -05:00
format = "yaml";
};
};
2022-11-23 20:36:59 -05:00
# Setup system configuration
nathan = {
services = {
nginx = {
enable = true;
acme = true;
};
2022-11-29 00:22:23 -05:00
borg = {
enable = true;
extraExcludes = [ "/var/log" ];
passwordFile = config.sops.secrets."borg-password".path;
sshKey = config.sops.secrets."borg-ssh-key".path;
};
2022-11-23 20:36:59 -05:00
};
config = {
setupGrub = false;
nix = {
autoUpdate = true;
autoGC = true;
};
harden = false;
};
};
# Configure bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelParams = [ "net.ifnames=0" ];
# Configure networking
networking = {
domain = "mccarty.io";
useDHCP = true;
nameservers = [ "1.1.1.1" ];
# Open ports in firewall
firewall = {
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
};
};
# Setup home manager
home-manager.users.nathan = import ./home.nix;
2022-11-29 00:45:27 -05:00
# Setup gitea
services.gitea = {
enable = true;
domain = "gitea.stranger.systems";
rootUrl = "https://gitea.stranger.systems";
appName = "Stranger Systems Git Mirror";
};
services.nginx.virtualHosts."gitea.stranger.systems" = {
enableACME = true;
forceSSL = true;
locations."/" = { proxyPass = "http://localhost:3000"; };
};
2022-11-23 20:36:59 -05:00
}