commit 1aae29eaaee2f35e686f026cef21f84b2b93a8d6
parent de5fe8f23b74534c096a9456bc55a4f6d3229e24
Author: mtmn <miro@haravara.org>
Date: Sun, 12 Apr 2026 18:29:03 +0200
feat: add napkins, update landing, update
Diffstat:
6 files changed, 63 insertions(+), 16 deletions(-)
diff --git a/flake.lock b/flake.lock
@@ -163,11 +163,11 @@
]
},
"locked": {
- "lastModified": 1775900011,
- "narHash": "sha256-QUGu6CJYFQ5AWVV0n3/FsJyV+1/gj7HSDx68/SX9pwM=",
+ "lastModified": 1776015217,
+ "narHash": "sha256-PUb9TTfqsA1g+aHJt5s8tIP7QdX8xHeOtDMPVRuylfM=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "b0569dc6ec1e6e7fefd8f6897184e4c191cd768e",
+ "rev": "f6196e5b4d3f0168d09feab9ba678fa18ca58cbb",
"type": "github"
},
"original": {
@@ -205,11 +205,11 @@
]
},
"locked": {
- "lastModified": 1775365369,
- "narHash": "sha256-DgH5mveLoau20CuTnaU5RXZWgFQWn56onQ4Du2CqYoI=",
+ "lastModified": 1775970782,
+ "narHash": "sha256-7jt9Vpm48Yy5yAWigYpde+HxtYEpEuyzIQJF4VYehhk=",
"owner": "nix-community",
"repo": "nix-index-database",
- "rev": "cef5cf82671e749ac87d69aadecbb75967e6f6c3",
+ "rev": "bedba5989b04614fc598af9633033b95a937933f",
"type": "github"
},
"original": {
@@ -220,11 +220,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1775823930,
- "narHash": "sha256-ALT447J7FcxP/97J01A/gp/hgdO5lXRsm+zLMt+gIjc=",
+ "lastModified": 1775888245,
+ "narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "8c11f88bb9573a10a7d6bf87161ef08455ac70b9",
+ "rev": "13043924aaa7375ce482ebe2494338e058282925",
"type": "github"
},
"original": {
@@ -313,11 +313,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
- "lastModified": 1775932415,
- "narHash": "sha256-AZ9siNKKrkJBC4xB1mNL2XboTecOf1KKNb++bfNwEfI=",
+ "lastModified": 1776017307,
+ "narHash": "sha256-qtA9qAGlYAkPNeC+gogOCCzsZhokJyGS3I+RAuhylts=",
"ref": "refs/heads/master",
- "rev": "7bf81c956912648fa2b3a615a76be042127435ec",
- "revCount": 25,
+ "rev": "b1e1d54c759f9026833931b0108833cf445f55dc",
+ "revCount": 28,
"type": "git",
"url": "ssh://git@codeberg.org/mtmn/scorpus.git"
},
diff --git a/flake.nix b/flake.nix
@@ -55,11 +55,11 @@
username = host.username or "miro";
in
lib.nixosSystem {
- inherit (host) system;
specialArgs = specialArgs // {inherit username;};
modules =
[
{
+ nixpkgs.hostPlatform = host.system;
nix.settings = {
substituters = [
"https://cache.nixos.org"
@@ -169,6 +169,7 @@
miniflux = import ./modules/services/miniflux.nix;
listenbrainz-mpd = import ./modules/services/listenbrainz-mpd.nix;
scorpus = import ./modules/services/scorpus.nix;
+ napkins = import ./modules/services/napkins.nix;
};
deploy = {
diff --git a/hosts/nixaran/configuration.nix b/hosts/nixaran/configuration.nix
Binary files differ.
diff --git a/hosts/void/default.nix b/hosts/void/default.nix
@@ -144,13 +144,21 @@
purescript
];
+ beam28 =
+ (with pkgs.beam28Packages; [
+ erlang
+ rebar3
+ ])
+ ++ (with pkgs; [
+ gleam
+ ]);
+
rest = with pkgs; [
miniserve
babashka
feather
picard
rustup
- gleam
];
};
in {
diff --git a/modules/services/napkins.nix b/modules/services/napkins.nix
@@ -0,0 +1,38 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.services.haravara.napkins;
+in {
+ options.services.haravara.napkins = {
+ enable = lib.mkEnableOption "Napkins file server";
+ domain = lib.mkOption {
+ type = lib.types.str;
+ description = "Domain to serve napkins on";
+ };
+ upstream = lib.mkOption {
+ type = lib.types.str;
+ default = "https://estri.saatana.cat";
+ description = "Upstream host to proxy napkins content from";
+ };
+ path = lib.mkOption {
+ type = lib.types.str;
+ default = "/napkins";
+ description = "Path prefix on the upstream host";
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ services.caddy.virtualHosts."${cfg.domain}".extraConfig = ''
+ @spa not path_regexp \.[^/]+$
+ rewrite @spa ${cfg.path}/index.html
+
+ @jsasset path_regexp napkins\.js$
+ rewrite @jsasset ${cfg.path}/napkins.js
+
+ rewrite * ${cfg.path}{uri}
+ reverse_proxy ${cfg.upstream}
+ '';
+ };
+}
diff --git a/modules/services/scorpus.nix b/modules/services/scorpus.nix
@@ -42,7 +42,7 @@ in {
};
serviceConfig = {
- ExecStart = "${inputs.scorpus.packages.${pkgs.system}.default}/bin/scorpus-server";
+ ExecStart = "${inputs.scorpus.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/scorpus-server";
EnvironmentFile = config.age.secrets.scorpus.path;
Restart = "always";
User = "scorpus";