pxeboot rewrite, bridge for qemu
This commit is contained in:
parent
ba91796c3e
commit
1dd7fac8ed
10 changed files with 129 additions and 112 deletions
80
common.nix
80
common.nix
|
|
@ -1,7 +1,5 @@
|
|||
{ config, pkgs, ... }: {
|
||||
boot = {
|
||||
extraModulePackages = [ config.boot.kernelPackages.amneziawg ];
|
||||
kernelModules = [ "amneziawg" ];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader.limine = {
|
||||
enable = true;
|
||||
|
|
@ -19,96 +17,24 @@
|
|||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
_7zz
|
||||
binutils
|
||||
file
|
||||
jq
|
||||
openssl
|
||||
python314
|
||||
qrencode
|
||||
sbctl
|
||||
sops
|
||||
speedtest-go
|
||||
];
|
||||
fileSystems = {
|
||||
"/".options = [ "noatime" ];
|
||||
"/boot".options = [ "noatime" ];
|
||||
};
|
||||
i18n.defaultLocale = "ru_RU.UTF-8";
|
||||
imports = [
|
||||
./mods/pxeboot.nix
|
||||
./mods/vps-init.nix
|
||||
];
|
||||
networking = {
|
||||
networkmanager = {
|
||||
dns = "dnsmasq";
|
||||
enable = true;
|
||||
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 = {
|
||||
peers = [
|
||||
{
|
||||
allowedIPs = [
|
||||
"::/0"
|
||||
"0.0.0.0/0"
|
||||
];
|
||||
endpoint = "bogaledev.ru";
|
||||
}
|
||||
];
|
||||
type = "amneziawg";
|
||||
};
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
nix.settings.experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
services = {
|
||||
dnsmasq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bogus-priv = true;
|
||||
cache-size = 4096;
|
||||
domain-needed = true;
|
||||
enable-ra = true;
|
||||
no-resolv = true;
|
||||
server = [
|
||||
"1.0.0.2"
|
||||
"1.1.1.2"
|
||||
"2606:4700:4700::1002"
|
||||
"2606:4700:4700::1112"
|
||||
];
|
||||
};
|
||||
};
|
||||
swapspace.enable = true;
|
||||
};
|
||||
services.swapspace.enable = true;
|
||||
sops = {
|
||||
age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
defaultSopsFile = ./.secrets.yaml;
|
||||
secrets = {
|
||||
awg-obf = { };
|
||||
root-passwd = { };
|
||||
wifi-env = { };
|
||||
};
|
||||
secrets.root-passwd = { };
|
||||
};
|
||||
system.stateVersion = "26.11";
|
||||
systemd.tmpfiles.rules = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue