1
0
Fork 0

Compare commits

...

2 commits

Author SHA1 Message Date
43eab988cf
Fix pre-hooks not activating 2025-07-10 02:22:58 -05:00
60a0ceb192
Improve pre-hooks 2025-07-10 02:12:25 -05:00
6 changed files with 32 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.direnv
.helix
.vale/styles/config/vocabularies/General
.pre-commit-config.yaml

View file

@ -1,6 +1,6 @@
# Laptop configuration
This repository has the Nix home-manager configuration for my laptop, allowing me to manage a user configuration with reproducibility on other machines. It currently operates on a foreign Linux distribution (Fedora Asahi Remix) with plans to switch to NixOS when time allows and to make it reusable for other systems. It uses `direnv` to automatically load the environment for running commands for this Flake.
This repository has the Nix home-manager configuration for my laptop, allowing me to manage a user configuration with reproducibility on other machines. It currently operates on a foreign Linux distribution (Fedora Asahi Remix) with plans to switch to NixOS when time allows and to make it reusable for other systems. `direnv` automatically loads the environment for running commands for this Flake.
## Features

View file

@ -170,12 +170,25 @@
${pkgs.uutils-coreutils-noprefix}/bin/ln -fs ${helixLanguagesFile} ./.helix/languages.toml
'';
};
pre_commit = {
text = ''
${config.pre-commit.installationScript}
'';
};
};
};
};
# https://flake.parts/options/git-hooks-nix.html
pre-commit.settings = {
hooks = preCommitHooks;
hooks = preCommitHooks // {
treefmt = {
enable = true;
package = treefmt;
};
check-merge-conflicts.enable = true;
check-symlinks.enable = true;
flake-checker.enable = true;
};
};
# https://flake.parts/options/treefmt-nix.html
treefmt = {

View file

@ -35,10 +35,20 @@ in
# https://writewithharper.com/docs/integrations/language-server#Supported-Languages
harper-ls.command = "${pkgs.harper}/bin/harper-ls";
};
pre-commit = {
typos = {
enable = true;
settings = {
configPath = typosConfigFile.outPath;
locale = "en-us";
};
};
vale.enable = true;
};
treefmt.programs.typos = {
enable = true;
locale = "en-us";
configFile = typosConfigFile.outPath;
locale = "en-us";
};
devshell = {
commands = [

View file

@ -20,4 +20,5 @@
language-server.taplo.command = "${pkgs.taplo}/bin/taplo";
};
treefmt.programs.taplo.enable = true;
pre-commit.check-toml.enable = true;
}

View file

@ -23,4 +23,8 @@
enable = true;
settings.plugins = [ "g-plane-pretty_yaml" ];
};
pre-commit = {
check-yaml.enable = true;
sort-simple-yaml.enable = true;
};
}