diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..285fc78 --- /dev/null +++ b/default.nix @@ -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; + }; + } + ); +}