diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index d330324b..4bbfd20b 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -18,7 +18,7 @@ jobs: - name: Update subflake references run: ./.github/workflows/update-subflake.sh - - run: nix develop .#book -c mdbook build ./docs + - run: nix develop .#book -c mdbook build ./. - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/docs/book.toml b/book.toml similarity index 68% rename from docs/book.toml rename to book.toml index accdf6ff..7626e9b7 100644 --- a/docs/book.toml +++ b/book.toml @@ -1,19 +1,19 @@ [book] language = "en" multilingual = false -src = "." +src = "docs" title = "The Standard Documentation" [build] -build-dir = "book" +build-dir = "docs/book" [output.html] -additional-css = ["theme/pagetoc.css"] -additional-js = ["theme/pagetoc.js"] +additional-css = ["docs/theme/pagetoc.css"] +additional-js = ["docs/theme/pagetoc.js"] [preprocessor.paisano-preprocessor] before = ["links"] -registry = "..#__std.init" +registry = ".#__std.init" [[preprocessor.paisano-preprocessor.multi]] cell = "lib" diff --git a/src/data/flake.lock b/src/data/flake.lock new file mode 100644 index 00000000..336902f5 --- /dev/null +++ b/src/data/flake.lock @@ -0,0 +1,448 @@ +{ + "nodes": { + "blank": { + "locked": { + "lastModified": 1625557891, + "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", + "owner": "divnix", + "repo": "blank", + "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "blank", + "type": "github" + } + }, + "call-flake": { + "locked": { + "lastModified": 1687380775, + "narHash": "sha256-bmhE1TmrJG4ba93l9WQTLuYM53kwGQAjYHRvHOeuxWU=", + "owner": "divnix", + "repo": "call-flake", + "rev": "74061f6c241227cd05e79b702db9a300a2e4131a", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "call-flake", + "type": "github" + } + }, + "crane": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": [ + "mdbook-paisano-preprocessor", + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1676162383, + "narHash": "sha256-krUCKdz7ebHlFYm/A7IbKDnj2ZmMMm3yIEQcooqm7+E=", + "owner": "ipetkov", + "repo": "crane", + "rev": "6fb400ec631b22ccdbc7090b38207f7fb5cfb5f2", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "dmerge": { + "inputs": { + "haumea": [ + "mdbook-paisano-preprocessor", + "std", + "haumea" + ], + "nixlib": [ + "mdbook-paisano-preprocessor", + "std", + "haumea", + "nixpkgs" + ], + "yants": [ + "mdbook-paisano-preprocessor", + "std", + "yants" + ] + }, + "locked": { + "lastModified": 1686862774, + "narHash": "sha256-ojGtRQ9pIOUrxsQEuEPerUkqIJEuod9hIflfNkY+9CE=", + "owner": "divnix", + "repo": "dmerge", + "rev": "9f7f7a8349d33d7bd02e0f2b484b1f076e503a96", + "type": "github" + }, + "original": { + "owner": "divnix", + "ref": "0.2.1", + "repo": "dmerge", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": "nixpkgs", + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1677306201, + "narHash": "sha256-VZ9x7qdTosFvVsrpgFHrtYfT6PU3yMIs7NRYn9ELapI=", + "owner": "nix-community", + "repo": "fenix", + "rev": "0923f0c162f65ae40261ec940406049726cfeab4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "haumea": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1685133229, + "narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=", + "owner": "nix-community", + "repo": "haumea", + "rev": "34dd58385092a23018748b50f9b23de6266dffc2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v0.2.2", + "repo": "haumea", + "type": "github" + } + }, + "incl": { + "inputs": { + "nixlib": [ + "mdbook-paisano-preprocessor", + "std", + "haumea", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1669263024, + "narHash": "sha256-E/+23NKtxAqYG/0ydYgxlgarKnxmDbg6rCMWnOBqn9Q=", + "owner": "divnix", + "repo": "incl", + "rev": "ce7bebaee048e4cd7ebdb4cee7885e00c4e2abca", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "incl", + "type": "github" + } + }, + "mdbook-paisano-preprocessor": { + "inputs": { + "crane": "crane", + "devshell": [], + "fenix": "fenix", + "nixago": [], + "nixpkgs": [ + "nixpkgs" + ], + "std": "std" + }, + "locked": { + "lastModified": 1687483084, + "narHash": "sha256-T5yqwQoFipncAa1LGZlfKKCywGUjkUnSnGZ6e8UwDAs=", + "owner": "paisano-nix", + "repo": "mdbook-paisano-preprocessor", + "rev": "a6bd702a9cc93fc46f6aeb67aacddeecb307c245", + "type": "github" + }, + "original": { + "owner": "paisano-nix", + "repo": "mdbook-paisano-preprocessor", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1677063315, + "narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "988cc958c57ce4350ec248d2d53087777f9e1949", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1681001314, + "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1694669921, + "narHash": "sha256-6ESpJ6FsftHV96JO/zn6je07tyV2dlLR7SdLsmkegTY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f2ea252d23ebc9a5336bf6a61e0644921f64e67c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nosys": { + "locked": { + "lastModified": 1668010795, + "narHash": "sha256-JBDVBnos8g0toU7EhIIqQ1If5m/nyBqtHhL3sicdPwI=", + "owner": "divnix", + "repo": "nosys", + "rev": "feade0141487801c71ff55623b421ed535dbdefa", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "nosys", + "type": "github" + } + }, + "paisano": { + "inputs": { + "call-flake": "call-flake", + "nixpkgs": [ + "mdbook-paisano-preprocessor", + "std", + "nixpkgs" + ], + "nosys": "nosys", + "yants": [ + "mdbook-paisano-preprocessor", + "std", + "yants" + ] + }, + "locked": { + "lastModified": 1687475968, + "narHash": "sha256-tFrPoD24Ph6VZjgmL3J4ICDWY6W/DnnHyupWeAL3Lw8=", + "owner": "paisano-nix", + "repo": "core", + "rev": "9954e48e1ebc74a698b9d4ac02aee85514fc0237", + "type": "github" + }, + "original": { + "owner": "paisano-nix", + "repo": "core", + "type": "github" + } + }, + "paisano-tui": { + "flake": false, + "locked": { + "lastModified": 1681847764, + "narHash": "sha256-mdd7PJW1BZvxy0cIKsPfAO+ohVl/V7heE5ZTAHzTdv8=", + "owner": "paisano-nix", + "repo": "tui", + "rev": "3096bad91cae73ab8ab3367d31f8a143d248a244", + "type": "github" + }, + "original": { + "owner": "paisano-nix", + "ref": "0.1.1", + "repo": "tui", + "type": "github" + } + }, + "root": { + "inputs": { + "mdbook-paisano-preprocessor": "mdbook-paisano-preprocessor", + "nixpkgs": "nixpkgs_3" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1677221702, + "narHash": "sha256-1M+58rC4eTCWNmmX0hQVZP20t3tfYNunl9D/PrGUyGE=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "f5401f620699b26ed9d47a1d2e838143a18dbe3b", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "mdbook-paisano-preprocessor", + "crane", + "flake-utils" + ], + "nixpkgs": [ + "mdbook-paisano-preprocessor", + "crane", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1675391458, + "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "std": { + "inputs": { + "arion": [ + "mdbook-paisano-preprocessor", + "std", + "blank" + ], + "blank": "blank", + "devshell": [ + "mdbook-paisano-preprocessor", + "devshell" + ], + "dmerge": "dmerge", + "haumea": "haumea", + "incl": "incl", + "makes": [ + "mdbook-paisano-preprocessor", + "std", + "blank" + ], + "microvm": [ + "mdbook-paisano-preprocessor", + "std", + "blank" + ], + "n2c": [ + "mdbook-paisano-preprocessor", + "std", + "blank" + ], + "nixago": [ + "mdbook-paisano-preprocessor", + "nixago" + ], + "nixpkgs": [ + "mdbook-paisano-preprocessor", + "nixpkgs" + ], + "paisano": "paisano", + "paisano-tui": "paisano-tui", + "yants": "yants" + }, + "locked": { + "lastModified": 1687482460, + "narHash": "sha256-KSut2GPMR//LJ62cMpHk+b8AHlDHWaSHTxCABzLY2yM=", + "owner": "divnix", + "repo": "std", + "rev": "1dfd574de0d2e3011d8df7ade3a3f2748b701a6d", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "std", + "type": "github" + } + }, + "yants": { + "inputs": { + "nixpkgs": [ + "mdbook-paisano-preprocessor", + "std", + "haumea", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1686863218, + "narHash": "sha256-kooxYm3/3ornWtVBNHM3Zh020gACUyFX2G0VQXnB+mk=", + "owner": "divnix", + "repo": "yants", + "rev": "8f0da0dba57149676aa4817ec0c880fbde7a648d", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "yants", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/src/data/flake.nix b/src/data/flake.nix index 72a620a6..c40ec890 100644 --- a/src/data/flake.nix +++ b/src/data/flake.nix @@ -1,10 +1,10 @@ { inputs = { # injected (private) inputs - paisano-mdbook-preprocessor.url = "github:paisano-nix/mdbook-paisano-preprocessor"; - paisano-mdbook-preprocessor.inputs.nixpkgs.follows = "nixpkgs"; - paisano-mdbook-preprocessor.inputs.nixago.follows = ""; - paisano-mdbook-preprocessor.inputs.devshell.follows = ""; + mdbook-paisano-preprocessor.url = "github:paisano-nix/mdbook-paisano-preprocessor"; + mdbook-paisano-preprocessor.inputs.nixpkgs.follows = "nixpkgs"; + mdbook-paisano-preprocessor.inputs.nixago.follows = ""; + mdbook-paisano-preprocessor.inputs.devshell.follows = ""; # injected inputs to override std's defaults nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; diff --git a/src/local/configs.nix b/src/local/configs.nix index e1e62f4a..e075208c 100644 --- a/src/local/configs.nix +++ b/src/local/configs.nix @@ -3,86 +3,20 @@ cell, }: let inherit (inputs) nixpkgs; - inherit (inputs.std) std presets; - l = nixpkgs.lib // builtins; + inherit (inputs.std.data) configs; + inherit (inputs.std.lib.dev) mkNixago; in { - cog = { - output = "cog.toml"; - commands = [{package = nixpkgs.cocogitto;}]; - data = { - tag_prefix = "v"; - branch_whitelist = ["main" "release/**"]; - ignore_merge_commits = true; - pre_bump_hooks = [ - "echo {{version}} > ./VERSION" - '' - branch="$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" - if [ `git rev-parse --verify $branch 2>/dev/null` ] - then - git switch -m "$branch" || exit 1 - git merge main - else - git switch -c "$branch" || exit 1 - fi - '' - ]; - post_bump_hooks = [ - '' - branch="$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" - git push --set-upstream origin "$branch" - git push origin v{{version}} - - git switch main - git merge "$branch" --no-commit --no-ff - echo {{version+minor-dev}} > ./VERSION - git add VERSION - git commit -m "chore: sync with release" - git push origin main - '' - "cog -q changelog --at v{{version}}" - ]; - changelog = { - path = "CHANGELOG.md"; - template = "remote"; - remote = "github.com"; - repository = "std"; - owner = "divnix"; - }; + cog = (mkNixago configs.cog) { + data.changelog = { + remote = "github.com"; + repository = "std"; + owner = "divnix"; }; }; - treefmt = { + treefmt = (mkNixago configs.treefmt) { data = { - global.excludes = [ - "cells/presets/templates/**" - ]; + global.excludes = ["src/std/templates/**"]; formatter = { - nix = { - command = "alejandra"; - includes = ["*.nix"]; - }; - prettier = { - command = "prettier"; - options = ["--plugin" "prettier-plugin-toml" "--write"]; - includes = [ - "*.css" - "*.html" - "*.js" - "*.json" - "*.jsx" - "*.md" - "*.mdx" - "*.scss" - "*.ts" - "*.yaml" - "*.toml" - ]; - }; - shell = { - command = "shfmt"; - options = ["-i" "2" "-s" "-w"]; - includes = ["*.sh"]; - }; - go = { command = "gofmt"; options = ["-w"]; @@ -93,51 +27,10 @@ in { }; }; }; - packages = [ - nixpkgs.alejandra - nixpkgs.nodePackages.prettier - nixpkgs.nodePackages.prettier-plugin-toml - nixpkgs.shfmt - nixpkgs.go - ]; - devshell.startup.prettier-plugin-toml = l.stringsWithDeps.noDepEntry '' - export NODE_PATH=${nixpkgs.nodePackages.prettier-plugin-toml}/lib/node_modules:''${NODE_PATH-} - ''; + packages = [nixpkgs.go]; }; - editorconfig = { - hook.mode = "copy"; # already useful before entering the devshell + editorconfig = (mkNixago configs.editorconfig) { data = { - root = true; - - "*" = { - end_of_line = "lf"; - insert_final_newline = true; - trim_trailing_whitespace = true; - charset = "utf-8"; - indent_style = "space"; - indent_size = 2; - }; - - "*.{diff,patch}" = { - end_of_line = "unset"; - insert_final_newline = "unset"; - trim_trailing_whitespace = "unset"; - indent_size = "unset"; - }; - - "*.md" = { - max_line_length = "off"; - trim_trailing_whitespace = false; - }; - "{LICENSES/**,LICENSE}" = { - end_of_line = "unset"; - insert_final_newline = "unset"; - trim_trailing_whitespace = "unset"; - charset = "unset"; - indent_style = "unset"; - indent_size = "unset"; - }; - "*.xcf" = { charset = "unset"; end_of_line = "unset"; @@ -152,187 +45,53 @@ in { }; }; }; - mdbook = { - output = "docs/book.toml"; + mdbook = (mkNixago configs.mdbook) { data = { - book = { - language = "en"; - multilingual = false; - title = "The Standard Documentation"; - src = "."; - }; - build = { - build-dir = "book"; - }; - preprocessor = { - paisano-preprocessor = { - before = ["links"]; - registry = "..#__std.init"; - multi = [ - { - chapter = "Cell: lib"; - cell = "lib"; - } - { - chapter = "Cell: std"; - cell = "std"; - } - ]; - }; + book.title = "The Standard Documentation"; + preprocessor.paisano-preprocessor = { + multi = [ + { + chapter = "Cell: lib"; + cell = "lib"; + } + { + chapter = "Cell: std"; + cell = "std"; + } + ]; }; output.html = { - additional-js = ["theme/pagetoc.js"]; - additional-css = ["theme/pagetoc.css"]; + additional-js = ["docs/theme/pagetoc.js"]; + additional-css = ["docs/theme/pagetoc.css"]; }; }; - packages = [inputs.paisano-mdbook-preprocessor.packages.default]; - hook.mode = "copy"; # let CI pick it up outside of devshell }; - githubsettings = { - data = let - colors = { - black = "#000000"; - blue = "#1565C0"; - lightBlue = "#64B5F6"; - green = "#4CAF50"; - grey = "#A6A6A6"; - lightGreen = "#81C784"; - gold = "#FDD835"; - orange = "#FB8C00"; - purple = "#AB47BC"; - red = "#F44336"; - yellow = "#FFEE58"; - }; - labels = { - statuses = { - abandoned = { - name = ":running: Status: Abdandoned"; - description = "This issue has been abdandoned"; - color = colors.black; - }; - accepted = { - name = ":ok: Status: Accepted"; - description = "This issue has been accepted"; - color = colors.green; - }; - blocked = { - name = ":x: Status: Blocked"; - description = "This issue is in a blocking state"; - color = colors.red; - }; - inProgress = { - name = ":construction: Status: In Progress"; - description = "This issue is actively being worked on"; - color = colors.grey; - }; - onHold = { - name = ":golf: Status: On Hold"; - description = "This issue is not currently being worked on"; - color = colors.red; - }; - reviewNeeded = { - name = ":eyes: Status: Review Needed"; - description = "This issue is pending a review"; - color = colors.gold; - }; - }; - types = { - bug = { - name = ":bug: Type: Bug"; - description = "This issue targets a bug"; - color = colors.red; - }; - story = { - name = ":scroll: Type: Story"; - description = "This issue targets a new feature through a story"; - color = colors.lightBlue; - }; - maintenance = { - name = ":wrench: Type: Maintenance"; - description = "This issue targets general maintenance"; - color = colors.orange; - }; - question = { - name = ":grey_question: Type: Question"; - description = "This issue contains a question"; - color = colors.purple; - }; - security = { - name = ":cop: Type: Security"; - description = "This issue targets a security vulnerability"; - color = colors.red; - }; - }; - priorities = { - critical = { - name = ":boom: Priority: Critical"; - description = "This issue is prioritized as critical"; - color = colors.red; - }; - high = { - name = ":fire: Priority: High"; - description = "This issue is prioritized as high"; - color = colors.orange; - }; - medium = { - name = ":star2: Priority: Medium"; - description = "This issue is prioritized as medium"; - color = colors.yellow; - }; - low = { - name = ":low_brightness: Priority: Low"; - description = "This issue is prioritized as low"; - color = colors.green; - }; - }; - effort = { - "1" = { - name = ":muscle: Effort: 1"; - description = "This issue is of low complexity or very well understood"; - color = colors.green; - }; - "2" = { - name = ":muscle: Effort: 3"; - description = "This issue is of medium complexity or only partly well understood"; - color = colors.yellow; - }; - "5" = { - name = ":muscle: Effort: 5"; - description = "This issue is of high complexity or just not yet well understood"; - color = colors.red; - }; - }; - }; - l = builtins; - in - { - labels = - [] - ++ (l.attrValues labels.statuses) - ++ (l.attrValues labels.types) - ++ (l.attrValues labels.priorities) - ++ (l.attrValues labels.effort); - } - // { - repository = { - name = "std"; - homepage = "https://std.divnix.com"; - description = "A DevOps framework for the SDLC with the power of Nix and Flakes. Good for keeping deadlines!"; - topics = "nix, nix-flakes, devops, sdlc"; - default_branch = "main"; - allow_squash_merge = true; - allow_merge_commit = false; - allow_rebase_merge = true; - delete_branch_on_merge = true; - }; - milestones = [ - { - title = "Release v1"; - description = ":dart:"; - state = "open"; - } - ]; + githubsettings = (mkNixago configs.githubsettings) { + data = { + repository = { + name = "std"; + homepage = "https://std.divnix.com"; + description = "A DevOps framework for the SDLC with the power of Nix and Flakes. Good for keeping deadlines!"; + topics = "nix, nix-flakes, devops, sdlc"; + default_branch = "main"; + allow_squash_merge = true; + allow_merge_commit = false; + allow_rebase_merge = true; + delete_branch_on_merge = true; }; + milestones = [ + { + title = "Release v1"; + description = ":dart:"; + state = "open"; + } + ]; + }; + }; + adrgen = (mkNixago configs.adrgen) {}; + conform = (mkNixago configs.conform) { + data = {inherit (inputs) cells;}; }; + lefthook = (mkNixago configs.lefthook) {}; } diff --git a/src/local/flake.lock b/src/local/flake.lock index 30532688..48c5c348 100644 --- a/src/local/flake.lock +++ b/src/local/flake.lock @@ -30,30 +30,6 @@ "type": "github" } }, - "crane": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "paisano-mdbook-preprocessor", - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1676162383, - "narHash": "sha256-krUCKdz7ebHlFYm/A7IbKDnj2ZmMMm3yIEQcooqm7+E=", - "owner": "ipetkov", - "repo": "crane", - "rev": "6fb400ec631b22ccdbc7090b38207f7fb5cfb5f2", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, "devshell": { "inputs": { "nixpkgs": [ @@ -105,41 +81,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": "nixpkgs_2", - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1677306201, - "narHash": "sha256-VZ9x7qdTosFvVsrpgFHrtYfT6PU3yMIs7NRYn9ELapI=", - "owner": "nix-community", - "repo": "fenix", - "rev": "0923f0c162f65ae40261ec940406049726cfeab4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "locked": { "lastModified": 1653893745, @@ -170,24 +111,9 @@ "type": "github" } }, - "flake-utils_3": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "haumea": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1685133229, @@ -325,22 +251,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1677063315, - "narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "988cc958c57ce4350ec248d2d53087777f9e1949", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1681001314, "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", @@ -397,31 +307,6 @@ "type": "github" } }, - "paisano-mdbook-preprocessor": { - "inputs": { - "crane": "crane", - "fenix": "fenix", - "nixpkgs": [ - "nixpkgs" - ], - "std": [ - "std" - ] - }, - "locked": { - "lastModified": 1687474833, - "narHash": "sha256-BDhiGpeTiAShO8JtNwjO0QpABf0KlDSrW35rRi1i9/w=", - "owner": "paisano-nix", - "repo": "mdbook-paisano-preprocessor", - "rev": "f74b63986c85b172e3e5bec744ef180870f8929c", - "type": "github" - }, - "original": { - "owner": "paisano-nix", - "repo": "mdbook-paisano-preprocessor", - "type": "github" - } - }, "paisano-tui": { "flake": false, "locked": { @@ -446,54 +331,9 @@ "namaka": "namaka", "nixago": "nixago", "nixpkgs": "nixpkgs", - "paisano-mdbook-preprocessor": "paisano-mdbook-preprocessor", "std": "std" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1677221702, - "narHash": "sha256-1M+58rC4eTCWNmmX0hQVZP20t3tfYNunl9D/PrGUyGE=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "f5401f620699b26ed9d47a1d2e838143a18dbe3b", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "paisano-mdbook-preprocessor", - "crane", - "flake-utils" - ], - "nixpkgs": [ - "paisano-mdbook-preprocessor", - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1675391458, - "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "std": { "inputs": { "arion": [ @@ -535,12 +375,12 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-Od+xml4wB5sbfxj2pqOsX4ubH9VruSWzci8DnUh83Zc=", - "path": "/nix/store/hkm632gfhndfipasjx573n5k9yj8j925-source", + "narHash": "sha256-wu7liUNT+cf9jIYgoPuhYpgR0KYK4bBEe1FAvI0o2Pk=", + "path": "/nix/store/pvbsxf557822wmdwpgmrilyi7wd7504a-source", "type": "path" }, "original": { - "path": "/nix/store/hkm632gfhndfipasjx573n5k9yj8j925-source", + "path": "/nix/store/pvbsxf557822wmdwpgmrilyi7wd7504a-source", "type": "path" } }, diff --git a/src/local/flake.nix b/src/local/flake.nix index 96eb58db..890da0f5 100644 --- a/src/local/flake.nix +++ b/src/local/flake.nix @@ -1,9 +1,6 @@ { inputs = { # injected (private) inputs - paisano-mdbook-preprocessor.url = "github:paisano-nix/mdbook-paisano-preprocessor"; - paisano-mdbook-preprocessor.inputs.std.follows = "std"; - paisano-mdbook-preprocessor.inputs.nixpkgs.follows = "nixpkgs"; namaka.url = "github:nix-community/namaka/v0.2.0"; namaka.inputs.haumea.follows = "std/haumea"; namaka.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/src/local/shells.nix b/src/local/shells.nix index 0733de96..1d1ae3cf 100644 --- a/src/local/shells.nix +++ b/src/local/shells.nix @@ -2,25 +2,23 @@ inputs, cell, }: let - l = nixpkgs.lib // builtins; inherit (inputs) nixpkgs namaka; - inherit (inputs.std) std lib; + inherit (inputs.nixpkgs.lib) mapAttrs optionals; + inherit (inputs.std) std; + inherit (inputs.std.lib.dev) mkShell; + inherit (cell) configs; in - l.mapAttrs (_: lib.dev.mkShell) rec { + mapAttrs (_: mkShell) rec { default = {...}: { name = "Standard"; nixago = [ - ((lib.dev.mkNixago lib.cfg.conform) - {data = {inherit (inputs) cells;};}) - ((lib.dev.mkNixago lib.cfg.treefmt) - cell.configs.treefmt) - ((lib.dev.mkNixago lib.cfg.editorconfig) - cell.configs.editorconfig) - ((lib.dev.mkNixago lib.cfg.githubsettings) - cell.configs.githubsettings) - (lib.dev.mkNixago lib.cfg.lefthook) - (lib.dev.mkNixago lib.cfg.adrgen) - (lib.dev.mkNixago cell.configs.cog) + configs.conform + configs.treefmt + configs.editorconfig + configs.githubsettings + configs.lefthook + configs.adrgen + configs.cog ]; commands = [ @@ -50,7 +48,7 @@ in category = "nix-testing"; } ] - ++ l.optionals nixpkgs.stdenv.isLinux [ + ++ optionals nixpkgs.stdenv.isLinux [ { package = nixpkgs.golangci-lint; category = "cli-dev"; @@ -60,9 +58,6 @@ in }; book = {...}: { - nixago = [ - ((lib.dev.mkNixago lib.cfg.mdbook) - cell.configs.mdbook) - ]; + nixago = [configs.mdbook]; }; } diff --git a/src/tests/flake.lock b/src/tests/flake.lock index ea18e954..92614a18 100644 --- a/src/tests/flake.lock +++ b/src/tests/flake.lock @@ -546,12 +546,12 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-f1KnRIsQwC46lbbyJW07N4KzYiwvTPSnZOTlGSjgN0w=", - "path": "/nix/store/ds26bw3zck02l14dj7s66kq1k95anbnn-source", + "narHash": "sha256-+T2Z0/wrY36VlYxrxpH6XOxueOhY01d328Xd8dK3JpM=", + "path": "/nix/store/khy89qylx627ldk11i0ndkijr94yyhv6-source", "type": "path" }, "original": { - "path": "/nix/store/ds26bw3zck02l14dj7s66kq1k95anbnn-source", + "path": "/nix/store/khy89qylx627ldk11i0ndkijr94yyhv6-source", "type": "path" } },