51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
|
{ config, lib, pkgs, inputs, ... }:
|
||
|
|
||
|
{
|
||
|
# 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 = {
|
||
|
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;
|
||
|
# Open ports in firewall
|
||
|
firewall = {
|
||
|
allowedTCPPorts = [ ];
|
||
|
allowedUDPPorts = [ ];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# Setup home manager
|
||
|
home-manager.users.nathan = import ./home.nix;
|
||
|
}
|