From c3ff8f1e47306e01a8e923807395991aff21aa57 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Sat, 22 Oct 2022 22:18:32 +0100 Subject: [PATCH] add microserver.home host --- flake.nix | 11 ++++++++ .../default.nix | 27 +++++++++++++++++++ modules/secrets | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 hosts/microserver.home.ts.hillion.co.uk/default.nix diff --git a/flake.nix b/flake.nix index de744ee..ccb39ae 100644 --- a/flake.nix +++ b/flake.nix @@ -28,5 +28,16 @@ } ]; }; + + nixosConfigurations."microserver.home.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + specialArgs = inputs; + modules = [ + ./hosts/microserver.home.ts.hillion.co.uk/default.nix + { + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + } + ]; + }; }; } diff --git a/hosts/microserver.home.ts.hillion.co.uk/default.nix b/hosts/microserver.home.ts.hillion.co.uk/default.nix new file mode 100644 index 0000000..0670d7b --- /dev/null +++ b/hosts/microserver.home.ts.hillion.co.uk/default.nix @@ -0,0 +1,27 @@ +{ config, pkgs, lib, ... }: + +{ + system.stateVersion = "22.05"; + + networking.hostName = "microserver"; + networking.domain = "home.ts.hillion.co.uk"; + + imports = [ + ../../modules/common/default.nix + ../../modules/secrets/tailscale/microserver.home.ts.hillion.co.uk.nix + ]; + + tailscaleAdvertiseRoutes = "10.64.50.0/24,10.239.19.0/24"; + + networking.vlans = { + vlan2 = { + id = 2; + interface = "eth0"; + }; + }; + + boot.kernel.sysctl = { + "net.ipv4.ip_forward" = true; + }; +} + diff --git a/modules/secrets b/modules/secrets index f5dd821..f79ce8b 160000 --- a/modules/secrets +++ b/modules/secrets @@ -1 +1 @@ -Subproject commit f5dd82111a16988796e87b9dc741b2c1eb75b179 +Subproject commit f79ce8b5b5eb6e558363ba63f5f31cf7cf023cf1