added flake back etc

This commit is contained in:
2026-11-12 18:42:20 +00:00
parent 1e0eb470c6
commit 05cb1387f4
5 changed files with 558 additions and 435 deletions

46
flake.lock generated Normal file
View File

@@ -0,0 +1,46 @@
{
"nodes": {
"beaker-src": {
"flake": false,
"locked": {
"lastModified": 1793900580,
"narHash": "sha256-TWJAVS60lHQO+4Gmt86qlT7RN25HrqCSl3n7EE+OP1o=",
"ref": "refs/heads/master",
"rev": "aedf6c0c93acb2a8f57ef3f94498332b3ab6db89",
"revCount": 48,
"shallow": false,
"type": "git",
"url": "https://git.bwaaa.space/beaker"
},
"original": {
"shallow": false,
"type": "git",
"url": "https://git.bwaaa.space/beaker"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1794386569,
"narHash": "sha256-x9sADJvoVG0L6RejZB+/BB4YiGZFBZrfTlhF4uBq1tQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d4f25a3e562008648d45bcf2d70bcc7422cad84e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"beaker-src": "beaker-src",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

71
flake.nix Normal file
View File

@@ -0,0 +1,71 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
beaker-src = {
url = "git+https://git.bwaaa.space/beaker?shallow=0";
flake = false;
};
};
outputs = {
self,
nixpkgs,
beaker-src,
}: let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt);
packages = forAllSystems (
system: let
pkgs = import nixpkgs {inherit system;};
beaker = pkgs.stdenv.mkDerivation {
pname = "beaker";
version = "git";
src = beaker-src;
makeFlags = [
"INSTALL_PREFIX=$(out)/"
"LDCONFIG=true"
];
};
in {
default = pkgs.stdenv.mkDerivation {
pname = "omnisearch";
version = "git";
src = ./.;
buildInputs = [
pkgs.libxml2.dev
pkgs.curl.dev
pkgs.openssl
beaker
];
preBuild = ''
makeFlagsArray+=(
"PREFIX=$out"
"CFLAGS=-Wall -Wextra -O2 -Isrc -I${pkgs.libxml2.dev}/include/libxml2"
"LIBS=-lbeaker -lcurl -lxml2 -lpthread -lm -lssl -lcrypto"
)
'';
installPhase = ''
mkdir -p $out/bin $out/share/omnisearch
install -Dm755 bin/omnisearch $out/bin/omnisearch
cp -r templates static locales -t $out/share/omnisearch/
'';
meta = {
description = "Lightweight metasearch engine in C";
platforms = pkgs.lib.platforms.linux;
};
};
}
);
nixosModules.default = import ./module.nix self;
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
:root {
--bg-main: #181825;
--bg-card: #1e1e2e;
--border: #313244;
--text-primary: #cdd6f4;
--text-secondary: #a6adc8;
--text-muted: #6c7086;
--accent: #cba6f7;
--accent-glow: rgba(255,255,255,0.1);
--bg-main: #1e1e2e;
--bg-card: #313244;
--border: #6c7086;
--text-primary: #cdd6f4;
--text-secondary: #a6adc8;
--text-muted: #6c7086;
--accent: #cba6f7;
--accent-glow: rgba(255, 255, 255, 0.1);
}

View File

@@ -18,7 +18,7 @@
<body class="results-view">
<header>
<a href="/" class="logo-link"><h1>
Omni<span>Search</span>
VOID<span>ARC</span>
</h1></a>
<form action="/search" method="GET" class="search-form">
<input name="engine" type="hidden" value="{{selected_engine}}">