nixos/mods/host.nix

62 lines
1.3 KiB
Nix

{ config, pkgs, ... }: {
boot = {
extraModulePackages = [ config.boot.kernelPackages.amneziawg ];
kernelModules = [ "amneziawg" ];
};
fileSystems = {
"/".options = [ "noatime" ];
"/boot".options = [ "noatime" ];
};
imports = [
../common.nix
./pxeboot.nix
./vps-init.nix
];
networking = {
networkmanager = {
dns = "dnsmasq";
ensureProfiles = {
environmentFiles = [ config.sops.secrets.wifi-env.path ];
profiles.home-wifi = {
connection = {
id = "home-wifi";
type = "wifi";
};
ipv4 = {
gateway = "10.1.0.1";
method = "manual";
};
ipv6 = {
gateway = "fc01::1";
method = "manual";
};
wifi-security = {
key-mgmt = "sae";
psk = "$BOGALE_5_PSK";
};
wifi.ssid = "bogale_5";
};
};
};
wg-quick.interfaces.awg0.type = "amneziawg";
};
services.dnsmasq = {
enable = true;
settings = {
bogus-priv = true;
cache-size = 4096;
domain-needed = true;
no-resolv = true;
server = [
"1.0.0.2"
"1.1.1.2"
"2606:4700:4700::1002"
"2606:4700:4700::1112"
];
};
};
sops.secrets = {
awg-obf = { };
wifi-env = { };
};
}