summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix28
-rw-r--r--services/continuwuity.nix6
2 files changed, 22 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index 4a7716c..8b48c5f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -50,8 +50,24 @@
"x86_64-linux"
"aarch64-linux"
];
+ # Allows code to execute for all used architectures
forAllSystems = f: (lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system}));
- treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./modules/treefmt.nix);
+
+ # Treefmt has a bunch of long paths that we want to bundle.
+ treefmtStuff = forAllSystems (
+ pkgs:
+ let
+ treefmt = treefmt-nix.lib.evalModule pkgs ./modules/treefmt.nix;
+ in
+ {
+ formatter = treefmt.config.build.wrapper;
+ formatCheck = {
+ formatting = treefmt.config.build.check self;
+ };
+ }
+ );
+ # Convenient extractor which generates an attrset of system: attribute, with the attribute being picked from treefmtStuff by name.
+ treefmtExtract = name: (builtins.mapAttrs (_system: conf: conf."${name}") (treefmtStuff));
in
{
# packages."x86_64-linux".full-iso = self.nixosConfigurations.full-iso.config.system.build.isoImage;
@@ -61,15 +77,9 @@
})
);
# for `nix fmt`
- formatter = (
- forAllSystems (pkgs: treefmtEval.${pkgs.stdenv.hostPlatform.system}.config.build.wrapper)
- );
+ formatter = treefmtExtract "formatter";
# for `nix flake check`
- checks = (
- forAllSystems (pkgs: {
- formatting = treefmtEval.${pkgs.stdenv.hostPlatform.system}.config.build.check self;
- })
- );
+ checks = treefmtExtract "formatCheck";
nixosConfigurations = {
apocalypse = nixpkgs.lib.nixosSystem {
diff --git a/services/continuwuity.nix b/services/continuwuity.nix
index 50d4d33..067a41b 100644
--- a/services/continuwuity.nix
+++ b/services/continuwuity.nix
@@ -72,19 +72,19 @@ in
# "users make-user-admin harbinger"
# ];
- url_preview_domain_explicit_allowlist = [
+ url_preview_domain_explicit_allowlist = [
"i.imgur.com"
"cdn.discordapp.com"
"ooye.elisaado.com"
"media.tenor.com"
"media1.tenor.com"
- "tenor.com"
+ "tenor.com"
"giphy.com"
"cdn.nest.rip"
"ssd-cdn.nest.rip"
"i.github.com"
"github.com"
- "wilkuu.xyz"
+ "wilkuu.xyz"
];
# well-known setup