From e02c3832a904d9aa272b228b411697b8f893519e Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Wed, 20 Nov 2024 08:16:57 -0600 Subject: [PATCH 1/4] bert: Add lawrencedeerclub.chandlerswift.com --- bert/services/http/index.nix | 1 + .../lawrencedeerclub.chandlerswift.com.nix | 18 ++++++++++++++++++ bert/services/monitoring.nix | 16 ++++++++++++++++ bigbird/configuration.nix | 11 +++++++++++ 4 files changed, 46 insertions(+) create mode 100644 bert/services/http/lawrencedeerclub.chandlerswift.com.nix diff --git a/bert/services/http/index.nix b/bert/services/http/index.nix index 457bfb2..c358bb0 100644 --- a/bert/services/http/index.nix +++ b/bert/services/http/index.nix @@ -7,6 +7,7 @@ ./home.chandlerswift.com.nix ./isaacswift.com.nix ./katherineandchandler.com.nix + ./lawrencedeerclub.chandlerswift.com.nix ./maps.chandlerswift.com.nix ./music.chandlerswift.com.nix ./preview.chandlerswift.com.nix diff --git a/bert/services/http/lawrencedeerclub.chandlerswift.com.nix b/bert/services/http/lawrencedeerclub.chandlerswift.com.nix new file mode 100644 index 0000000..90baa16 --- /dev/null +++ b/bert/services/http/lawrencedeerclub.chandlerswift.com.nix @@ -0,0 +1,18 @@ + +{ + services.caddy.virtualHosts."lawrencedeerclub.chandlerswift.com".extraConfig = '' + encode zstd gzip + file_server + root * /srv/www/lawrencedeerclub.chandlerswift.com + # hide .git # ??? + + handle_errors { + respond "{err.status_code} {err.status_text}" + } + ''; + systemd.tmpfiles.settings."10-lawrencedeerclub-chandlerswift-com" = { + "/srv/www/lawrencedeerclub.chandlerswift.com" = { + d = {}; + }; + }; +} diff --git a/bert/services/monitoring.nix b/bert/services/monitoring.nix index 8f524c4..51c4b7e 100644 --- a/bert/services/monitoring.nix +++ b/bert/services/monitoring.nix @@ -18,6 +18,22 @@ ]; }]; } + { + job_name = "bigbird_zfs"; + static_configs = [{ + targets = [ + "bigbird:9134" + ]; + }]; + } + { + job_name = "bigbird"; + static_configs = [{ + targets = [ + "bigbird:9100" + ]; + }]; + } ]; exporters.node = { enable = true; diff --git a/bigbird/configuration.nix b/bigbird/configuration.nix index 5a05bb6..0bac923 100644 --- a/bigbird/configuration.nix +++ b/bigbird/configuration.nix @@ -37,6 +37,17 @@ services.openssh.settings.PasswordAuthentication = false; users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhPyyqS3BGYor3zLbjc8hZuhem3mS8TNmvWogXcnz/b chandler@chandlerswift.com'' ]; + services.prometheus.exporters = { + node = { + enable = true; + enabledCollectors = [ + "systemd" + "zfs" + ]; + openFirewall = true; + }; + }; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; From ab8019390fd91b5c9a5a21529c0b1fbcfe6384f1 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Wed, 20 Nov 2024 08:18:09 -0600 Subject: [PATCH 2/4] oscar: Use Kicad from PR'd branch to fix libgit2 build issue --- oscar/configuration.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 896bcbf..1f624ee 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -137,7 +137,8 @@ gnome-sound-recorder josm kate - kicad + # kicad # https://github.com/NixOS/nixpkgs/issues/335003 + (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/13456ccaf2874c921891b04fe0c39fc79aa7357f.tar.gz") {}).kicad libreoffice-qt prismlauncher prusa-slicer From 85940f04743146abd6df29f26655389ac489e79a Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Wed, 20 Nov 2024 08:20:45 -0600 Subject: [PATCH 3/4] oscar: Add home-manager ssh config --- oscar/configuration.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 1f624ee..2c3f126 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -226,6 +226,17 @@ signing.key = null; # "let GnuPG decide what signing key to use depending on commit's author" }; + programs.ssh = { + enable = true; + addKeysToAgent = "yes"; + matchBlocks = { + bigbird = { + user = "root"; + }; + }; + extraConfig = ""; + }; + programs.firefox = { enable = true; # profiles = { From ee47eb1ed20c9dda25df8d62439c1dcfe2e9d991 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Wed, 20 Nov 2024 08:22:48 -0600 Subject: [PATCH 4/4] oscar: Add include for untracked ssh_config For example, this is useful for setting up temporary hosts that I don't want tracked in my config. Sometimes I do this for e.g. vscodium remote SSH. --- oscar/configuration.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 2c3f126..c690607 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -234,7 +234,9 @@ user = "root"; }; }; - extraConfig = ""; + includes = [ + "config.d/*" + ]; }; programs.firefox = {