nix: update to 24.11

Reviewed-on: https://codeberg.org/leana8959/.files/pulls/1
Co-authored-by: Léana 江 <leana.jiang+git@icloud.com>
Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
This commit is contained in:
Primrose 2024-11-30 18:42:54 +00:00 committed by Léana
parent 57ed96f0ea
commit f6a89cba08
60 changed files with 696 additions and 752 deletions

View file

@ -6,7 +6,7 @@
}:
{
programs.fish = {
shellAbbrs = lib.mkMerge [
shellAbbrs = lib.mergeAttrsList [
{
# Docker
dc = "docker compose";
@ -22,7 +22,7 @@
":q" = "exit";
}
(lib.mkIf pkgs.stdenv.isLinux {
(lib.optionalAttrs pkgs.stdenv.isLinux {
ssys = "sudo systemctl";
sys = "systemctl";
se = "SUDO_EDITOR=(which \$EDITOR) sudoedit";
@ -30,25 +30,25 @@
hswitch = "home-manager switch --flake ~/.dotfiles#${hostname}";
})
(lib.mkIf pkgs.stdenv.isDarwin {
(lib.optionalAttrs pkgs.stdenv.isDarwin {
nswitch = "darwin-rebuild switch -L --flake ~/.dotfiles#${hostname} --option sandbox false";
})
];
shellAliases = lib.mkMerge [
shellAliases = lib.mergeAttrsList [
{
rm = "rm -I"; # idiot protection
tree = "tree -Cph";
restow = "cd ~/.dotfiles/ && stow -D . && stow -S . && prevd";
}
(lib.mkIf pkgs.stdenv.isLinux {
(lib.optionalAttrs pkgs.stdenv.isLinux {
# idiot protection
chmod = "chmod --preserve-root";
chown = "chown --preserve-root";
})
(lib.mkIf pkgs.stdenv.isDarwin (
(lib.optionalAttrs pkgs.stdenv.isDarwin (
let
cmds = builtins.concatStringsSep ";";
in