feat: Dynamic templating
This commit is contained in:
@@ -5,5 +5,25 @@
|
||||
nixosModules.default = import ./module.nix;
|
||||
configPathsNeeded =
|
||||
builtins.fromJSON (builtins.readFile ./config-paths-needed.json);
|
||||
meta = { lib, ... }: {
|
||||
spModuleVersion = 1;
|
||||
id = "ocserv";
|
||||
name = "OpenConnect VPN";
|
||||
description = "OpenConnect VPN to connect your devices and access the internet.";
|
||||
svgIcon = builtins.readFile ./icon.svg;
|
||||
isMovable = false;
|
||||
isRequired = false;
|
||||
canBeBackedUp = false;
|
||||
backupDescription = "Backups are not available for OpenConnect VPN.";
|
||||
systemdServices = [
|
||||
"ocserv.service"
|
||||
];
|
||||
license = [
|
||||
lib.licenses.gpl2Plus
|
||||
];
|
||||
homepage = "https://gitlab.com/openconnect/ocserv";
|
||||
sourcePage = "https://gitlab.com/openconnect/ocserv";
|
||||
supportLevel = "deprecated";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
3
sp-modules/ocserv/icon.svg
Normal file
3
sp-modules/ocserv/icon.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1ZM12 11.99H19C18.47 16.11 15.72 19.78 12 20.93V12H5V6.3L12 3.19V11.99Z" fill="black"/>
|
||||
</svg>
|
After Width: | Height: | Size: 270 B |
@@ -7,13 +7,26 @@ let
|
||||
in
|
||||
{
|
||||
options.selfprivacy.modules.ocserv = {
|
||||
enable = lib.mkOption {
|
||||
enable = (lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enable";
|
||||
}) // {
|
||||
meta = {
|
||||
type = "enable";
|
||||
};
|
||||
};
|
||||
subdomain = lib.mkOption {
|
||||
subdomain = (lib.mkOption {
|
||||
default = "vpn";
|
||||
type = lib.types.strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
|
||||
description = "Subdomain";
|
||||
}) // {
|
||||
meta = {
|
||||
widget = "subdomain";
|
||||
type = "string";
|
||||
regex = "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
|
||||
weight = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user