From 0e86a6cf0f565e2edb0f901b56d69b19815beb89 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Tue, 12 Nov 2024 21:05:23 +0100 Subject: [PATCH] Add basic NixOS configuration for alucard --- nixos/config/alucard.nix | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 nixos/config/alucard.nix diff --git a/nixos/config/alucard.nix b/nixos/config/alucard.nix new file mode 100644 index 0000000..f5327b4 --- /dev/null +++ b/nixos/config/alucard.nix @@ -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" ]); + }; + }; +}