summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@internetsafetylabs.org>2025-10-09 22:46:34 -0700
committerIrene Knapp <ireneista@internetsafetylabs.org>2025-10-09 22:46:34 -0700
commitaad528d1b211e64ffe3f5688c141d442d7fa081a (patch)
treebe540be0b22bc1d5cc65445c3765d80f3bc86238 /flake.nix
parent1dc89b551ae3c973e590112c49272132fde12810 (diff)
add a skeleton for documentation
Change-Id: I528864e13c4b318dd70a004b8c2029831863c37c
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix31
1 files changed, 27 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index f495553..896a587 100644
--- a/flake.nix
+++ b/flake.nix
@@ -10,8 +10,9 @@
 
   outputs = { self, nixpkgs, ... }@attrs:
   let supportedSystems = [ "aarch64-linux" "x86_64-linux" ];
-      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
-      nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
+      forAllPkgs = f:
+        nixpkgs.lib.genAttrs supportedSystems
+            (system: f (import nixpkgs { inherit system; }));
   in {
     nixosModules.default = { ... }: {
       imports = [
@@ -26,9 +27,31 @@
       ];
     };
 
-    devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in {
+    packages = forAllPkgs (pkgs: {
+      documentation = pkgs.stdenv.mkDerivation rec {
+        name = "smalltech-documentation";
+        version = "1.0";
+
+        src = ./.;
+
+        nativeBuildInputs = with pkgs; [ mkdocs ];
+
+        buildPhase = ''
+          ls -al
+          ${pkgs.mkdocs}/bin/mkdocs build -f docs/mkdocs.yml
+        '';
+
+        installPhase = ''
+          rm $out/mkdocs.yml
+        '';
+      };
+    });
+
+    devShells = forAllPkgs (pkgs: {
       default = pkgs.mkShell {
-        buildInputs = with pkgs; [ ];
+        buildInputs = with pkgs; [
+          mkdocs
+        ];
       };
     });
   };