diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 267f979..6f696d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ name: CI - on: push: - jobs: # treefmt: # name: treefmt @@ -15,7 +13,6 @@ jobs: # name: sno2wman # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' # - run: nix-shell --run "treefmt --fail-on-change" - flake-check: name: flake-check runs-on: ubuntu-latest @@ -24,6 +21,6 @@ jobs: - uses: cachix/install-nix-action@v17 - uses: cachix/cachix-action@v10 with: - name: sno2wman - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + name: sno2wman + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: nix flake check diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 157b4b9..3d75c12 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,11 +1,9 @@ name: Deploy to GitHub Pages - on: push: branches: - main workflow_dispatch: - jobs: build: runs-on: ubuntu-latest @@ -20,7 +18,6 @@ jobs: - run: nix build ".#github-page" - run: cp -r --dereference --no-preserve=mode,ownership result/ _site/ - uses: actions/upload-pages-artifact@v1 - deploy: runs-on: ubuntu-latest needs: build diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index 5e80495..f826f25 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -3,7 +3,6 @@ on: workflow_dispatch: # allows manual triggering schedule: - cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 - jobs: lockfile: runs-on: ubuntu-latest diff --git a/.vscode/settings.json b/.vscode/settings.json index df0fef4..d1615c6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,8 @@ "markdown", "nix", "satysfi", - "toml" + "toml", + "yaml" ] } ], @@ -35,6 +36,9 @@ "[satysfi]": { "editor.defaultFormatter": "jkillian.custom-local-formatters" }, + "[yaml]": { + "editor.defaultFormatter": "jkillian.custom-local-formatters" + }, "editor.unicodeHighlight.allowedCharacters": { ",": true, ".": true, diff --git a/flake.lock b/flake.lock index 0ea1ac1..41c4005 100644 --- a/flake.lock +++ b/flake.lock @@ -57,6 +57,25 @@ "type": "github" } }, + "devshell_4": { + "inputs": { + "flake-utils": "flake-utils_7", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1660811669, + "narHash": "sha256-V6lmsaLNFz41myppL0yxglta92ijkSvpZ+XVygAh+bU=", + "owner": "numtide", + "repo": "devshell", + "rev": "c2feacb46ee69949124c835419861143c4016fb5", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -105,6 +124,22 @@ "type": "github" } }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1642700792, @@ -195,6 +230,55 @@ "type": "github" } }, + "flake-utils_7": { + "locked": { + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_8": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gomod2nix": { + "inputs": { + "nixpkgs": "nixpkgs_8", + "utils": "utils" + }, + "locked": { + "lastModified": 1660721781, + "narHash": "sha256-7skn4VUVzxqgH6kU7juBlARQ4Ts+qQ4Lq48xU87x8xI=", + "owner": "tweag", + "repo": "gomod2nix", + "rev": "b8c2216317cd23e4f49f1235c27522604be60349", + "type": "github" + }, + "original": { + "owner": "tweag", + "repo": "gomod2nix", + "type": "github" + } + }, "naersk": { "inputs": { "nixpkgs": [ @@ -237,6 +321,22 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1661179195, + "narHash": "sha256-1tM5Xu5FhLPZ2JaYIyQYsE7Ixg/GgBJK4bpjONhFcD8=", + "owner": "ilkecan", + "repo": "nix-filter", + "rev": "7fdfe95ab431e27d53aaf33007bbf81019544e4c", + "type": "github" + }, + "original": { + "owner": "ilkecan", + "ref": "add-_assertPathIsDirectory", + "repo": "nix-filter", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1643381941, @@ -333,6 +433,54 @@ "type": "github" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1643381941, + "narHash": "sha256-pHTwvnN4tTsEKkWlXQ8JMY423epos8wUOhthpwJjtpc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5efc8ca954272c4376ac929f4c5ffefcc20551d5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1661193147, + "narHash": "sha256-qnXyjH8Pk1SZ+b32AeU/KGZPgQCKLIM2ZCT0tjLGrpI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "568b598a9a86f9107e754672b373038db53e4bdc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1660998696, + "narHash": "sha256-N5eDv9THZz5pFn7NR1swaFrAJYByfrA5gU5L7JONItA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "13711c9ab9f5a160a44affb7a6221be53318a873", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "devshell": "devshell", @@ -341,7 +489,8 @@ "nixpkgs": "nixpkgs_2", "satysfi": "satysfi", "satysfi-formatter": "satysfi-formatter", - "satysfi-language-server": "satysfi-language-server" + "satysfi-language-server": "satysfi-language-server", + "yamlfmt": "yamlfmt" } }, "satysfi": { @@ -405,6 +554,45 @@ "repo": "satysfi-language-server", "type": "github" } + }, + "utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "yamlfmt": { + "inputs": { + "devshell": "devshell_4", + "flake-compat": "flake-compat_4", + "flake-utils": "flake-utils_8", + "gomod2nix": "gomod2nix", + "nix-filter": "nix-filter", + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1661198907, + "narHash": "sha256-g0io0av6VFYmbfMqR6tusYSUQA0X85t3M5ksh/vemvQ=", + "owner": "SnO2WMaN", + "repo": "yamlfmt", + "rev": "7b3a2e9704982b979bbfd74f13a11c20e5f4aa99", + "type": "github" + }, + "original": { + "owner": "SnO2WMaN", + "ref": "nix-intgl", + "repo": "yamlfmt", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c4d8372..14997a6 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,8 @@ satysfi-formatter.url = "github:SnO2WMaN/satysfi-formatter/nix-integrate"; satysfi-language-server.url = "github:SnO2WMaN/satysfi-language-server/nix-integrate"; + + yamlfmt.url = "github:SnO2WMaN/yamlfmt/nix-intgl"; }; outputs = { @@ -23,8 +25,6 @@ nixpkgs, flake-utils, devshell, - satysfi-formatter, - satysfi-language-server, ... } @ inputs: { @@ -41,11 +41,13 @@ overlays = [ devshell.overlay self.overlays.default - (final: prev: { - satysfi-language-server = satysfi-language-server.packages.${system}.satysfi-language-server; - satysfi-formatter = satysfi-formatter.packages.${system}.satysfi-formatter; - satysfi-formatter-write-each = satysfi-formatter.packages.${system}.satysfi-formatter-write-each; - }) + (final: prev: + with inputs; { + satysfi-language-server = satysfi-language-server.packages.${system}.satysfi-language-server; + satysfi-formatter = satysfi-formatter.packages.${system}.satysfi-formatter; + satysfi-formatter-write-each = satysfi-formatter.packages.${system}.satysfi-formatter-write-each; + yamlfmt = yamlfmt.packages.${system}.yamlfmt; + }) ]; }; in { @@ -111,6 +113,7 @@ satysfi satysfi-language-server satysfi-formatter-write-each + yamlfmt ] ); }; diff --git a/treefmt.toml b/treefmt.toml index f045e32..25f8b35 100644 --- a/treefmt.toml +++ b/treefmt.toml @@ -7,6 +7,10 @@ command = "dprint" options = ["fmt"] includes = ["*.json", "*.toml", "*.md"] +[formatter.yamlfmt] +command = "yamlfmt" +includes = ["*.yml", "*.yaml"] + [formatter.satysfi-fmt] command = "satysfi-fmt-write-each" includes = ["*.saty", "*.satyh"]