This commit is contained in:
Tim Schubert 2022-05-29 15:20:56 +02:00
parent d9ea10c456
commit aebf32e573
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
3 changed files with 83 additions and 0 deletions

View file

@ -46,6 +46,15 @@ in
];
};
mag = nixosSystem rec {
system = "x86_64-linux";
modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [
(adapterModule system)
./modules/profiles/server.nix
./mag/configuration.nix
];
};
surgat = nixosSystem rec {
system = "x86_64-linux";
modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [

View file

@ -0,0 +1,74 @@
{ config, pkgs, lib, ... }:
let
hostAliases = [
"mag.dadada.li"
"vpn.dadada.li"
];
in
{
imports = [
# ./hardware-configuration.nix
];
dadada = {
admin.enable = true;
vpnServer = {
enable = true;
peers = {
"morax" = {
id = "2";
key = "Lq5QLGoI3r3BXEJ72dWH9UTmY/8uaYRPLQB5WWHqJUE=";
};
"gorgon" = {
id = "3";
key = "0eWP1hzkyoXlrjPSOq+6Y1u8tnFH+SejBJs8f8lf+iU=";
};
"surgat" = {
id = "4";
key = "+paiOqOITdLy3oqoI2DhOj4k8gncAcjFLkJrxJl0iBE=";
};
"pruflas" = {
id = "5";
key = "o8B8rTA+u5XOJK4JI+TRCFjVJn/3T7UofLqFRIPoNQk=";
};
};
};
ddns.domains = [
"vpn.dadada.li"
];
};
networking.hostName = "mag";
networking.hosts = {
"127.0.0.1" = hostAliases;
"::1" = hostAliases;
};
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
networking.interfaces."ens3".tempAddress = "disabled";
networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true;
boot.kernelParams = [
"console=ttyS0,115200"
];
networking.firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [
22 # SSH
];
allowedUDPPorts = [
51234
];
};
system.stateVersion = "22.05";
}

View file