WG config test for exoplasim

This commit is contained in:
Vili Sinervä 2024-11-08 14:39:53 +02:00
parent 8d37647a88
commit 83c11ba039
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996

View file

@ -5,34 +5,23 @@
networking = { networking = {
hostName = "exoplasim"; hostName = "exoplasim";
# wg-quick.interfaces = { firewall.allowedUDPPorts = [ 51821 ];
# wg0 = {
# autostart = true;
# address = [
# "fd08:d473:bcca:f0::3/64"
# "2001:14ba:a08c:2df0::3/64"
# ];
# dns = [
# "fd08:d473:bcca::1"
# "vsinerva.fi"
# ];
# privateKeyFile = "/root/wireguard-keys/privatekey-home";
# listenPort = 51820;
# peers = [ wg-quick.interfaces = {
# { wg0 = {
# publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34="; address = [ "10.0.0.1/24" ];
# presharedKeyFile = "/root/wireguard-keys/psk-home"; privateKeyFile = "/root/wireguard-keys/privatekey";
# allowedIPs = [ listenPort = 51821;
# "fd08:d473:bcca::/64"
# "fd08:d473:bcca:f0::/64" peers = [
# "::/0" {
# ]; publicKey = "9FOmHXs0CmDlW61noS7DqhgH5GfQHzg8ZMasyNQACSc=";
# endpoint = "wg.vsinerva.fi:51820"; presharedKeyFile = "/root/wireguard-keys/psk";
# } allowedIPs = [ "10.0.0.2/32" ];
# ]; }
# }; ];
# }; };
};
}; };
# User worker # User worker
@ -42,8 +31,9 @@
description = "ExoPlaSim Worker"; description = "ExoPlaSim Worker";
uid = 1001; uid = 1001;
extraGroups = [ "networkmanager" ]; extraGroups = [ "networkmanager" ];
openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys ++ [ ]; openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys ++ [
# hashedPasswordFile = "/root/hashed-passwords/worker"; # TODO add user-specific key
];
}; };
users.groups.worker.gid = 1001; users.groups.worker.gid = 1001;