From 2d41407a69d06d4dd50240732d2d5c1deb6470a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Apr 2024 14:51:38 +0200 Subject: [PATCH 1/3] fix website build --- flake-parts/deploy.nix | 2 +- flake-parts/devShells/default.nix | 3 - flake-parts/website.nix | 22 ----- flake.lock | 131 ------------------------------ flake.nix | 6 +- 5 files changed, 2 insertions(+), 162 deletions(-) diff --git a/flake-parts/deploy.nix b/flake-parts/deploy.nix index 1575c1c..bd89cea 100644 --- a/flake-parts/deploy.nix +++ b/flake-parts/deploy.nix @@ -5,7 +5,7 @@ self', ... }: let - deployScript = pkgs.writeScript "deploy.sh" '' + deployScript = pkgs.writeShellScript "deploy.sh" '' export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.openssh diff --git a/flake-parts/devShells/default.nix b/flake-parts/devShells/default.nix index b01b98f..d777430 100644 --- a/flake-parts/devShells/default.nix +++ b/flake-parts/devShells/default.nix @@ -11,9 +11,6 @@ pkgs.bashInteractive pkgs.zola ]; - inputsFrom = [ - inputs'.clan-core.devShells.default - ]; }; }; } diff --git a/flake-parts/website.nix b/flake-parts/website.nix index 0b3076f..cda0066 100644 --- a/flake-parts/website.nix +++ b/flake-parts/website.nix @@ -37,28 +37,6 @@ tail -n +2 "$sourceFile" >> "$targetFile" } - # inject pages from clan-core - for dir in ${inputs.clan-core}/docs/*; do - subdir=$(basename $dir) - targetDir="content/docs/$subdir" - mkdir -p "$targetDir" - for file in ${inputs.clan-core}/docs/$subdir/*.md; do - target="content/docs/$subdir/$(basename $file)" - # only generate page if file doesn't start with _ - if [[ $(basename $file) == _* ]]; then - cat "$file" > "$target" - continue - fi - generatePage "$file" "$target" - done - done - - # inject nixos options docs for clanCore - cp -r ${inputs'.clan-core.packages.docs-zola-pages-core} content/docs/core-options - - # inject nixos options docs for clanModules - cp -r ${inputs'.clan-core.packages.docs-zola-pages-modules} content/docs/modules-options - zola build cp -r public/* public/.* $out ''; diff --git a/flake.lock b/flake.lock index 393465f..4ac295e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,53 +1,5 @@ { "nodes": { - "clan-core": { - "inputs": { - "disko": "disko", - "flake-parts": [ - "flake-parts" - ], - "nixos-generators": "nixos-generators", - "nixpkgs": [ - "nixpkgs" - ], - "sops-nix": "sops-nix", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1712767807, - "narHash": "sha256-u909XpPk4gUvSnwv0KVzKKIduUg9lHeW2s7qMC/rdtI=", - "ref": "refs/heads/main", - "rev": "7dcadd30251ca972c7c290fd200db9e6b72ad567", - "revCount": 2470, - "type": "git", - "url": "https://git.clan.lol/clan/clan-core" - }, - "original": { - "type": "git", - "url": "https://git.clan.lol/clan/clan-core" - } - }, - "disko": { - "inputs": { - "nixpkgs": [ - "clan-core", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712356478, - "narHash": "sha256-kTcEtrQIRnexu5lAbLsmUcfR2CrmsACF1s3ZFw1NEVA=", - "owner": "nix-community", - "repo": "disko", - "rev": "0a17298c0d96190ef3be729d594ba202b9c53beb", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "disko", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -66,43 +18,6 @@ "type": "github" } }, - "nixlib": { - "locked": { - "lastModified": 1711846064, - "narHash": "sha256-cqfX0QJNEnge3a77VnytM0Q6QZZ0DziFXt6tSCV8ZSc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "90b1a963ff84dc532db92f678296ff2499a60a87", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixos-generators": { - "inputs": { - "nixlib": "nixlib", - "nixpkgs": [ - "clan-core", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712191720, - "narHash": "sha256-xXtSSnVHURHsxLQO30dzCKW5NJVGV/umdQPmFjPFMVA=", - "owner": "nix-community", - "repo": "nixos-generators", - "rev": "0c15e76bed5432d7775a22e8d22059511f59d23a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixos-generators", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1712439257, @@ -139,55 +54,9 @@ }, "root": { "inputs": { - "clan-core": "clan-core", "flake-parts": "flake-parts", "nixpkgs": "nixpkgs" } - }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "clan-core", - "nixpkgs" - ], - "nixpkgs-stable": [ - "clan-core" - ] - }, - "locked": { - "lastModified": 1712458908, - "narHash": "sha256-DMgBS+jNHDg8z3g9GkwqL8xTKXCRQ/0FGsAyrniVonc=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "39191e8e6265b106c9a2ba0cfd3a4dafe98a31c6", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "clan-core", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711963903, - "narHash": "sha256-N3QDhoaX+paWXHbEXZapqd1r95mdshxToGowtjtYkGI=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49dc4a92b02b8e68798abd99184f228243b6e3ac", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index a494068..50d9577 100644 --- a/flake.nix +++ b/flake.nix @@ -4,13 +4,9 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; - - clan-core.url = "git+https://git.clan.lol/clan/clan-core"; - clan-core.inputs.flake-parts.follows = "flake-parts"; - clan-core.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs@{ self, flake-parts, clan-core, ... }: + outputs = inputs@{ self, flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: { systems = [ "x86_64-linux" ]; imports = [ From da723063b32bfcdb7914c5819f35d839fb9eaabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Apr 2024 15:05:35 +0200 Subject: [PATCH 2/3] publish status update --- content/authors/Lassulus.md | 11 +++ .../2024-04-16-weekly-clan-status-update.md | 13 +++ flake-parts/website.nix | 90 +++++++++---------- 3 files changed, 69 insertions(+), 45 deletions(-) create mode 100644 content/authors/Lassulus.md create mode 100644 content/blog/2024-04-16-weekly-clan-status-update.md diff --git a/content/authors/Lassulus.md b/content/authors/Lassulus.md new file mode 100644 index 0000000..3d91567 --- /dev/null +++ b/content/authors/Lassulus.md @@ -0,0 +1,11 @@ ++++ +title = "Lassulus" +description = "Contributor to cLAN." +date = 2021-04-01T08:50:45+00:00 +updated = 2021-04-01T08:50:45+00:00 +draft = false ++++ + +Contributor to **clan**. + +[@lassulus](https://http://lassul.us/) diff --git a/content/blog/2024-04-16-weekly-clan-status-update.md b/content/blog/2024-04-16-weekly-clan-status-update.md new file mode 100644 index 0000000..b4f407b --- /dev/null +++ b/content/blog/2024-04-16-weekly-clan-status-update.md @@ -0,0 +1,13 @@ ++++ +title = "Weekly clan status update" +date = 2024-04-16T14:36:16+02:00 +draft = false +template = "blog/page.html" + +[taxonomies] +authors = ["Lassulus", "Mic92"] ++++ + +We added a new documentation hub for clan at [docs.clan.lol](https://docs.clan.lol) +We now have weekly office hours where people are invited to hangout and ask questions. +They are every Wednesday 15:30 UTC (17:30 CEST) at https://jitsi.lassul.us/clan.lol diff --git a/flake-parts/website.nix b/flake-parts/website.nix index cda0066..6a510fb 100644 --- a/flake-parts/website.nix +++ b/flake-parts/website.nix @@ -1,53 +1,53 @@ +{ self, ... }: { - self, - inputs, - ... -}: { - perSystem = { - lib, - pkgs, - self', - inputs', - ... - }: let - build = baseUrl: pkgs.runCommand "website" { - buildInputs = [ pkgs.zola ]; - } '' - mkdir -p $out - cp -r ${self}/* . - chmod -R u+w . + perSystem = + { + lib, + pkgs, + self', + inputs', + ... + }: + let + build = + baseUrl: + pkgs.runCommand "website" { buildInputs = [ pkgs.zola ]; } '' + mkdir -p $out + cp -r ${self}/* . + chmod -R u+w . - substituteInPlace config.toml --replace \ - 'base_url = "https://clan.lol"' \ - 'base_url = "${baseUrl}"' \ + substituteInPlace config.toml --replace \ + 'base_url = "https://clan.lol"' \ + 'base_url = "${baseUrl}"' \ - # generates a zola compatible .md from a clan-core/docs/**/*.md - generatePage() { - local sourceFile="$1" - local targetFile="$2" + # generates a zola compatible .md from a clan-core/docs/**/*.md + generatePage() { + local sourceFile="$1" + local targetFile="$2" - # generate title by reading first non-empty line of $file and stripping all '#' symbols - title=$(sed -n '/./{p;q}' "$sourceFile" | sed 's/#*//g') - echo "generating page from clan-core: $title" + # generate title by reading first non-empty line of $file and stripping all '#' symbols + title=$(sed -n '/./{p;q}' "$sourceFile" | sed 's/#*//g') + echo "generating page from clan-core: $title" - # generate header with title, template, weight to make zola happy - echo -e "+++\ntitle = \"$title\"\ntemplate = \"docs/page.html\"\nweight = 0\n+++" > "$targetFile" + # generate header with title, template, weight to make zola happy + echo -e "+++\ntitle = \"$title\"\ntemplate = \"docs/page.html\"\nweight = 0\n+++" > "$targetFile" - # append everything from the file but remove header line starting with '#' and all preceding non-empty lines - tail -n +2 "$sourceFile" >> "$targetFile" - } + # append everything from the file but remove header line starting with '#' and all preceding non-empty lines + tail -n +2 "$sourceFile" >> "$targetFile" + } - zola build - cp -r public/* public/.* $out - ''; - in { - packages.default = self'.packages.website; - packages.website = build "https://clan.lol"; - packages.website-localhost = build "http://localhost:1111"; - packages.serve = pkgs.writeShellScriptBin "serve-local" '' - echo "serving: ${self'.packages.website-localhost}" - ${pkgs.python3}/bin/python -m http.server 1111 \ - -d ${self'.packages.website-localhost} - ''; - }; + zola build + cp -r public/* public/.* $out + ''; + in + { + packages.default = self'.packages.website; + packages.website = build "https://clan.lol"; + packages.website-localhost = build "http://localhost:1111"; + packages.serve = pkgs.writeShellScriptBin "serve-local" '' + echo "serving: ${self'.packages.website-localhost}" + ${pkgs.python3}/bin/python -m http.server 1111 \ + -d ${self'.packages.website-localhost} + ''; + }; } From a23c9d32bc28b1c2a9e8605badbac55d4fa7580a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Apr 2024 15:12:04 +0200 Subject: [PATCH 3/3] extend weekly update --- content/blog/2024-04-16-weekly-clan-status-update.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/blog/2024-04-16-weekly-clan-status-update.md b/content/blog/2024-04-16-weekly-clan-status-update.md index b4f407b..536deef 100644 --- a/content/blog/2024-04-16-weekly-clan-status-update.md +++ b/content/blog/2024-04-16-weekly-clan-status-update.md @@ -8,6 +8,8 @@ template = "blog/page.html" authors = ["Lassulus", "Mic92"] +++ -We added a new documentation hub for clan at [docs.clan.lol](https://docs.clan.lol) +Last week, we added a new documentation hub for clan at [docs.clan.lol](https://docs.clan.lol). +We are still working on improving the installation procedures, so stay tuned. We now have weekly office hours where people are invited to hangout and ask questions. -They are every Wednesday 15:30 UTC (17:30 CEST) at https://jitsi.lassul.us/clan.lol +They are every Wednesday 15:30 UTC (17:30 CEST) in our [jitsi](https://jitsi.lassul.us/clan.lol). +Otherwise drop by in our [matrix channel](https://matrix.to/#/#clan:lassul.us).