diff --git a/.forgejo/workflows/lint.yaml b/.forgejo/workflows/lint.yaml new file mode 100644 index 0000000..fdc85b6 --- /dev/null +++ b/.forgejo/workflows/lint.yaml @@ -0,0 +1,20 @@ +name: Lint + +on: + push: + branches: + - main + +jobs: + lint: + runs-on: docker + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Nix + uses: https://guardianproject.dev/actions/install-nix-action@v15 + + - name: Run just lint + run: nix-shell --run "just lint" diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..a97332c --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,6 @@ +{ + "MD033": false, + "line_length": { + "line_length": 92 + } +} diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..9bdbc96 --- /dev/null +++ b/Justfile @@ -0,0 +1,7 @@ +lint: + markdownlint README.md + nixfmt -c flake.nix + +fmt: + markdownlint --fix README.md + nixfmt flake.nix diff --git a/README.md b/README.md index 08b93c6..c50c349 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,16 @@

- pronouns: he/him/his - Website - ISO 3166: GB-SCT -

\ No newline at end of file + pronouns: he/him/his + + Website + + + ISO 3166: GB-SCT + + + ORCiD + +

diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d072398 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1748190013, + "narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "62b852f6c6742134ade1abdd2a21685fd617a291", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3fe2aa6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = + { + self, + nixpkgs, + flake-utils, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + with pkgs; + { + devShells.default = mkShell { + buildInputs = [ + git + markdownlint-cli + nixfmt-rfc-style + just + ]; + }; + } + ); +}