1
0
Fork 0

feat: add a nix default

This commit is contained in:
Tommy 2024-10-05 22:51:44 +02:00
parent 84c1042296
commit 27ff50e75a
Signed by: tommy
SSH key fingerprint: SHA256:1LWgQT3QPHIT29plS8jjXc3S1FcE/4oGvsx3Efxs6Uc

44
default.nix Normal file
View file

@ -0,0 +1,44 @@
{
description = "Nix flake to use indieweb static files as a theme for website deployment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages = rec {
indiewebTheme = pkgs.stdenv.mkDerivation {
pname = "indieweb-theme";
version = "1.0.0";
src = ./.;
installPhase = ''
mkdir -p $out/themes/indieweb
cp -r archetypes theme.toml layouts static $out/themes/indieweb
'';
meta = with pkgs.lib; {
description = "Static files for the indieweb theme to be used in the website deployment";
homepage = "https://your-homepage-url";
license = licenses.mit;
maintainers = [ maintainers.yourname ];
platforms = platforms.unix;
};
};
};
defaultPackage.${system} = self.packages.${system}.indiewebTheme;
apps = rec {
indiewebTheme = flake-utils.lib.mkApp { drv = self.packages.${system}.indiewebTheme; };
default = indiewebTheme;
};
}
);
}