73 lines
2 KiB
Nix
73 lines
2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
time.timeZone = "Asia/Chita";
|
|
system.stateVersion = "26.11";
|
|
imports = [ ./mods/pxeboot.nix ];
|
|
i18n.defaultLocale = "ru_RU.UTF-8";
|
|
swapDevices = [ { device = "/var/swapfile"; } ];
|
|
users.users.root.hashedPasswordFile = "/secrets/user/root-pw";
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
environment.systemPackages = with pkgs; [ jq _7zz sbctl openssl python314 ];
|
|
fileSystems = {
|
|
"/".options = [ "noatime" ];
|
|
"/boot".options = [ "noatime" ];
|
|
};
|
|
systemd.tmpfiles.rules = [
|
|
"d /root/backup"
|
|
"d /root/backup/base"
|
|
"L /root/backup/base/nixos - - - - /etc/nixos"
|
|
"L /root/backup/base/secrets - - - - /secrets"
|
|
"L /root/backup/base/sbctl - - - - /var/lib/sbctl"
|
|
];
|
|
boot = {
|
|
kernelModules = [ "amneziawg" ];
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
extraModulePackages = [ config.boot.kernelPackages.amneziawg ];
|
|
loader.limine = {
|
|
enable = true;
|
|
secureBoot.enable = true;
|
|
panicOnChecksumMismatch = true;
|
|
};
|
|
};
|
|
services.dnsmasq = {
|
|
enable = true;
|
|
settings = {
|
|
enable-ra = true;
|
|
no-resolv = true;
|
|
bogus-priv = true;
|
|
cache-size = 4096;
|
|
domain-needed = true;
|
|
server = [ "1.1.1.2" "1.0.0.2" "2606:4700:4700::1112" "2606:4700:4700::1002" ];
|
|
};
|
|
};
|
|
networking = {
|
|
wg-quick.interfaces.awg0 = {
|
|
type = "amneziawg";
|
|
peers = [ {
|
|
endpoint = "bogaledev.ru";
|
|
allowedIPs = [ "::/0" "0.0.0.0/0" ];
|
|
} ];
|
|
};
|
|
networkmanager = {
|
|
enable = true;
|
|
ensureProfiles = {
|
|
environmentFiles = [ "/secrets/wifi.env" ];
|
|
profiles.wifi = {
|
|
wifi-security.key-mgmt = "sae";
|
|
ipv6 = {
|
|
method = "manual";
|
|
gateway = "fc01::1";
|
|
};
|
|
ipv4 = {
|
|
method = "manual";
|
|
gateway = "10.1.0.1";
|
|
};
|
|
connection = {
|
|
id = "wifi";
|
|
type = "802-11-wireless";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|