Initial import of HortusFox Nix flake packaging

Packages HortusFox from source via php.buildComposerProject and provides
a NixOS module (services.hortusfox-web) to deploy it as a full service
(mariadb + phpfpm + nginx/caddy + ACME + cron timers).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 17:03:42 -04:00
co-authored by Claude Sonnet 5
commit c6f246a74a
13 changed files with 964 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
{
description = "HortusFox — self-hosted plant manager, from source";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forEachSystem = nixpkgs.lib.genAttrs systems;
pkgs = nixpkgs.legacyPackages.${system};
overlayList = [ self.overlays.default ];
pkgsBySystem = forEachSystem (
system:
import nixpkgs {
inherit system;
overlays = overlayList;
}
);
in {
nixosConfigurations.test = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./tests ];
});
overlays.default = final: prev: { hortusfox-web = final.callPackage ./package.nix { }; };
packages = {
hortusfox-web = pkgs.${system}.hortusfox-web;
default = pkgs.${system}.hortusfox-web;
};
nixosModules.default = import ./nixos-module { overlays = overlayList; };
# Handy for `nix flake check` on a throwaway host
checks = forEachSystem (system: {
build = pkgsBySystem.${system}.hortusfox-web;
});
};
}