1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 08:10:43 +01:00

chore: update configs

This commit is contained in:
Ryan Cao 2025-08-15 18:22:33 +08:00
parent 79bc61a28e
commit 2e1d4ef8f2
Signed by: ryanccn
GPG key ID: F605AB4AF937D5D0
10 changed files with 63 additions and 82 deletions

View file

@ -1,25 +0,0 @@
# SPDX-FileCopyrightText: 2025 Ryan Cao <hello@ryanccn.dev>
#
# SPDX-License-Identifier: Apache-2.0
{
"g".command = "git";
"j".command = "just";
"nb".command = "nix build";
"nfu".command = "nix flake update";
"glol".command =
"git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'";
"glol".fishAlias = true;
"ghrvw".command = "gh repo view --web";
"opr".command = "op run --env-file=.env.1password --";
"dr".command = "doppler run --";
"dequarantine".command = "xattr -d com.apple.quarantine";
"bcpa".command = "brew cleanup --prune=all";
"puil".command = "pnpm update --interactive --latest";
}

View file

@ -2,22 +2,30 @@
#
# SPDX-License-Identifier: Apache-2.0
{ lib, ... }:
let
aliases = import ./aliases.nix;
shellAbbrs = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: a: !(lib.maybeAttr "fishAlias" false a)) aliases
);
shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: a: lib.maybeAttr "fishAlias" false a) aliases
);
in
{
programs.fish = {
enable = true;
inherit shellAbbrs shellAliases;
shellAbbrs = {
g = "git";
j = "just";
nb = "nix build";
nfu = "nix flake update";
glol = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'";
ghrvw = "gh repo view --web";
opr = "op run --env-file=.env.1password --";
dr = "doppler run --";
dequarantine = "xattr -d com.apple.quarantine";
bcpa = "brew cleanup --prune=all";
puil = "pnpm update --interactive --latest";
};
shellAliases = { };
shellInit = ''
for config in ${./fish/configs}/*.fish

View file

@ -2,9 +2,10 @@
#
# SPDX-License-Identifier: Apache-2.0
_: {
{ config, ... }:
{
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
dotDir = "${config.xdg.configHome}/zsh";
};
}