diff --git a/flake.lock b/flake.lock index 2d87dbe..59222bc 100644 --- a/flake.lock +++ b/flake.lock @@ -20,6 +20,100 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1673362319, + "narHash": "sha256-Pjp45Vnj7S/b3BRpZEVfdu8sqqA6nvVjvYu59okhOyI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "82c16f1682cf50c01cb0280b38a1eed202b3fe9f", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1666885127, + "narHash": "sha256-uXA/3lhLhwOTBMn9a5zJODKqaRT+SuL5cpEmOz2ULoo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "0e101dbae756d35a376a5e1faea532608e4a4b9a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1667077288, + "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "hercules-ci-agent": { + "inputs": { + "flake-parts": "flake-parts_3", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs", + "pre-commit-hooks-nix": "pre-commit-hooks-nix" + }, + "locked": { + "lastModified": 1673183923, + "narHash": "sha256-vb+AEQJAW4Xn4oHsfsx8H12XQU0aK8VYLtWYJm/ol28=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "b3f8aa8e4a8b22dbbe92cc5a89e6881090b933b3", + "type": "github" + }, + "original": { + "id": "hercules-ci-agent", + "type": "indirect" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_2", + "hercules-ci-agent": "hercules-ci-agent", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1676558019, + "narHash": "sha256-obUHCMMWbffb3k0b9YIChsJ2Z281BcDYnTPTbJRP6vs=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "fdbc15b55db8d037504934d3af52f788e0593380", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "invokeai-src": { "flake": false, "locked": { @@ -54,7 +148,78 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1667419884, + "narHash": "sha256-oLNw87ZI5NxTMlNQBv1wG2N27CUzo9admaFlnmavpiY=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "cfc0125eafadc9569d3d6a16ee928375b77e3100", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1672262501, + "narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1672350804, + "narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1673760129, + "narHash": "sha256-m8JdWtElEMd4TY5eUUTbw+3yEjImsE9ifo/UVSbdU7g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e8e9febf8bc4e90f1b38d3b22a704d347a99a74a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1675763311, "narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=", @@ -70,12 +235,36 @@ "type": "github" } }, + "pre-commit-hooks-nix": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1667760143, + "narHash": "sha256-+X5CyeNEKp41bY/I1AJgW/fn69q5cLJ1bgiaMMCKB3M=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "06f48d63d473516ce5b8abe70d15be96a0147fcd", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", + "hercules-ci-effects": "hercules-ci-effects", "invokeai-src": "invokeai-src", "koboldai-src": "koboldai-src", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_3" } } }, diff --git a/flake.nix b/flake.nix index 331505e..3e12db7 100644 --- a/flake.nix +++ b/flake.nix @@ -22,17 +22,23 @@ url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; + hercules-ci-effects = { + url = "github:hercules-ci/hercules-ci-effects"; + inputs.nixpkgs-lib.follows = "nixpkgs"; + }; }; - outputs = { flake-parts, invokeai-src, ... }@inputs: + outputs = { flake-parts, invokeai-src, hercules-ci-effects, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" ]; imports = [ + hercules-ci-effects.flakeModule ./modules/dependency-sets ./modules/aipython3 ./projects/invokeai ./projects/koboldai + ./website ]; }; } diff --git a/website/default.nix b/website/default.nix new file mode 100644 index 0000000..e357dc7 --- /dev/null +++ b/website/default.nix @@ -0,0 +1,9 @@ +{ + hercules-ci.github-pages.branch = "master"; + perSystem = { pkgs, config, ... }: { + hercules-ci.github-pages.settings.contents = config.packages.website.webroot; + packages = { + website = pkgs.callPackage ./package.nix { }; + }; + }; +} diff --git a/website/package.nix b/website/package.nix new file mode 100644 index 0000000..d4ec689 --- /dev/null +++ b/website/package.nix @@ -0,0 +1,30 @@ +{ lib, pandoc, stdenvNoCC }: + +lib.fix (self: stdenvNoCC.mkDerivation { + pname = "nixified-ai-website"; + version = "1.0.0"; + + src = ./src; + + nativeBuildInputs = [ + pandoc + ]; + + buildCommand = '' + unpackPhase + cd $sourceRoot + + pandoc \ + --css=./styles.css \ + -H header.html \ + -V pagetitle='Nixified AI' \ + -s index.md \ + -o index.html + + webroot=$out/share/www/nixified.ai + mkdir -p $webroot + cp -v index.html *.css *.png CNAME $webroot + ''; + + passthru.webroot = "${self}/share/www/nixified.ai"; +}) diff --git a/website/src/CNAME b/website/src/CNAME new file mode 100644 index 0000000..5bf001e --- /dev/null +++ b/website/src/CNAME @@ -0,0 +1 @@ +nixified.ai diff --git a/website/src/header.html b/website/src/header.html new file mode 100644 index 0000000..1aa0acc --- /dev/null +++ b/website/src/header.html @@ -0,0 +1 @@ + diff --git a/website/src/index.md b/website/src/index.md new file mode 100644 index 0000000..385749d --- /dev/null +++ b/website/src/index.md @@ -0,0 +1,63 @@ + +
+
+
+
+
+