[albert] cleanup
This commit is contained in:
@@ -5,8 +5,10 @@ let
|
||||
hosts = import ../hosts.nix {};
|
||||
in
|
||||
{
|
||||
networking.hostName = "albert";
|
||||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets.njala_api_key = {};
|
||||
sops.secrets.wg_private = {};
|
||||
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
@@ -77,39 +79,6 @@ in
|
||||
ethernetDrivers = ["r8169"];
|
||||
};
|
||||
|
||||
boot.initrd = {
|
||||
availableKernelModules = [ "wireguard" ];
|
||||
# postMountCommands = ''
|
||||
# ip address flush dev wg-initrd
|
||||
# ip link set dev wg-initrd down
|
||||
# '';
|
||||
systemd = {
|
||||
enable = true;
|
||||
network = {
|
||||
enable = true;
|
||||
netdevs."30-wg-initrd" = {
|
||||
netdevConfig = {
|
||||
Kind = "wireguard";
|
||||
Name = "wg-initrd";
|
||||
};
|
||||
wireguardConfig = { PrivateKeyFile = "/etc/secrets/30-wg-initrd.key"; };
|
||||
wireguardPeers = [{
|
||||
AllowedIPs = peers.vpn.allowedIPs;
|
||||
PublicKey = peers.vpn.publicKey;
|
||||
Endpoint = "${peers.vpn.publicIp}:${builtins.toString(peers.vpn.listenPort)}";
|
||||
PersistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
networks."30-wg-initrd" = {
|
||||
name = "wg-initrd";
|
||||
addresses = [{ Address = "${peers.albert-initrd.address}/24"; }]; #noch nicht existent... TODO
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.secrets."/etc/secrets/30-wg-initrd.key" = "/etc/wireguard/wg.private";
|
||||
|
||||
services.malobeo.vpn = {
|
||||
enable = true;
|
||||
name = "albert";
|
||||
@@ -124,7 +93,6 @@ in
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.acpid.enable = true;
|
||||
networking.hostName = "albert";
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "Europe/Berlin";
|
||||
system.stateVersion = "23.05"; # Do.. Not.. Change..
|
||||
|
||||
Reference in New Issue
Block a user