From 486311ad294ec325796f99e78bccbb7b991e261b Mon Sep 17 00:00:00 2001
From: zowoq <59103226+zowoq@users.noreply.github.com>
Date: Thu, 4 May 2023 07:51:58 +1000
Subject: [PATCH] shell: refactor, reduce size

- drop treefmt, accessible via `nix fmt`

- drop mkdocs, accessible via `inv mkdocs`

this halves the size of the devshell
---
 shell.nix | 18 ++++++------------
 tasks.py  |  8 ++++++++
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/shell.nix b/shell.nix
index 325eca8..dbe3fa8 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,21 +1,15 @@
 {
-  perSystem = { config, pkgs, ... }: {
+  perSystem = { pkgs, ... }: {
     devShells = {
       default = with pkgs; mkShellNoCC {
-        buildInputs = [
+        packages = [
           jq
+          python3.pkgs.deploykit
+          python3.pkgs.invoke
+          python3.pkgs.requests
+          rsync
           sops
           ssh-to-age
-          (python3.withPackages (
-            p: [
-              p.deploykit
-              p.invoke
-              p.requests
-            ]
-          ))
-          rsync
-          config.packages.pages.buildInputs
-          config.treefmt.build.wrapper
         ];
       };
     };
diff --git a/tasks.py b/tasks.py
index cdd156f..85f76b6 100644
--- a/tasks.py
+++ b/tasks.py
@@ -169,6 +169,14 @@ git commit --amend -m "${commit}" -m "Terraform updates:" -m "${diff}"
         )
 
 
+@task
+def mkdocs(c):
+    """
+    Serve docs (mkdoc serve)
+    """
+    c.run("nix develop .#pages -c mkdocs serve")
+
+
 def get_hosts(hosts: str) -> List[DeployHost]:
     if hosts == "":
         return [DeployHost(f"build{n + 1:02d}.nix-community.org") for n in range(4)]