refactor: fix stylix complaints

This commit is contained in:
buffet 2024-05-09 17:07:49 +02:00
parent d1c0520c0e
commit d4aaf962c6
2 changed files with 74 additions and 70 deletions

View file

@ -12,10 +12,12 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; boot = {
boot.initrd.kernelModules = []; initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.kernelModules = []; initrd.kernelModules = [];
boot.extraModulePackages = []; kernelModules = [];
extraModulePackages = [];
};
fileSystems."/" = { fileSystems."/" = {
device = "UUID=288cfd6e-dd6d-4ac4-bc2f-36c1309f8619"; device = "UUID=288cfd6e-dd6d-4ac4-bc2f-36c1309f8619";

View file

@ -8,75 +8,77 @@ in {
INPUTRC = inputrc; INPUTRC = inputrc;
}; };
programs.direnv.enableBashIntegration = true; programs = {
programs.fzf.enableBashIntegration = true; direnv.enableBashIntegration = true;
fzf.enableBashIntegration = true;
programs.bash = { bash = {
enable = true; enable = true;
historyControl = ["erasedups" "ignorespace"]; historyControl = ["erasedups" "ignorespace"];
shellAliases = { shellAliases = {
e = "\"$EDITOR\""; e = "\"$EDITOR\"";
mkdir = "mkdir -p"; mkdir = "mkdir -p";
rg = "rg -S"; rg = "rg -S";
update = let update = let
change-message = pkgs.writeScript "change-commit-message" '' change-message = pkgs.writeScript "change-commit-message" ''
#!/bin/sh #!/bin/sh
sed -i '1s/.*/chore: update/' "$1" sed -i '1s/.*/chore: update/' "$1"
''; '';
in "nix flake update --commit-lock-file && EDITOR=${change-message} git commit --amend"; in "nix flake update --commit-lock-file && EDITOR=${change-message} git commit --amend";
};
shellOptions = [
"cdspell"
"checkjobs"
"extglob"
"globstar"
"histappend"
"nocaseglob"
];
bashrcExtra = ''
[[ -f ~/.profile ]] && . ~/.profile
'';
initExtra = ''
__prompt() {
local status="$?"
local row
local col
IFS=';' read -rs -dR -p $'\e[6n' row col >/dev/tty
if [[ $col != 1 ]]; then
printf '%s' $'\e[0;7m%\n\e[0m'
fi
PS1='\[\e[0;1m\]['
case $status in
0) PS1+='\[\e[32m\]' ;;
*) PS1+='\[\e[31m\]' ;;
esac
if [[ "$PWD" == "$HOME" ]]; then
PS1+="~"
elif [[ "$PWD" == / ]]; then
PS1+=/
else
PS1+="''${PWD##*/}"
fi
PS1+='\[\e[0;1m\]]\[\e[0m\]'
[[ $CONTAINER_ID ]] && PS1+="'"
PS1+=' '
}
PROMPT_COMMAND=__prompt
bind '"\C-o": "\C-a\C-k fg; if [[ $? == 1 ]]; then nvim; fi\n"'
bind '"\e\C-m": "\C-e | nvim\C-m"'
'';
}; };
shellOptions = [
"cdspell"
"checkjobs"
"extglob"
"globstar"
"histappend"
"nocaseglob"
];
bashrcExtra = ''
[[ -f ~/.profile ]] && . ~/.profile
'';
initExtra = ''
__prompt() {
local status="$?"
local row
local col
IFS=';' read -rs -dR -p $'\e[6n' row col >/dev/tty
if [[ $col != 1 ]]; then
printf '%s' $'\e[0;7m%\n\e[0m'
fi
PS1='\[\e[0;1m\]['
case $status in
0) PS1+='\[\e[32m\]' ;;
*) PS1+='\[\e[31m\]' ;;
esac
if [[ "$PWD" == "$HOME" ]]; then
PS1+="~"
elif [[ "$PWD" == / ]]; then
PS1+=/
else
PS1+="''${PWD##*/}"
fi
PS1+='\[\e[0;1m\]]\[\e[0m\]'
[[ $CONTAINER_ID ]] && PS1+="'"
PS1+=' '
}
PROMPT_COMMAND=__prompt
bind '"\C-o": "\C-a\C-k fg; if [[ $? == 1 ]]; then nvim; fi\n"'
bind '"\e\C-m": "\C-e | nvim\C-m"'
'';
}; };
}; };
} }