reformat all the nix files
using nix run -f channel:nixos-unstable nixfmt -c nixfmt $(git ls-files *.nix)
This commit is contained in:
parent
a7f51f92f1
commit
bf0be939cc
14 changed files with 312 additions and 312 deletions
|
@ -1,33 +1,29 @@
|
|||
{
|
||||
# To get the MAC address of each card, use this command: cat /sys/class/net/*device_name*/address
|
||||
# Make sure to use the lower-case hex values in your udev rules. It does not like upper-case.
|
||||
wanInterface,
|
||||
wireless ? {
|
||||
wleInterface = "wlp5s0";
|
||||
wleSSID = "hauser";
|
||||
# Generate Encrypted Passphrase with: wpa_passphrase <wleSSID> <passphrase>
|
||||
wlePassphrase = "a5e42b914b5ad2b7e0474c3b9b35d0843a52668d30cd6aa8650ec43263a60b6e";
|
||||
},
|
||||
lanInterfaces ? [ "enp2s0" "enp3s0" ],
|
||||
lanNetwork ? {
|
||||
routerAddress = "10.1.1.1";
|
||||
netid = "10.1.1.0";
|
||||
revIpDomain = "1.1.10";
|
||||
prefixLength = 24;
|
||||
domain = "ilanz.fh2.ch";
|
||||
dhcpRange = "10.1.1.2,10.1.1.249";
|
||||
routerHostName = "router";
|
||||
},
|
||||
}:
|
||||
# To get the MAC address of each card, use this command: cat /sys/class/net/*device_name*/address
|
||||
# Make sure to use the lower-case hex values in your udev rules. It does not like upper-case.
|
||||
wanInterface, wireless ? {
|
||||
wleInterface = "wlp5s0";
|
||||
wleSSID = "hauser";
|
||||
# Generate Encrypted Passphrase with: wpa_passphrase <wleSSID> <passphrase>
|
||||
wlePassphrase =
|
||||
"a5e42b914b5ad2b7e0474c3b9b35d0843a52668d30cd6aa8650ec43263a60b6e";
|
||||
}, lanInterfaces ? [ "enp2s0" "enp3s0" ], lanNetwork ? {
|
||||
routerAddress = "10.1.1.1";
|
||||
netid = "10.1.1.0";
|
||||
revIpDomain = "1.1.10";
|
||||
prefixLength = 24;
|
||||
domain = "ilanz.fh2.ch";
|
||||
dhcpRange = "10.1.1.2,10.1.1.249";
|
||||
routerHostName = "router";
|
||||
}, }:
|
||||
|
||||
let pkgs = import<nixpkgs>{};
|
||||
in
|
||||
{
|
||||
let pkgs = import <nixpkgs> { };
|
||||
in {
|
||||
imports = [
|
||||
(import ./wireless-access-point.nix wireless)
|
||||
(import ./dns-recursive.nix lanNetwork)
|
||||
(import ./wireless-access-point.nix wireless)
|
||||
(import ./dns-recursive.nix lanNetwork)
|
||||
];
|
||||
|
||||
|
||||
networking = {
|
||||
nat = {
|
||||
enable = true;
|
||||
|
@ -37,8 +33,11 @@ in
|
|||
|
||||
bridges.lan.interfaces = lanInterfaces ++ [ wireless.wleInterface ];
|
||||
interfaces.lan = {
|
||||
ipv4 = {
|
||||
addresses = [ { address = lanNetwork.routerAddress; prefixLength = lanNetwork.prefixLength; } ];
|
||||
ipv4 = {
|
||||
addresses = [{
|
||||
address = lanNetwork.routerAddress;
|
||||
prefixLength = lanNetwork.prefixLength;
|
||||
}];
|
||||
};
|
||||
};
|
||||
firewall.trustedInterfaces = [ "lan" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue