Compare commits

...

2 Commits

Author SHA1 Message Date
4ca3e9abf4 fix disko_luks syntax 2026-04-26 18:21:02 +02:00
49a63fd6aa fix pre-commit hook 2026-04-26 18:16:37 +02:00
3 changed files with 19 additions and 14 deletions

6
.githooks/pre-commit Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
nix fmt .
git diff --exit-code || {
echo "Formatter changed files — review with 'git diff', then re-stage and commit."
exit 1
}

View File

@@ -20,20 +20,20 @@
};
content = {
type = "btrfs";
extraArgs = [ "-f -L NAS-RAID" ];
extraArgs = ["-f -L NAS-RAID"];
subvolumes = {
"@" = {
mountpoint = "/mnt/Pluto";
mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ];
mountOptions = ["compress=zstd" "noatime" "ssd" "discard=async"];
};
"@/Backups";
"@/Media";
"@/Games";
"@/IT";
"@/Rest";
"@/Backups" = {};
"@/Media" = {};
"@/Games" = {};
"@/IT" = {};
"@/Rest" = {};
"@snapshots" = {
mountpoint = "/mnt";
mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ];
mountOptions = ["compress=zstd" "noatime" "ssd" "discard=async"];
};
};
};

View File

@@ -10,13 +10,12 @@
programs = {
git = {
enable = true;
hooks.pre-commit = pkgs.writeShellScript "pre-commit" ''
nix fmt .
git diff --exit-code || {
echo "Formatter changed files review with 'git diff', then re-stage and commit."
exit 1
includes = [
{
condition = "gitdir:~/.setup/";
contents.core.hooksPath = "~/.setup/.githooks";
}
'';
];
settings = {
user.name = "Kabbone";
user.email = "tobias@opel-online.de";