all repos — searchix @ 177c2de3f7c2b1cee8dbea4acaa896a334ba3162

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: add css

Alan Pearce
commit

177c2de3f7c2b1cee8dbea4acaa896a334ba3162

parent

8411fb4a3acebe46acaf7a2ff6c4e58018737d65

5 files changed, 25 insertions(+), 2 deletions(-)

jump to
M default.nixdefault.nix
@@ -8,7 +8,12 @@ (import "${sources.gomod2nix}/overlay.nix")
]; } ) -}: { +}: +{ + css = pkgs.fetchurl { + inherit (sources.simple-css) url sha256; + }; + searchix = pkgs.buildGoApplication { pname = "searchix"; version = "0.1";
M frontend/templates/index.tmplfrontend/templates/index.tmpl
@@ -3,6 +3,7 @@ <html lang="en-GB">
<head> <meta charset="UTF-8" /> <title>Searchix</title> + <link href="/static/style.css" rel="stylesheet"/> </head> <body> <h1>Searchix</h1>
M justfilejustfile
@@ -1,6 +1,9 @@
default: @just --list --justfile {{ justfile() }} --unsorted +prepare: + ln -sf $(nix-build --no-out-link -A css) frontend/static/style.css + checkformat: gofmt -d . goimports -d .
@@ -15,5 +18,5 @@
precommit: nix-build -A pre-commit-check -dev: +dev: prepare wgo run ./serve/ --live
M nix/sources.jsonnix/sources.json
@@ -34,5 +34,18 @@ "sha256": "05rpyikxpjf15nrzggrx4m0kjkjcmpyhm714nfrbhsp5cp1x1m4r",
"type": "tarball", "url": "https://github.com/NixOS/nixpkgs/archive/58a1abdbae3217ca6b702f03d3b35125d88a2994.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, + "simple-css": { + "branch": "main", + "description": "Mostly-reasonable HTML Styles.", + "homepage": "", + "owner": "kevquirk", + "repo": "simple.css", + "rev": "89787585fc44e6023f2b5e6f78a3e3ca8c60b10a", + "sha256": "1q35vvq932x3r02zycr2plfkzd8x5plzlwk71cl6gxpwvq26jhbx", + "type": "file", + "url": "https://raw.githubusercontent.com/kevquirk/simple.css/v2.3.0/simple.css", + "url_template": "https://raw.githubusercontent.com/<owner>/<repo>/v<version>/simple.css", + "version": "2.3.0" } }
M shell.nixshell.nix
@@ -29,6 +29,7 @@ bun
]; shellHook = '' ${searchix.pre-commit-check.shellHook} + css=${searchix.css}/ ''; buildInputs = searchix.pre-commit-check.enabledPackages; }