feat(nix): locale support
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@@ -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"
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user