mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
network: add openfortivpn and wifi@db
This commit is contained in:
parent
cf9dedf17a
commit
dd997624a9
4 changed files with 42 additions and 3 deletions
|
@ -66,6 +66,9 @@
|
|||
psk = "@PIXEL_PSK@";
|
||||
authProtocols = [ "WPA-PSK" ];
|
||||
};
|
||||
"WIFI@DB" = {
|
||||
authProtocols = [ "NONE" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
age.secrets.tud = {
|
||||
file = ../../../../secrets/thinkpad/tud.age;
|
||||
age.secrets = {
|
||||
tud.file = ../../../../secrets/thinkpad/tud.age;
|
||||
agdsn.file = ../../../../secrets/thinkpad/agdsn.age;
|
||||
};
|
||||
networking = {
|
||||
wireless.networks = {
|
||||
|
@ -82,4 +83,28 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
systemd.services = {
|
||||
openfortivpn-agdsn = {
|
||||
description = "AG DSN Fortinet VPN";
|
||||
script = "${pkgs.openfortivpn}/bin/openfortivpn vpn.agdsn.de:443 --realm admin-vpn -u r5 -p $(cat $CREDENTIALS_DIRECTORY/password) --trusted-cert bbbe0df79764c5f1bd4b332e449e43a40e43eec57c983a1e75a1896e6eae4da5";
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network.target" "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
LoadCredential = [
|
||||
"password:${config.age.secrets.agdsn.path}"
|
||||
];
|
||||
ProtectSystem = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
|
||||
ProtectHome = true;
|
||||
ProtectClock = true;
|
||||
PrivateTmp = true;
|
||||
|
||||
LockPersonality = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue