67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
{ config, pkgs, ... }: {
|
|
boot = {
|
|
extraModulePackages = [ config.boot.kernelPackages.amneziawg ];
|
|
kernelModules = [ "amneziawg" ];
|
|
loader.limine.secureBoot.enable = true;
|
|
};
|
|
environment.systemPackages = with pkgs; [
|
|
dnsmasq
|
|
nixfmt-tree
|
|
openssl
|
|
sops
|
|
];
|
|
fileSystems."/".device = "/dev/mapper/root";
|
|
imports = [
|
|
../common.nix
|
|
./fs.nix
|
|
./vps-init.nix
|
|
];
|
|
networking = {
|
|
firewall = {
|
|
allowedTCPPorts = [ 53 ];
|
|
allowedUDPPorts = [
|
|
53
|
|
67
|
|
];
|
|
};
|
|
nat.enable = true;
|
|
networkmanager.ensureProfiles = {
|
|
environmentFiles = [ config.sops.secrets.wifi-env.path ];
|
|
profiles = {
|
|
dhcp-ethernet.connection = {
|
|
id = "dhcp-ethernet";
|
|
type = "ethernet";
|
|
};
|
|
home-wifi = {
|
|
connection = {
|
|
id = "home-wifi";
|
|
type = "wifi";
|
|
};
|
|
ipv6.method = "disabled";
|
|
wifi-security = {
|
|
key-mgmt = "sae";
|
|
psk = "$BOGALE_5_PSK";
|
|
};
|
|
wifi.ssid = "bogale";
|
|
};
|
|
};
|
|
};
|
|
wg-quick.interfaces.awg0.type = "amneziawg";
|
|
};
|
|
sops = {
|
|
age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
defaultSopsFile = ../.secrets.yaml;
|
|
secrets = {
|
|
awg-obf = { };
|
|
root-passwd.neededForUsers = true;
|
|
wifi-env.restartUnits = [ "NetworkManager.service" ];
|
|
};
|
|
};
|
|
systemd.tmpfiles.rules = [
|
|
"L /root/backup/base/nixos - - - - /etc/nixos"
|
|
"L /root/backup/base/sbctl - - - - /var/lib/sbctl"
|
|
"L /root/backup/base/sops-nix - - - - /var/lib/sops-nix"
|
|
"d /root/backup/base"
|
|
];
|
|
users.users.root.hashedPasswordFile = config.sops.secrets.root-passwd.path;
|
|
}
|