converted to working wireguard module

This commit is contained in:
Anish L 2022-06-14 17:29:17 +10:00
parent c1650e57c8
commit 04490dceb8
4 changed files with 31 additions and 15 deletions

View file

@ -122,10 +122,10 @@
}; };
suites = with profiles; rec { suites = with profiles; rec {
base = [ core users.root users.anish ]; base = [ core users.root users.anish ];
sealight = [ base server ]; # matrix rsshub backup wireguard sealight = [ base server ]; # matrix rsshub backup wireguard-server
mossnet = [ base server taskd wireguard-box shaarli wallabag dns backup monitoring nfs rss-bridge gonic headphones radicale ]; # hpi syncthing mossnet = [ base server taskd wireguard-box shaarli wallabag dns monitoring nfs rss-bridge gonic headphones radicale ]; # hpi syncthing
cube = [ base site server ]; # backup cube = [ base site server ]; # backup
graphical = [ base bluetooth music sync wireguard wifi desktop ]; graphical = [ base bluetooth music sync wifi desktop ];
curve = [ graphical secrets ]; # backup? curve = [ graphical secrets ]; # backup?
work = [ base ]; work = [ base ];
}; };

View file

@ -32,4 +32,12 @@
# seafile? # seafile?
# syncthing # syncthing
}; };
#age.secrets.box-wg.file = "${self}/secrets/curve-wg.age";
#age.secrets.box-wg.owner = "anish";
#mossnet.wg = {
# enable = true;
# ips = [ "10.0.69.4/24" ];
# privateKeyFile = "/run/agenix/box-wg";
#};
} }

View file

@ -28,6 +28,14 @@
boot.supportedFilesystems = [ "ntfs" ]; boot.supportedFilesystems = [ "ntfs" ];
age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age";
age.secrets.curve-wg.owner = "anish";
mossnet.wg = {
enable = true;
ips = [ "10.0.69.2/24" ];
privateKeyFile = "/run/agenix/curve-wg";
};
age.secrets.borg-password.file = "${self}/secrets/borg-password.age"; age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
mossnet.backup = { mossnet.backup = {
enable = true; enable = true;

View file

@ -6,7 +6,7 @@ in
{ {
options = { options = {
mossnet.wg = { mossnet.wg = {
enable = mkEnableOption "Gain access to all mossnet systems through wireguard, but only if it's already included in the server config"; enable = mkEnableOption "Gain access to all mossnet systems through wireguard";
ips = lib.mkOption { ips = lib.mkOption {
type = with types; listOf str; type = with types; listOf str;
default = { }; default = { };
@ -16,17 +16,17 @@ in
description = '' description = ''
The IP this machine is allowed to connect to The IP this machine is allowed to connect to
''; '';
privateKeyFile = lib.mkOption { };
type = types.path; privateKeyFile = lib.mkOption {
default = { }; type = types.path;
example = literalExample '' default = { };
/run/agenix/wg-curve example = literalExample ''
''; /run/agenix/wg-curve
description = '' '';
The private ssh key file to use to connect! description = ''
Remember set age.secrets.*.file and age.secrets.*.user The private ssh key file to use to connect!
''; Remember set age.secrets.*.file and age.secrets.*.user
}; '';
}; };
}; };
}; };