🧹 restructure layout

This commit is contained in:
Moritz Böhme 2022-07-15 13:11:54 +02:00
parent 40c2a5fb29
commit 268374ad58
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
115 changed files with 2641 additions and 2085 deletions

View file

@ -1,23 +1,41 @@
{ config, lib, pkgs, ... }:
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.services.openconnect;
in
{
networking.openconnect.interfaces = {
university = {
autoStart = false;
gateway = "vpn.uni-leipzig.de";
protocol = "anyconnect";
user = "mb18cele@uni-leipzig.de";
# NOTE file content as follows:
# <my_password>
# "1-Standard-Uni" or "2-Spezial-Alles"
# Explanation:
# 1-Standard-Uni = Uni Dienste über VPN (Standard)
# 2-Spezial-Alles = Gesamter Datenverkehr über VPN (Spezial)
passwordFile = "/run/agenix/uniVPN";
options.my.services.openconnect = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
age.secrets.uniVPN = {
file = ../../secrets/uni-vpn.age;
owner = "1000";
config = lib.mkIf cfg.enable {
networking.openconnect.interfaces = {
university = {
autoStart = false;
gateway = "vpn.uni-leipzig.de";
protocol = "anyconnect";
user = "mb18cele@uni-leipzig.de";
# NOTE file content as follows:
# <my_password>
# "1-Standard-Uni" or "2-Spezial-Alles"
# Explanation:
# 1-Standard-Uni = Uni Dienste über VPN (Standard)
# 2-Spezial-Alles = Gesamter Datenverkehr über VPN (Spezial)
passwordFile = "/run/agenix/uniVPN";
};
};
age.secrets.uniVPN = {
file = ../../secrets/uni-vpn.age;
owner = "1000";
};
};
}