forked from clan/clan-core
Merge pull request 'Various cleanups' (#1670) from Mic92-main into main
This commit is contained in:
commit
b5a04debf5
19
flake.lock
19
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"
|
||||
]
|
||||
|
@ -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
|
||||
|
@ -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/*"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
@ -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)
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user