mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
chore: init
This commit is contained in:
commit
1b2c1ea359
891 changed files with 37053 additions and 0 deletions
58
modules/nixos/core/environment/default.nix
Executable file
58
modules/nixos/core/environment/default.nix
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment = {
|
||||
enableAllTerminfo = true;
|
||||
systemPackages =
|
||||
let
|
||||
yazi-picker = pkgs.writeShellScriptBin "yazi-picker" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
paths=$(yazi "$2" --chooser-file=/dev/stdout | while read -r; do printf "%q " "$REPLY"; done)
|
||||
|
||||
if [[ -n "$paths" ]]; then
|
||||
zellij action toggle-floating-panes
|
||||
zellij action write 27 # send <Escape> key
|
||||
zellij action write-chars ":$1 $paths"
|
||||
zellij action write 13 # send <Enter> key
|
||||
else
|
||||
zellij action toggle-floating-panes
|
||||
fi
|
||||
'';
|
||||
lazygit-root = pkgs.writeShellScriptBin "lazygit-root" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
git_root=$(git rev-parse --show-toplevel 2>/dev/null)
|
||||
|
||||
if [[ -z "$git_root" ]]; then
|
||||
echo "Not in a git repository"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$git_root" && lazygit
|
||||
'';
|
||||
in
|
||||
builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
git
|
||||
grim
|
||||
pijul
|
||||
sshfs
|
||||
tomb
|
||||
just
|
||||
virt-manager
|
||||
imagemagick
|
||||
;
|
||||
# Add your custom scripts to the attribute set
|
||||
inherit yazi-picker lazygit-root;
|
||||
};
|
||||
variables = {
|
||||
VIDEO_PLAYER = "mpv";
|
||||
EDITOR = "hx";
|
||||
TERM = "ghostty";
|
||||
NIXPKGS_ALLOW_INSECURE = "1";
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
GTK_THEME = "catppuccin-macchiato-mauve-compact";
|
||||
# ANTHROPIC_API_KEY = config.sops.secrets.claude-api-key.path;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue