chore: switch to nixfmt

This commit is contained in:
Patrick 2024-07-26 22:12:21 +02:00
parent 63058c70e7
commit 857140bbd2
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
6 changed files with 16 additions and 19 deletions

View file

@ -65,9 +65,11 @@ in {
ExecStartPre = prestart;
ExecStart = ''
${lib.getExe pkgs.pr-tracker} --url "https://pr-tracker.${config.secrets.secrets.global.domains.web}"\
--user-agent "Patricks pr-tracker"\
--path nixpkgs --remote origin\
--email-white-list ${config.age.secrets.prTrackerWhiteList.path}
--user-agent "Patricks pr-tracker" \
--path nixpkgs --remote origin \
--email-white-list ${config.age.secrets.prTrackerWhiteList.path} \
--email-address pr-tracker@${config.secrets.secrets.global.domains.mail_public} \
--email-server smtp.${config.secrets.secrets.global.domains.mail_public} \
'';
EnvironmentFile = config.age.secrets.prTrackerEnv.path;

View file

@ -196,13 +196,15 @@
{
src = lib.cleanSource ./.;
hooks = {
alejandra.enable = true;
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
deadnix.enable = true;
statix.enable = true;
hunspell.enable = true;
};
};
devShell = import ./nix/devshell.nix inputs system;
formatter = pkgs.alejandra;
formatter = pkgs.nixfmt-rfc-style;
});
}

View file

@ -1,7 +1,5 @@
{
self,
devshell,
agenix-rekey,
...
}: system: let
pkgs = self.pkgs.${system};
@ -12,11 +10,6 @@ in
# Nix
nil
# Lua
stylua
(luajit.withPackages (p: with p; [luacheck]))
lua-language-server
# Misc
shellcheck
pre-commit
@ -35,7 +28,7 @@ in
help = "Edit and rekey repository secrets";
}
{
package = pkgs.alejandra;
package = pkgs.nixfmt-rfc-style;
help = "Format nix code";
}
{

View file

@ -12,11 +12,11 @@ rustPlatform.buildRustPackage {
src = fetchFromGitHub {
owner = "patrickdag";
repo = "pr-tracker";
rev = "71547ae3abbfd331a890ca2d5f3572bd92c0cecc";
hash = "sha256-Nq60EQz2TINtA4rkUsgVE4rvZ5O9otD8GXWJYPkiAhs=";
rev = "1be91285705bfdb55656db0835820cb034fe5010";
hash = "sha256-lPhp3Jq6YM8fi0WS/fJrCHdfdQFs5vdErdE5X80WAHE=";
};
cargoHash = "sha256-pcIbL/mWhvQpQcVgyeNccW5cnHGKPKBpY9f2eeSrcjk=";
cargoHash = "sha256-9bhKtg2g5H4zGn7yVCjTazeXfeoKjtAKAlzkLkCraiw=";
nativeBuildInputs = [pkg-config];
buildInputs = [openssl systemd];

View file

@ -16,7 +16,7 @@
protolint.enable = true;
};
formatting = {
alejandra.enable = true;
nixfmt.enable = true;
markdownlint.enable = true;
shfmt.enable = true;
};
@ -57,7 +57,7 @@
nil-ls = {
enable = true;
settings = {
formatting.command = [(lib.getExe pkgs.alejandra) "--quiet"];
formatting.command = [(lib.getExe pkgs.nixfmt-rfc-style) "--quiet"];
};
};
nixd.enable = true;