First commit
This commit is contained in:
57
modules/networking/home-nix.nix
Normal file
57
modules/networking/home-nix.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
...
|
||||
}@attrs:
|
||||
{
|
||||
networking = {
|
||||
hostName = "${attrs.hostname}";
|
||||
interfaces.enp5s0 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.0.2";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = {
|
||||
address = "192.168.0.254";
|
||||
interface = "enp5s0";
|
||||
};
|
||||
nameservers = [
|
||||
"10.0.0.1"
|
||||
"2001:41d0:303:20da::1"
|
||||
"217.182.138.218"
|
||||
];
|
||||
networkmanager.enable = true;
|
||||
extraHosts = ''
|
||||
172.18.23.4 dozzle.grandbesancon.fr
|
||||
172.18.21.67 toto.grandbesancon.fr
|
||||
'';
|
||||
wireguard = {
|
||||
interfaces = {
|
||||
wg0 = {
|
||||
ips = [
|
||||
"fc00::2/128"
|
||||
"10.0.0.2/32"
|
||||
];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = "/etc/wireguard/privatekey";
|
||||
peers = [
|
||||
{
|
||||
publicKey = "X8D/RhwjpFYXm2DbtC0wY39TrFkdaw7RA7kHhbmOXnw=";
|
||||
presharedKeyFile = "/etc/wireguard/presharedkey";
|
||||
allowedIPs = [
|
||||
"fc00::0/56"
|
||||
"10.0.0.0/16"
|
||||
];
|
||||
endpoint = "[2001:41d0:303:20da::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
./openfortivpn.nix
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user