Make profile identity, bio and fonts configurable
The profile header, photo page byline and copyright footer previously
hardcoded the author name, handle, bio, and font choices. Move all of
these to CLI flags on the binary and matching options on the NixOS
module so the same build can serve any single-user gallery.
New surface, all with defaults matching the previous hardcoded values:
--author / services.photogallery.author
--handle / services.photogallery.handle
--bio / services.photogallery.bio
--bio-alt / services.photogallery.bioAlt ("" to omit)
--fonts-url / services.photogallery.fontsURL
--serif-family / services.photogallery.serifFamily
--ml-family / services.photogallery.mlFamily
Templates read the two font families from a small inline <style> that
overrides the :root variables, so the stylesheet stays fully static and
the font URL is loaded via the configured stylesheet link.
README updated to describe the new options, the medium/full-size photo
detail flow, and the EXIF-based date prefill on the upload page.
This commit is contained in:
+49
@@ -34,6 +34,48 @@ in {
|
||||
description = "Upload API port. Always bound to 127.0.0.1.";
|
||||
};
|
||||
|
||||
author = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Ashik Salahudeen";
|
||||
description = "Author name shown on the profile header, photo pages and in the copyright footer.";
|
||||
};
|
||||
|
||||
handle = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "@puttaalu@inflo.ws";
|
||||
description = "Handle line shown under the author name on the profile header.";
|
||||
};
|
||||
|
||||
bio = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Personal photo journal.";
|
||||
description = "Primary bio line shown on the profile header.";
|
||||
};
|
||||
|
||||
bioAlt = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "എന്തിനോ വേണ്ടി തിളയ്ക്കുന്ന സാമ്പാർ";
|
||||
description = "Secondary bio line rendered on a new line in the alt-script font. Set to \"\" to omit.";
|
||||
};
|
||||
|
||||
fontsURL = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,600;0,700;1,400&family=Manjari:wght@100;400;700&display=swap";
|
||||
description = "Stylesheet URL that loads the primary serif font and the alt-script font.";
|
||||
};
|
||||
|
||||
serifFamily = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Crimson Pro";
|
||||
description = "CSS font-family for the primary serif text. Must match a family loaded by fontsURL.";
|
||||
};
|
||||
|
||||
mlFamily = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Manjari";
|
||||
description = "CSS font-family for the alt-script (Malayalam) bio line. Must match a family loaded by fontsURL.";
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = lib.mkEnableOption "nginx virtual host for photogallery";
|
||||
|
||||
@@ -92,6 +134,13 @@ in {
|
||||
"--output" cfg.outputDir
|
||||
"--base-url" cfg.baseURL
|
||||
"--port" (toString cfg.port)
|
||||
"--author" cfg.author
|
||||
"--handle" cfg.handle
|
||||
"--bio" cfg.bio
|
||||
"--bio-alt" cfg.bioAlt
|
||||
"--fonts-url" cfg.fontsURL
|
||||
"--serif-family" cfg.serifFamily
|
||||
"--ml-family" cfg.mlFamily
|
||||
];
|
||||
|
||||
Restart = "on-failure";
|
||||
|
||||
Reference in New Issue
Block a user