final
This commit is contained in:
parent
a8115e76f8
commit
6079633b13
5 changed files with 61 additions and 45 deletions
|
|
@ -1,5 +1,8 @@
|
|||
{ config, pkgs, ... }: {
|
||||
boot.kernelParams = [ "cfg80211.ieee80211_regdom=RU" "consoleblank=60" ];
|
||||
boot.kernelParams = [
|
||||
"cfg80211.ieee80211_regdom=RU"
|
||||
"consoleblank=60"
|
||||
];
|
||||
imports = [
|
||||
../mods/host.nix
|
||||
./hardware.nix
|
||||
|
|
@ -19,32 +22,34 @@
|
|||
allowedUDPPorts = [ 443 ];
|
||||
};
|
||||
hostName = "nixos-server";
|
||||
nat = {
|
||||
extraCommands = ''
|
||||
${pkgs.iproute2}/bin/ip rule add lookup main priority 29588 from \
|
||||
${config.networking.networkmanager.ensureProfiles.profiles.home-wifi.ipv4.addresses}
|
||||
'';
|
||||
internalInterfaces = [ "wlp2s0" ];
|
||||
};
|
||||
networkmanager.ensureProfiles.profiles = {
|
||||
#dhcp-ethernet.ethernet.cloned-mac-address = "0C:0E:76:A6:E6:B6";
|
||||
home-wifi = {
|
||||
ipv4 = {
|
||||
addresses = "10.1.0.1/16";
|
||||
method = "shared";
|
||||
};
|
||||
wifi = {
|
||||
band = "a";
|
||||
channel = 157;
|
||||
channel-width = 80;
|
||||
mode = "ap";
|
||||
};
|
||||
wifi-security = {
|
||||
group = "ccmp";
|
||||
pairwise = "ccmp";
|
||||
proto = "rsn";
|
||||
nat.internalInterfaces = [ "wlp2s0" ];
|
||||
networkmanager = {
|
||||
ensureProfiles.profiles = {
|
||||
dhcp-ethernet.ethernet.cloned-mac-address = "0C:0E:76:A6:E6:B6";
|
||||
home-wifi = {
|
||||
ipv4 = {
|
||||
addresses = "10.1.0.1/16";
|
||||
method = "shared";
|
||||
};
|
||||
wifi = {
|
||||
band = "a";
|
||||
channel = 157;
|
||||
channel-width = 80;
|
||||
mode = "ap";
|
||||
};
|
||||
wifi-security = {
|
||||
group = "ccmp";
|
||||
pairwise = "ccmp";
|
||||
proto = "rsn";
|
||||
};
|
||||
};
|
||||
};
|
||||
insertNameservers = [
|
||||
"1.0.0.2"
|
||||
"1.1.1.2"
|
||||
"2606:4700:4700::1002"
|
||||
"2606:4700:4700::1112"
|
||||
];
|
||||
};
|
||||
wg-quick.interfaces.awg0.configFile = config.sops.templates.awg1-conf.path;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue