From 83a61385410d9c3833d44011df376d0661f5ae1a Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Mon, 25 Nov 2024 23:15:07 -0600 Subject: [PATCH 1/5] Serve swiftgang.net on www instead --- bert/services/http/index.nix | 25 +++++++++++++++++++++++++ bert/services/http/swiftgang.net.nix | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bert/services/http/index.nix b/bert/services/http/index.nix index c358bb0..07342bc 100644 --- a/bert/services/http/index.nix +++ b/bert/services/http/index.nix @@ -23,5 +23,30 @@ metrics # Enable Prometheus monitoring } ''; + virtualHosts.":80" = { + serverAliases = [":443"]; + extraConfig = '' + respond < + + + not found - chandlerswift.com + + + +

not found - chandlerswift.com

+

This page is hosted with chandlerswift.com, + but the site couldn't be found.

+ + + EOF 404 + ''; + }; }; } diff --git a/bert/services/http/swiftgang.net.nix b/bert/services/http/swiftgang.net.nix index 1de094e..7ae5ec7 100644 --- a/bert/services/http/swiftgang.net.nix +++ b/bert/services/http/swiftgang.net.nix @@ -1,6 +1,9 @@ { - services.caddy.virtualHosts."swiftgang.net".extraConfig = '' + # GoDaddy can't do flattening to apply a CNAME to an apex record. So we use + # their "forwarding" (redirect-as-a-service) to redirect to www.…, which we + # _can_ CNAME. + services.caddy.virtualHosts."www.swiftgang.net".extraConfig = '' encode zstd gzip file_server root * /srv/www/swiftgang.net From 898a98ef1e80e9fdacdcbddff0f5aaef159b8283 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Mon, 25 Nov 2024 23:15:07 -0600 Subject: [PATCH 2/5] bert: Serve swiftgang.net on www instead --- bert/services/http/index.nix | 25 +++++++++++++++++++++++++ bert/services/http/swiftgang.net.nix | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bert/services/http/index.nix b/bert/services/http/index.nix index c358bb0..07342bc 100644 --- a/bert/services/http/index.nix +++ b/bert/services/http/index.nix @@ -23,5 +23,30 @@ metrics # Enable Prometheus monitoring } ''; + virtualHosts.":80" = { + serverAliases = [":443"]; + extraConfig = '' + respond < + + + not found - chandlerswift.com + + + +

not found - chandlerswift.com

+

This page is hosted with chandlerswift.com, + but the site couldn't be found.

+ + + EOF 404 + ''; + }; }; } diff --git a/bert/services/http/swiftgang.net.nix b/bert/services/http/swiftgang.net.nix index 1de094e..7ae5ec7 100644 --- a/bert/services/http/swiftgang.net.nix +++ b/bert/services/http/swiftgang.net.nix @@ -1,6 +1,9 @@ { - services.caddy.virtualHosts."swiftgang.net".extraConfig = '' + # GoDaddy can't do flattening to apply a CNAME to an apex record. So we use + # their "forwarding" (redirect-as-a-service) to redirect to www.…, which we + # _can_ CNAME. + services.caddy.virtualHosts."www.swiftgang.net".extraConfig = '' encode zstd gzip file_server root * /srv/www/swiftgang.net From 85570010c670c7eeedc65270423486d726404cb2 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sat, 30 Nov 2024 12:37:48 -0600 Subject: [PATCH 3/5] oscar: Add .direnv to global gitignore --- oscar/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index c690607..9096e17 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -218,6 +218,7 @@ "*~" "\\#*\\#" "venv" + ".direnv" ]; hooks = { pre-commit = ./git-pre-commit-hook; From fb4816998554c205316d0b091222dd8d714b8673 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sat, 30 Nov 2024 12:46:53 -0600 Subject: [PATCH 4/5] oscar: Set up beets configuration Eventually, I want to get the subsonicupdate plugin working, but that'll require credentials, and I don't want those to be committed in my config here. --- oscar/configuration.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index 9096e17..d1024a3 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -145,7 +145,6 @@ qgis # command line applications - beets iperf units @@ -252,6 +251,21 @@ # }; }; + programs.beets = { + enable = true; + settings = { + directory = "~/nas/chandler/public/media/music"; + library = "~/nas/chandler/public/media/music/beets.db"; + plugins = [ + "fetchart" + # "lyrics" + # "subsonicupdate" # TODO + "mbsubmit" + "edit" + ]; + }; + }; + programs.chromium = { enable = true; extensions = [ From c10a3036c81f83add75b97c966df0cffec800fb2 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Sat, 30 Nov 2024 21:35:00 -0600 Subject: [PATCH 5/5] oscar: Switch factorio -> factorio-space-age For a new version that hasn't hit `nixpkgs-unstable` yet, use this instead of the second change below: # (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/.tar.gz") { # config.allowUnfree = true; # }).factorio-space-age --- oscar/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index d1024a3..b72ebfc 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -124,8 +124,8 @@ home-manager.users.chandler = { pkgs, ... }: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "factorio-alpha" "discord" + "factorio-space-age" ]; home.packages = with pkgs; [ @@ -164,7 +164,7 @@ # Unfree: discord - factorio + factorio-space-age ]; programs.thunderbird.enable = true;