From 0ead3b477f31965e2a20ae8cf0ed3e9c1e01e85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 30 Jun 2024 08:07:01 +0200 Subject: [PATCH 1/3] buildClan: improve deprecation error message of clanName Printing the clanName in my case was actually more confusing then helpful. Also mention what function needs to be updated. --- lib/build-clan/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/build-clan/default.nix b/lib/build-clan/default.nix index 2f3d3436..d156f2e4 100644 --- a/lib/build-clan/default.nix +++ b/lib/build-clan/default.nix @@ -107,7 +107,7 @@ let deprecationWarnings = [ (lib.warnIf ( clanName != null - ) "clanName is deprecated, please use meta.name instead. ${clanName}" null) + ) "clanName in buildClan is deprecated, please use meta.name instead." null) (lib.warnIf (clanIcon != null) "clanIcon is deprecated, please use meta.icon instead" null) ]; From 92669a0d59e4be51720dd31e4db8cae287094f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 30 Jun 2024 08:13:24 +0200 Subject: [PATCH 2/3] nixos-generators: drop nixlib copy --- flake.lock | 19 +++---------------- flake.nix | 1 + 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 63459cf6..0b9fe0ad 100644 --- a/flake.lock +++ b/flake.lock @@ -40,24 +40,11 @@ "type": "github" } }, - "nixlib": { - "locked": { - "lastModified": 1712450863, - "narHash": "sha256-K6IkdtMtq9xktmYPj0uaYc8NsIqHuaAoRBaMgu9Fvrw=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "3c62b6a12571c9a7f65ab037173ee153d539905f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "nixos-generators": { "inputs": { - "nixlib": "nixlib", + "nixlib": [ + "nixpkgs" + ], "nixpkgs": [ "nixpkgs" ] diff --git a/flake.nix b/flake.nix index 716b4fcc..1b2fd745 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ sops-nix.inputs.nixpkgs-stable.follows = ""; nixos-generators.url = "github:nix-community/nixos-generators"; nixos-generators.inputs.nixpkgs.follows = "nixpkgs"; + nixos-generators.inputs.nixlib.follows = "nixpkgs"; nixos-images.url = "github:nix-community/nixos-images"; nixos-images.inputs.nixos-unstable.follows = "nixpkgs"; # unused input From 498f2c02be54b2b0feb5c96dbdf2bfc6c6c0fd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 30 Jun 2024 08:17:04 +0200 Subject: [PATCH 3/3] formatter/vale: exclude lib Fixes ci --- formatter.nix | 94 +++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/formatter.nix b/formatter.nix index 945aa384..60a934f7 100644 --- a/formatter.nix +++ b/formatter.nix @@ -45,53 +45,53 @@ ]; includes = [ "*.py" ]; }; - treefmt.settings.formatter.vale = - with pkgs; - let - vocab = "cLAN"; - style = "Docs"; - config = writeText "vale.ini" '' - StylesPath = ${styles} - Vocab = ${vocab} + # FIXME: currently broken in CI + #treefmt.settings.formatter.vale = + # let + # vocab = "cLAN"; + # style = "Docs"; + # config = pkgs.writeText "vale.ini" '' + # StylesPath = ${styles} + # Vocab = ${vocab} - [*.md] - BasedOnStyles = Vale, ${style} - Vale.Terms = No - ''; - styles = symlinkJoin { - name = "vale-style"; - paths = [ - accept - headings - ]; - }; - accept = writeTextDir "config/vocabularies/${vocab}/accept.txt" '' - Nix - NixOS - Nixpkgs - clan.lol - Clan - monorepo - ''; - headings = writeTextDir "${style}/headings.yml" '' - extends: capitalization - message: "'%s' should be in sentence case" - level: error - scope: heading - # $title, $sentence, $lower, $upper, or a pattern. - match: $sentence - ''; - in - { - command = "${vale}/bin/vale"; - options = [ "--config=${config}" ]; - includes = [ "*.md" ]; - # TODO: too much at once, fix piecemeal - excludes = [ - "docs/*" - "clanModules/*" - "pkgs/*" - ]; - }; + # [*.md] + # BasedOnStyles = Vale, ${style} + # Vale.Terms = No + # ''; + # styles = pkgs.symlinkJoin { + # name = "vale-style"; + # paths = [ + # accept + # headings + # ]; + # }; + # accept = pkgs.writeTextDir "config/vocabularies/${vocab}/accept.txt" '' + # Nix + # NixOS + # Nixpkgs + # clan.lol + # Clan + # monorepo + # ''; + # headings = pkgs.writeTextDir "${style}/headings.yml" '' + # extends: capitalization + # message: "'%s' should be in sentence case" + # level: error + # scope: heading + # # $title, $sentence, $lower, $upper, or a pattern. + # match: $sentence + # ''; + # in + # { + # command = "${pkgs.vale}/bin/vale"; + # options = [ "--config=${config}" ]; + # includes = [ "*.md" ]; + # # TODO: too much at once, fix piecemeal + # excludes = [ + # "docs/*" + # "clanModules/*" + # "pkgs/*" + # ]; + # }; }; }