diff options
| author | claymorwan <claymorwan@fembois.dev> | 2026-04-08 22:41:27 +0000 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-04-09 08:45:27 -0400 |
| commit | eb2773f91ce565b94d9805a9f82aef36ed77f582 (patch) | |
| tree | 07431021f286c95a6c933157e5b66d305fc786e4 | |
| parent | f6c8242e7273b50a923ae0d5c59753505fa9df9b (diff) | |
| download | omnisearch-eb2773f91ce565b94d9805a9f82aef36ed77f582.tar.gz | |
feat(nix): locale support
| -rw-r--r-- | flake.lock | 8 | ||||
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | module.nix | 8 |
3 files changed, 12 insertions, 6 deletions
@@ -3,11 +3,11 @@ "beaker-src": { "flake": false, "locked": { - "lastModified": 1773884524, - "narHash": "sha256-1dnlofWaxI/YRID+WPz2jHZNDyloBubDt/bAQk9ePLU=", + "lastModified": 1775244490, + "narHash": "sha256-4TJv7X6D0l4rEbTRKf47gU43L8G5uJgxxtsqMkVixQY=", "ref": "refs/heads/master", - "rev": "abc598baf15d6f8a4de395a27ba34b1e769558e1", - "revCount": 21, + "rev": "3fab89ecf8f4c664477a82add660d28db87357b4", + "revCount": 27, "shallow": false, "type": "git", "url": "https://git.bwaaa.monster/beaker" @@ -61,7 +61,7 @@ installPhase = '' mkdir -p $out/bin $out/share/omnisearch install -Dm755 bin/omnisearch $out/bin/omnisearch - cp -r templates static -t $out/share/omnisearch/ + cp -r templates static locales -t $out/share/omnisearch/ ''; meta = { @@ -20,6 +20,7 @@ let host = ${cfg.settings.server.host} port = ${toString cfg.settings.server.port} domain = ${cfg.settings.server.domain} + ${lib.optionalString (cfg.settings.server.locale != null) "locale = ${cfg.settings.server.locale}"} [proxy] ${lib.optionalString (cfg.settings.proxy.proxy != null) "proxy = \"${cfg.settings.proxy.proxy}\""} @@ -64,7 +65,11 @@ in }; domain = lib.mkOption { type = lib.types.str; - default = "http://localhost:8087"; + default = "http://localhost:${toString cfg.settings.server.port}"; + }; + locale = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; }; }; proxy = { @@ -122,6 +127,7 @@ in BindReadOnlyPaths = [ "${pkg}/share/omnisearch/templates:/var/lib/omnisearch/templates" "${pkg}/share/omnisearch/static:/var/lib/omnisearch/static" + "${pkg}/share/omnisearch/locales:/var/lib/omnisearch/locales" "${finalConfigFile}:/var/lib/omnisearch/config.ini" ]; |
