From 111fcc9aeefc1b7634098d07560029e714f5f921 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Tue, 20 Aug 2024 08:48:41 +0100 Subject: [PATCH 01/16] add build to flake, update ci to build on changes to conf --- .forgejo/workflows/build.yaml | 3 ++- flake.nix | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 826295c..a88d71a 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -8,6 +8,7 @@ on: - flake.* - src/**/* - .forgejo/**/* + - mkdocs.yml jobs: # Build it locally, this helps caching for later @@ -31,4 +32,4 @@ jobs: - uses: https://forgejo.skynet.ie/Skynet/actions-deploy-to-skynet/deploy@v3 with: input: 'skynet_website_wiki' - token: ${{ secrets.API_TOKEN_FORGEJO }} \ No newline at end of file + token: ${{ secrets.API_TOKEN_FORGEJO }} diff --git a/flake.nix b/flake.nix index 586c0a0..835ea44 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,11 @@ pkgs.python3Packages.mkdocs pkgs.python3Packages.mkdocs-material ]; + shellHook = '' + echo "Building wiki" + mkdocs build + mkdocs serve + ''; }; } ); From 571554de27ca5ff27b9535e0284d536f8ad3423d Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Tue, 20 Aug 2024 08:52:08 +0100 Subject: [PATCH 02/16] docs: updated readme, removed renewal stuff, added link to wiki --- README.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ce47dde..b27f480 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,4 @@ -# skynet.ie-renew -Webpage explaining membership options to Alumni members. +# Skynet Wiki +[Wiki for Skynet][1] -## Previous version -This repo originally lived at . -It lived at . -It used a cron job and [this script][1] to keep it updated. - -## Current version -Now it is living at with a pipeline to automatically update it. - - - - - -[1]: https://gitlab.skynet.ie/compsoc1/skynet/website/alumni-renew/-/blob/5d1dd98bf6cc33be275c28f8fb6871fb10e8f687/update-renew-from-github.sh \ No newline at end of file +[1]: https://wiki.skynet.ie From deb7fff2f9bac4b8253035f9a4cf57d8993a507c Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Tue, 20 Aug 2024 08:58:03 +0100 Subject: [PATCH 03/16] docs: add links to mkdocs, build instructions --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b27f480..de4c6cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # Skynet Wiki [Wiki for Skynet][1] +Uses [mkdocs][2] to generate the site. +Run ```nix develop``` to build locally + [1]: https://wiki.skynet.ie +[2]: https://www.mkdocs.org From de22c5dae8fff7958fd3c1e3eb3450f050699a12 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Tue, 20 Aug 2024 17:25:14 +0100 Subject: [PATCH 04/16] remove shell hook, try add formatter --- flake.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 835ea44..538bf16 100644 --- a/flake.nix +++ b/flake.nix @@ -5,10 +5,11 @@ utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, utils, }: utils.lib.eachDefaultSystem (system: + outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}"; in { + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; defaultPackage = pkgs.stdenv.mkDerivation { name = "skynet-wiki"; src = self; @@ -26,11 +27,6 @@ pkgs.python3Packages.mkdocs pkgs.python3Packages.mkdocs-material ]; - shellHook = '' - echo "Building wiki" - mkdocs build - mkdocs serve - ''; }; } ); From eeb4224c1e1d03fbfa12fd5b505ae6ed57165cac Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Tue, 20 Aug 2024 20:41:20 +0100 Subject: [PATCH 05/16] trying to get fmt to work --- flake.lock | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 5 +-- 2 files changed, 97 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 128e4d5..0e7517a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,81 @@ { "nodes": { + "alejandra": { + "inputs": { + "fenix": "fenix", + "flakeCompat": "flakeCompat", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1660592437, + "narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=", + "owner": "kamadorueda", + "repo": "alejandra", + "rev": "e7eac49074b70814b542fee987af2987dd0520b5", + "type": "github" + }, + "original": { + "owner": "kamadorueda", + "ref": "3.0.0", + "repo": "alejandra", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "alejandra", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1657607339, + "narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=", + "owner": "nix-community", + "repo": "fenix", + "rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flakeCompat": { + "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" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1657425264, + "narHash": "sha256-3aHvoI2e8vJKw3hvnHECaBpSsL5mxVsVtaLCnTdNcH8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "de5b3dd17034e6106e75746e81618e5bd408de8a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1695837737, "narHash": "sha256-KcqmJ5hNacLuE7fkz5586kp/vt4NLo6+Prq3DMgrxpQ=", @@ -16,10 +91,28 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", + "alejandra": "alejandra", + "nixpkgs": "nixpkgs_2", "utils": "utils" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1657557289, + "narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "caf23f29144b371035b864a1017dbc32573ad56d", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 538bf16..0f1b0ad 100644 --- a/flake.nix +++ b/flake.nix @@ -3,13 +3,14 @@ inputs = { utils.url = "github:numtide/flake-utils"; + alejandra.url = "github:kamadorueda/alejandra/3.0.0"; }; - outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: + outputs = { self, nixpkgs, utils, alejandra}: utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}"; in { - formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; + packages.formatter = alejandra.defaultPackage.${system}; defaultPackage = pkgs.stdenv.mkDerivation { name = "skynet-wiki"; src = self; From c5bd5ae36ef6100b037ce46ea1e1aa17efbf5941 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Fri, 23 Aug 2024 13:01:58 +0100 Subject: [PATCH 06/16] test --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 0e7517a..82fc6a2 100644 --- a/flake.lock +++ b/flake.lock @@ -77,11 +77,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1695837737, - "narHash": "sha256-KcqmJ5hNacLuE7fkz5586kp/vt4NLo6+Prq3DMgrxpQ=", + "lastModified": 1724208548, + "narHash": "sha256-8Aiur5lv2L8o9ErxHqS2F293MHiHCoRG8C4vCwhkeXo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "517501bcf14ae6ec47efd6a17dda0ca8e6d866f9", + "rev": "4c30668e1edb7348169407f218fa7c71a94b17f3", "type": "github" }, "original": { @@ -133,11 +133,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { From 3c969f94859ce21b1c3920eb0eafd83c6ce19df8 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Fri, 23 Aug 2024 13:07:21 +0100 Subject: [PATCH 07/16] test webhook --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index de4c6cb..996c607 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Skynet Wiki +# Skynet Wiki [Wiki for Skynet][1] Uses [mkdocs][2] to generate the site. From d6e84f3e077768c358ec6ce11ee15722d01fdc6b Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Fri, 23 Aug 2024 13:09:00 +0100 Subject: [PATCH 08/16] test webhook --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 996c607..de4c6cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Skynet Wiki +# Skynet Wiki [Wiki for Skynet][1] Uses [mkdocs][2] to generate the site. From 6e45b2a86bbae198dadee4599ab91d4d3216e029 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:02:59 +0100 Subject: [PATCH 09/16] add formatter --- flake.nix | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/flake.nix b/flake.nix index 0f1b0ad..1783315 100644 --- a/flake.nix +++ b/flake.nix @@ -6,29 +6,35 @@ alejandra.url = "github:kamadorueda/alejandra/3.0.0"; }; - outputs = { self, nixpkgs, utils, alejandra}: utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages."${system}"; - in { - packages.formatter = alejandra.defaultPackage.${system}; - defaultPackage = pkgs.stdenv.mkDerivation { - name = "skynet-wiki"; - src = self; - buildInputs = [ - pkgs.python3Packages.mkdocs - pkgs.python3Packages.mkdocs-material - ]; - buildPhase = "mkdocs build"; - installPhase = "mkdir -p $out; cp -R site/* $out;"; - }; + outputs = { + self, + nixpkgs, + utils, + alejandra, + }: + utils.lib.eachDefaultSystem ( + system: let + pkgs = nixpkgs.legacyPackages."${system}"; + in { + formatter = alejandra.defaultPackage.${system}; + defaultPackage = pkgs.stdenv.mkDerivation { + name = "skynet-wiki"; + src = self; + buildInputs = [ + pkgs.python3Packages.mkdocs + pkgs.python3Packages.mkdocs-material + ]; + buildPhase = "mkdocs build"; + installPhase = "mkdir -p $out; cp -R site/* $out;"; + }; - devShells.default = pkgs.mkShell { - name = "Skynet Wiki env"; - packages = [ - pkgs.python3Packages.mkdocs - pkgs.python3Packages.mkdocs-material - ]; - }; - } - ); + devShells.default = pkgs.mkShell { + name = "Skynet Wiki env"; + packages = [ + pkgs.python3Packages.mkdocs + pkgs.python3Packages.mkdocs-material + ]; + }; + } + ); } From 7c76719922814e29564ac46e327503433ae7cf5b Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:08:58 +0100 Subject: [PATCH 10/16] flake --- flake.lock | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/flake.lock b/flake.lock index ffa7772..dc21f86 100644 --- a/flake.lock +++ b/flake.lock @@ -61,6 +61,27 @@ }, "nixpkgs": { "locked": { + "lastModified": 1657425264, + "narHash": "sha256-3aHvoI2e8vJKw3hvnHECaBpSsL5mxVsVtaLCnTdNcH8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "de5b3dd17034e6106e75746e81618e5bd408de8a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1724395761, + "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c", "type": "github" }, "original": { From eba88efd58e101fb8c95206b0d483af6097dc43c Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:10:23 +0100 Subject: [PATCH 11/16] flake --- flake.lock | 107 ++++------------------------------------------------- 1 file changed, 7 insertions(+), 100 deletions(-) diff --git a/flake.lock b/flake.lock index dc21f86..bfd457f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,87 +1,12 @@ { "nodes": { - "alejandra": { - "inputs": { - "fenix": "fenix", - "flakeCompat": "flakeCompat", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1660592437, - "narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=", - "owner": "kamadorueda", - "repo": "alejandra", - "rev": "e7eac49074b70814b542fee987af2987dd0520b5", - "type": "github" - }, - "original": { - "owner": "kamadorueda", - "ref": "3.0.0", - "repo": "alejandra", - "type": "github" - } - }, - "fenix": { - "inputs": { - "nixpkgs": [ - "alejandra", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1657607339, - "narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=", - "owner": "nix-community", - "repo": "fenix", - "rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "flakeCompat": { - "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" - } - }, "nixpkgs": { "locked": { - "lastModified": 1657425264, - "narHash": "sha256-3aHvoI2e8vJKw3hvnHECaBpSsL5mxVsVtaLCnTdNcH8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "de5b3dd17034e6106e75746e81618e5bd408de8a", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1724395761, - "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=", + "lastModified": 1724300212, + "narHash": "sha256-x3jl6OWTs+L9C7EtscuWZmGZWI0iSBDafvg3X7JMa1A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c", + "rev": "4de4818c1ffa76d57787af936e8a23648bda6be4", "type": "github" }, "original": { @@ -91,28 +16,10 @@ }, "root": { "inputs": { - "alejandra": "alejandra", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "utils": "utils" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1657557289, - "narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "caf23f29144b371035b864a1017dbc32573ad56d", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -133,11 +40,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { From 14d5fb5fd3af3b57eb8efd611880795621efac3a Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:14:43 +0100 Subject: [PATCH 12/16] fix : remove dupe packages in flake, as is on main --- README.md | 1 - flake.lock | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 15 ++++----- 3 files changed, 101 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index de4c6cb..b729878 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [Wiki for Skynet][1] Uses [mkdocs][2] to generate the site. -Run ```nix develop``` to build locally [1]: https://wiki.skynet.ie [2]: https://www.mkdocs.org diff --git a/flake.lock b/flake.lock index bfd457f..9cd42d4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,81 @@ { "nodes": { + "alejandra": { + "inputs": { + "fenix": "fenix", + "flakeCompat": "flakeCompat", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1660592437, + "narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=", + "owner": "kamadorueda", + "repo": "alejandra", + "rev": "e7eac49074b70814b542fee987af2987dd0520b5", + "type": "github" + }, + "original": { + "owner": "kamadorueda", + "ref": "3.0.0", + "repo": "alejandra", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "alejandra", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1657607339, + "narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=", + "owner": "nix-community", + "repo": "fenix", + "rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flakeCompat": { + "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" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1657425264, + "narHash": "sha256-3aHvoI2e8vJKw3hvnHECaBpSsL5mxVsVtaLCnTdNcH8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "de5b3dd17034e6106e75746e81618e5bd408de8a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1724300212, "narHash": "sha256-x3jl6OWTs+L9C7EtscuWZmGZWI0iSBDafvg3X7JMa1A=", @@ -16,10 +91,28 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", + "alejandra": "alejandra", + "nixpkgs": "nixpkgs_2", "utils": "utils" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1657557289, + "narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "caf23f29144b371035b864a1017dbc32573ad56d", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 1783315..f3f075c 100644 --- a/flake.nix +++ b/flake.nix @@ -15,25 +15,24 @@ utils.lib.eachDefaultSystem ( system: let pkgs = nixpkgs.legacyPackages."${system}"; + # find these here https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=python312Packages.mkdocs + packages = with pkgs.python3Packages; [ + mkdocs + mkdocs-material + ]; in { formatter = alejandra.defaultPackage.${system}; defaultPackage = pkgs.stdenv.mkDerivation { name = "skynet-wiki"; src = self; - buildInputs = [ - pkgs.python3Packages.mkdocs - pkgs.python3Packages.mkdocs-material - ]; + buildInputs = packages; buildPhase = "mkdocs build"; installPhase = "mkdir -p $out; cp -R site/* $out;"; }; devShells.default = pkgs.mkShell { name = "Skynet Wiki env"; - packages = [ - pkgs.python3Packages.mkdocs - pkgs.python3Packages.mkdocs-material - ]; + packages = packages; }; } ); From a0e189eeba8f0da04bfd3dd8fb44b2460a2c94a2 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:21:04 +0100 Subject: [PATCH 13/16] fix : update alejandra , remove version --- flake.lock | 37 ++++++++++++++++++------------------- flake.nix | 2 +- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index 9cd42d4..4132dc4 100644 --- a/flake.lock +++ b/flake.lock @@ -7,16 +7,15 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1660592437, - "narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=", + "lastModified": 1719514321, + "narHash": "sha256-ys1nJdZ8zB8JlpUbQmnj0hZalg03bEPgQdZN30DhETE=", "owner": "kamadorueda", "repo": "alejandra", - "rev": "e7eac49074b70814b542fee987af2987dd0520b5", + "rev": "d7552fef2ccf1bbf0d36b27f6fddb19073f205b7", "type": "github" }, "original": { "owner": "kamadorueda", - "ref": "3.0.0", "repo": "alejandra", "type": "github" } @@ -30,11 +29,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1657607339, - "narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=", + "lastModified": 1668234453, + "narHash": "sha256-FmuZThToBvRsqCauYJ3l8HJoGLAY5cMULeYEKIaGrRw=", "owner": "nix-community", "repo": "fenix", - "rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d", + "rev": "8f219f6b36e8d0d56afa7f67e6e3df63ef013cdb", "type": "github" }, "original": { @@ -61,11 +60,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1657425264, - "narHash": "sha256-3aHvoI2e8vJKw3hvnHECaBpSsL5mxVsVtaLCnTdNcH8=", + "lastModified": 1668226844, + "narHash": "sha256-G/S4FBWDAqHeBS/hfXwUCJbnaKnrQFoeeKwzvZEOgxM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "de5b3dd17034e6106e75746e81618e5bd408de8a", + "rev": "dd4767bf613bf9553eee6ff37c0996b9c876e7d8", "type": "github" }, "original": { @@ -77,11 +76,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1724300212, - "narHash": "sha256-x3jl6OWTs+L9C7EtscuWZmGZWI0iSBDafvg3X7JMa1A=", + "lastModified": 1724395761, + "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4de4818c1ffa76d57787af936e8a23648bda6be4", + "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c", "type": "github" }, "original": { @@ -99,11 +98,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1657557289, - "narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=", + "lastModified": 1668182250, + "narHash": "sha256-PYGaOCiFvnJdVz+ZCaKF8geGdffXjJUNcMwaBHv0FT4=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "caf23f29144b371035b864a1017dbc32573ad56d", + "rev": "45ec315e01dc8dd1146dfeb65f0ef6e5c2efed78", "type": "github" }, "original": { @@ -133,11 +132,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f3f075c..b6401ae 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { utils.url = "github:numtide/flake-utils"; - alejandra.url = "github:kamadorueda/alejandra/3.0.0"; + alejandra.url = "github:kamadorueda/alejandra"; }; outputs = { From 7efd3d9308360c744f3f4bf2f17e7bd0f5fdbcf2 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:31:21 +0100 Subject: [PATCH 14/16] test --- .forgejo/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index a88d71a..193820c 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -8,7 +8,7 @@ on: - flake.* - src/**/* - .forgejo/**/* - - mkdocs.yml + - mkdocs.yml jobs: # Build it locally, this helps caching for later From 5555dfc774441242ae6db030e1061a59ae2236cf Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:34:38 +0100 Subject: [PATCH 15/16] revert to main --- .forgejo/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 193820c..5b555d9 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -8,7 +8,6 @@ on: - flake.* - src/**/* - .forgejo/**/* - - mkdocs.yml jobs: # Build it locally, this helps caching for later From c56da8a768516ee538e6d8ec6ec12b9bc1eafbc9 Mon Sep 17 00:00:00 2001 From: Daragh Downes Date: Mon, 26 Aug 2024 20:40:42 +0100 Subject: [PATCH 16/16] fix : newline at end of file --- .forgejo/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 5b555d9..94e35f2 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -8,6 +8,7 @@ on: - flake.* - src/**/* - .forgejo/**/* + - mkdocs.yml jobs: # Build it locally, this helps caching for later @@ -31,4 +32,4 @@ jobs: - uses: https://forgejo.skynet.ie/Skynet/actions-deploy-to-skynet/deploy@v3 with: input: 'skynet_website_wiki' - token: ${{ secrets.API_TOKEN_FORGEJO }} + token: ${{ secrets.API_TOKEN_FORGEJO }} \ No newline at end of file