Compare commits
2 Commits
b319cd93e9
...
4ca3e9abf4
| Author | SHA1 | Date | |
|---|---|---|---|
|
4ca3e9abf4
|
|||
|
49a63fd6aa
|
6
.githooks/pre-commit
Executable file
6
.githooks/pre-commit
Executable 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
|
||||||
|
}
|
||||||
@@ -20,20 +20,20 @@
|
|||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [ "-f -L NAS-RAID" ];
|
extraArgs = ["-f -L NAS-RAID"];
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"@" = {
|
"@" = {
|
||||||
mountpoint = "/mnt/Pluto";
|
mountpoint = "/mnt/Pluto";
|
||||||
mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ];
|
mountOptions = ["compress=zstd" "noatime" "ssd" "discard=async"];
|
||||||
};
|
};
|
||||||
"@/Backups";
|
"@/Backups" = {};
|
||||||
"@/Media";
|
"@/Media" = {};
|
||||||
"@/Games";
|
"@/Games" = {};
|
||||||
"@/IT";
|
"@/IT" = {};
|
||||||
"@/Rest";
|
"@/Rest" = {};
|
||||||
"@snapshots" = {
|
"@snapshots" = {
|
||||||
mountpoint = "/mnt";
|
mountpoint = "/mnt";
|
||||||
mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ];
|
mountOptions = ["compress=zstd" "noatime" "ssd" "discard=async"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,13 +10,12 @@
|
|||||||
programs = {
|
programs = {
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hooks.pre-commit = pkgs.writeShellScript "pre-commit" ''
|
includes = [
|
||||||
nix fmt .
|
{
|
||||||
git diff --exit-code || {
|
condition = "gitdir:~/.setup/";
|
||||||
echo "Formatter changed files — review with 'git diff', then re-stage and commit."
|
contents.core.hooksPath = "~/.setup/.githooks";
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
'';
|
];
|
||||||
settings = {
|
settings = {
|
||||||
user.name = "Kabbone";
|
user.name = "Kabbone";
|
||||||
user.email = "tobias@opel-online.de";
|
user.email = "tobias@opel-online.de";
|
||||||
|
|||||||
Reference in New Issue
Block a user