mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-07-06 02:31:48 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7434f11922 | |||
| 9d1b0bc345 | |||
| 897f1244b6 | |||
| 3f1c470059 |
@@ -48,7 +48,11 @@
|
|||||||
networks."20-br0" = {
|
networks."20-br0" = {
|
||||||
matchConfig.Name = "br0";
|
matchConfig.Name = "br0";
|
||||||
|
|
||||||
address = with values.hosts.${lupineName}; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
address = with values.hosts.${lupineName}; [
|
||||||
|
(ipv4 + "/25")
|
||||||
|
(ipv6 + "/64")
|
||||||
|
values.services.knutsen-vpn
|
||||||
|
];
|
||||||
networkConfig.LLDP = false;
|
networkConfig.LLDP = false;
|
||||||
|
|
||||||
dns = ["129.241.0.200" "129.241.0.201" "2001:700:300:1900::200" "2001:700:300:1900::201"];
|
dns = ["129.241.0.200" "129.241.0.201" "2001:700:300:1900::200" "2001:700:300:1900::201"];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, lib, values, ... }:
|
{ config, pkgs, lib, values, ... }:
|
||||||
let
|
let
|
||||||
renderConfig = attrs: lib.pipe attrs [
|
renderConfig = attrs: lib.pipe attrs [
|
||||||
(lib.filterAttrs (_: value: !(builtins.isNull value || value == false)))
|
(lib.filterAttrs (_: value: !(builtins.isNull value || value == false)))
|
||||||
@@ -20,6 +20,12 @@ let
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
sops.secrets = {
|
||||||
|
"openvpn/ca/crt" = { };
|
||||||
|
"openvpn/server/crt" = { };
|
||||||
|
"openvpn/server/key" = { };
|
||||||
|
};
|
||||||
|
|
||||||
services.openvpn.servers."ov-tunnel" = {
|
services.openvpn.servers."ov-tunnel" = {
|
||||||
config = renderConfig {
|
config = renderConfig {
|
||||||
# TODO: use aliases
|
# TODO: use aliases
|
||||||
@@ -32,11 +38,10 @@ in
|
|||||||
|
|
||||||
script-security = 0;
|
script-security = 0;
|
||||||
|
|
||||||
# TODO: set up
|
ca = config.sops.secrets."openvpn/ca/crt".path;
|
||||||
# ca = "";
|
cert = config.sops.secrets."openvpn/server/crt".path;
|
||||||
# cert = "";
|
key = config.sops.secrets."openvpn/server/key".path;
|
||||||
# key = "";
|
dh = "none";
|
||||||
# dh = "";
|
|
||||||
|
|
||||||
# Maintain a record of client <-> virtual IP address
|
# Maintain a record of client <-> virtual IP address
|
||||||
# associations in this file. If OpenVPN goes down or
|
# associations in this file. If OpenVPN goes down or
|
||||||
@@ -67,7 +72,7 @@ in
|
|||||||
|
|
||||||
client-config-dir = pkgs.writeTextDir "ludvigsen" ''
|
client-config-dir = pkgs.writeTextDir "ludvigsen" ''
|
||||||
# Sett IP-adr. for tap0 til ludvigsens PVV-addresse.
|
# Sett IP-adr. for tap0 til ludvigsens PVV-addresse.
|
||||||
ifconfig-push ${values.services.ludvigsen-vpn} 255.255.255.128
|
ifconfig-push ${values.services.ludvigsen-tap} 255.255.255.128
|
||||||
|
|
||||||
# Hvordan skal man faa dette til aa funke, tro?
|
# Hvordan skal man faa dette til aa funke, tro?
|
||||||
# ifconfig-ipv6-push 2001:700:300:1900::xxx/64
|
# ifconfig-ipv6-push 2001:700:300:1900::xxx/64
|
||||||
|
|||||||
+35
-25
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user