initial commit

This commit is contained in:
Squibid 2025-11-09 23:51:40 -05:00
commit 4014d5e658
Signed by: squibid
GPG key ID: BECE5684D3C4005D
30 changed files with 911 additions and 0 deletions

20
overlays/default.nix Normal file
View file

@ -0,0 +1,20 @@
# Loop through all files and directories and try and import them as nixpkgs
# overlays. I've given them access to nixpkgs unstable just incase ;)
{ lib, unstable, ... }:
let
files = builtins.readDir ./.;
import_overlay = i: map (p: builtins.import (./. + ("/" + p)) { inherit unstable; }) i;
in {
nixpkgs.overlays =
(files # files
|> lib.filterAttrs (n: v: v == "regular")
|> builtins.attrNames
|> builtins.filter (inp: inp != "default.nix"
&& (builtins.match ".*\\.nix$" inp) != null)
|> import_overlay)
++
(files # directories
|> lib.filterAttrs (n: v: v == "directory")
|> builtins.attrNames
|> import_overlay);
}

View file

@ -0,0 +1,21 @@
# generated by zon2nix (https://github.com/nix-community/zon2nix)
{ linkFarm, fetchzip, fetchgit }:
linkFarm "zig-packages" [
{
name = "toml-0.3.0-bV14BfV7AQD8DkuQI7skP8ekQTaBYKTO0MY_35Cw_EXo";
path = fetchgit {
url = "https://github.com/sam701/zig-toml";
rev = "475b03c630c802f8b6bd3e239d8fc2279b4fadb8";
hash = "sha256-TOW27uDzos3P0K3535TYxogR1o2j5u2BaMHo9vyAbW8=";
};
}
{
name = "ziglet-0.1.0-QYl7SRPiAAAW4knyR898VHRmXzPcN25LK6b4tiDIkvSY";
path = fetchzip {
url = "https://codeberg.org/benteg/ziglet/archive/5366b65794d42f658da3d171eaa3321fafa2b52f.tar.gz";
hash = "sha256-4j3ly/rthCsJ7df2GLYrCm0f9THMbnwDkzhUbh5CbDI=";
};
}
]

View file

@ -0,0 +1,26 @@
{ unstable }:
final: prev: {
zmotd = prev.stdenv.mkDerivation rec {
pname = "zmotd";
version = "1.0";
src = prev.fetchFromGitea {
domain = "git.squi.bid";
owner = "squibid";
repo = "zmotd";
rev = "48e7f34efb506f231bdc5070cb44a360fbd83cf1";
sha256 = "sha256-8c5cMXzb6oq2kL6rZUrqjz/QeOryN7HXe+mYwjR9/k0=";
};
deps = prev.callPackage ./build.zig.zon.nix {};
nativeBuildInputs = [ unstable.zig.hook ]; # this hook is what defines the actual build process
zigBuildFlags = [ "--system" "${deps}" ]; # and this makes sure that zig doesn't try and fetch the dependencies on it's own
meta = {
description = "Literally just a motd setter for my servers.";
license = "GPLv3";
homepage = "https://git.squi.bid/squibid/zmotd";
mainProgram = "zmotd";
maintainers = [ "squibid" ];
};
};
}