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

View file

@ -4,6 +4,11 @@
pkgs,
...
}:
let
inherit (pkgs) myPkgs;
in
{
imports = [
./aliasesAbbrs.nix
@ -18,14 +23,27 @@
home.packages = [
pkgs.vivid
pkgs.myPkgs.hutils
myPkgs.hutils
];
programs = {
fd.enable = true;
fzf.enable = true;
tmux.enable = true;
fzf = {
enable = true;
enableFishIntegration = true;
};
starship = {
enable = true;
enableFishIntegration = true;
};
kitty = {
settings.shell = ''${pkgs.fish}/bin/fish --command="tmux-home" --login'';
shellIntegration.enableFishIntegration = true;
};
};
services.gpg-agent.enableFishIntegration = true;
xdg.configFile = lib.mapAttrs' (path: _: {
name = "fish/functions/${path}";
value.source = lib.path.append ./functions path;
@ -33,7 +51,7 @@
programs.fish = {
sourcePaths = lib.mkMerge [
sourcePaths =
[
# Make sure wrapper comes first
# https://discourse.nixos.org/t/sudo-run-current-system-sw-bin-sudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set-and-cannot-chdir-var-cron-bailing-out-var-cron-permission-denied/20463/2
@ -53,8 +71,7 @@
]
# Add brew, but as fallback
(lib.mkIf pkgs.stdenv.isDarwin "/opt/homebrew/bin")
];
++ (lib.optional pkgs.stdenv.isDarwin "/opt/homebrew/bin");
interactiveShellInit = builtins.readFile ./shellInit.fish;