From 6c5ba885a0b655ff783fe0bb44fc3eec1be5f538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Mon, 28 Nov 2022 11:09:25 +0100 Subject: [PATCH 1/2] Use bunny-net cdn --- config/services/peertube/default.nix | 9 +++++++-- zones/chir.rs.nix | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/config/services/peertube/default.nix b/config/services/peertube/default.nix index 9de6b6ae..a525e3c6 100644 --- a/config/services/peertube/default.nix +++ b/config/services/peertube/default.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: { services.peertube = { enable = true; localDomain = "peertube.chir.rs"; @@ -25,7 +30,7 @@ database.createLocally = true; redis.createLocally = true; }; - systemd.services.peertube.path = with pkgs; lib.mkForce [ bashInteractive ffmpeg_5 nodejs-16_x openssl yarn python3 coreutils systemd ]; + systemd.services.peertube.path = with pkgs; lib.mkForce [bashInteractive ffmpeg_5 nodejs-16_x openssl yarn python3 coreutils systemd]; services.caddy.virtualHosts."peertube.chir.rs" = { useACMEHost = "chir.rs"; extraConfig = '' diff --git a/zones/chir.rs.nix b/zones/chir.rs.nix index ab97279d..20b89e1c 100644 --- a/zones/chir.rs.nix +++ b/zones/chir.rs.nix @@ -102,7 +102,7 @@ with dns.lib.combinators; let SOA = { nameServer = "ns1.chir.rs."; adminEmail = "lotte@chir.rs"; - serial = 17; + serial = 18; }; NS = [ "ns1.chir.rs." @@ -181,13 +181,17 @@ with dns.lib.combinators; let ns2 = createZone {}; hydra = createZone {}; mastodon = createZone {}; - mastodon-assets = createZone {}; + mastodon-assets.CNAME = [ + "assets-chir-rs.b-cdn.net" + ]; matrix = createZone {}; drone = createZone {}; invtracker = createZone {}; akko = createZone {}; moa = createZone {}; - cache = createZone {}; + cache.CNAME = [ + "cache-chir-rs.b-cdn.net" + ]; peertube = createZone {}; int = -- 2.47.0 From a05f966b947f4b4b177512295aa98e6d1836117d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Mon, 28 Nov 2022 11:52:49 +0100 Subject: [PATCH 2/2] include cache.nixos.org in the substituter list --- .github/workflows/build.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/update.yml | 2 +- config/nas.nix | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d111e146..63137aae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg= hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs= experimental-features = nix-command flakes ca-derivations post-build-hook = ${{ github.workspace }}/scripts/post-build-hook - substituters = https://cache.chir.rs/ + substituters = https://cache.chir.rs/ https://cache.nixos.org/ - name: Download patched nix run: nix build github:DarkKirb/nix-packages#nix-s3-dedup - name: Set up secrets diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e9cf83ea..6db492cf 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -16,7 +16,7 @@ jobs: trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg= hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs= experimental-features = nix-command flakes ca-derivations post-build-hook = ${{ github.workspace }}/scripts/post-build-hook - substituters = https://cache.chir.rs/ + substituters = https://cache.chir.rs/ https://cache.nixos.org/ - name: Download patched nix run: nix build github:DarkKirb/nix-packages#nix-s3-dedup - name: Set up secrets diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 99a34f44..d34e594f 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -18,7 +18,7 @@ jobs: trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg= hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs= experimental-features = nix-command flakes ca-derivations post-build-hook = ${{ github.workspace }}/scripts/post-build-hook - substituters = https://cache.chir.rs/ + substituters = https://cache.chir.rs/ https://cache.nixos.org/ - name: Set up secrets run: | echo "$NIX_CACHE_KEY" > ~/cache.key diff --git a/config/nas.nix b/config/nas.nix index 1d4f8e98..6ca7ba66 100644 --- a/config/nas.nix +++ b/config/nas.nix @@ -247,6 +247,7 @@ hardware.enableRedistributableFirmware = true; nix.settings.substituters = lib.mkForce [ "https://cache.chir.rs/" + "https://cache.nixos.org/" ]; nix.daemonCPUSchedPolicy = "idle"; nix.daemonIOSchedClass = "idle"; -- 2.47.0