Add basic NixOS configuration for alucard

This commit is contained in:
Mikael 2024-11-12 21:05:23 +01:00
parent e73d473488
commit 0e86a6cf0f
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

41
nixos/config/alucard.nix Normal file
View file

@ -0,0 +1,41 @@
{ self, nixos-hardware, ... }: { lib, config, pkgs, ... }: {
imports = with self.nixosModules; [
default
headless
mimalloc
physical
];
networking = {
domain = "nyantec.com";
};
services.gobgpd = {
enable = true;
settings = {
global = {
as = 208250;
router-id = "45.150.121.0";
};
neighbors = [
] ++ map (n: {
config = {
neighbor-address = "2a0f:be00:1::${toString n}";
peer-as = 208250;
};
}) [ 1 2 3 ];
};
};
services.ntpd-rs = {
enable = true;
settings = {
source = map (address: {
mode = "server";
inherit address;
}) (map (n: "ptbtime${toString n}.ptb.de") (lib.range 1 4)
++ map (host: "${host}.nyantec.com") [ "casper" "melchior" "balthasar" ]);
};
};
}