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:
+44
@@ -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;
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user