Compare commits
2 commits
aa1c31dcc2
...
e7b03b9770
Author | SHA1 | Date | |
---|---|---|---|
teutat3s | e7b03b9770 | ||
teutat3s | 8f0790b6fd |
|
@ -135,8 +135,12 @@ in {
|
||||||
# brcmfmac being loaded during hibernation would inhibit a successful resume
|
# brcmfmac being loaded during hibernation would inhibit a successful resume
|
||||||
# https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116.
|
# https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116.
|
||||||
# Also brcmfmac could randomly crash on resume from sleep.
|
# Also brcmfmac could randomly crash on resume from sleep.
|
||||||
powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac_wcc brcmfmac";
|
powerUpCommands = lib.mkBefore ("${pkgs.kmod}/bin/modprobe brcmfmac"
|
||||||
powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac_wcc brcmfmac";
|
+ lib.optionalString
|
||||||
|
(lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") " brcmfmac_wcc");
|
||||||
|
powerDownCommands = lib.mkBefore ("${pkgs.kmod}/bin/rmmod brcmfmac"
|
||||||
|
+ lib.optionalString
|
||||||
|
(lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") " brcmfmac_wcc");
|
||||||
};
|
};
|
||||||
|
|
||||||
# Change lid switch behaviour
|
# Change lid switch behaviour
|
||||||
|
|
|
@ -36,7 +36,7 @@ in {
|
||||||
loader.systemd-boot.enable = lib.mkDefault true;
|
loader.systemd-boot.enable = lib.mkDefault true;
|
||||||
|
|
||||||
# Use latest linux kernel by default
|
# Use latest linux kernel by default
|
||||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_2;
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_1;
|
||||||
|
|
||||||
# Support ntfs drives
|
# Support ntfs drives
|
||||||
supportedFilesystems = ["ntfs"];
|
supportedFilesystems = ["ntfs"];
|
||||||
|
|
|
@ -9,15 +9,25 @@ fi
|
||||||
|
|
||||||
diff="git diff-index --name-only --cached $against --diff-filter d"
|
diff="git diff-index --name-only --cached $against --diff-filter d"
|
||||||
|
|
||||||
all_files=($($diff))
|
mapfile -t all_files < <($diff)
|
||||||
|
|
||||||
# Format staged files.
|
# Stash only unstaged changes, keeping staged changes
|
||||||
|
old_stash=$(git rev-parse --quiet --verify refs/stash)
|
||||||
|
git stash push --quiet --keep-index -m 'Unstaged changes before pre-commit hook'
|
||||||
|
new_stash=$(git rev-parse --quiet --verify refs/stash)
|
||||||
|
|
||||||
|
# Format staged files
|
||||||
if ((${#all_files[@]} != 0)); then
|
if ((${#all_files[@]} != 0)); then
|
||||||
treefmt "${all_files[@]}" &&
|
treefmt "${all_files[@]}" &&
|
||||||
git add "${all_files[@]}"
|
git add "${all_files[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check editorconfig
|
# If unstaged changes were stashed re-apply to working tree
|
||||||
|
if [ "$old_stash" != "$new_stash" ]; then
|
||||||
|
git stash pop --quiet
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check editorconfig
|
||||||
if ((${#all_files[@]} != 0)); then
|
if ((${#all_files[@]} != 0)); then
|
||||||
if ! editorconfig-checker -- "${all_files[@]}"; then
|
if ! editorconfig-checker -- "${all_files[@]}"; then
|
||||||
printf "%b\n" \
|
printf "%b\n" \
|
||||||
|
|
Loading…
Reference in a new issue