refactor: archive old features directory to features.old
The new profile-based structure (home/base, home/desktop, home/server, home/profiles/, home/coding) is fully operational and imported via home/lib/mkHomeConfig. The legacy home/features directory is no longer referenced anywhere in the configuration. Archived rather than deleted to preserve history for reference.
This commit is contained in:
65
home/features.old/cli/AGENTS.md
Normal file
65
home/features.old/cli/AGENTS.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# CLI FEATURES (home-manager)
|
||||
|
||||
**Shell and terminal tooling with Fish + Nushell dual configuration**
|
||||
|
||||
## OVERVIEW
|
||||
8 CLI modules with integrated tooling across Fish and Nushell shells.
|
||||
|
||||
## STRUCTURE
|
||||
```
|
||||
cli/
|
||||
├── default.nix # Imports + shared tools (bat, eza, direnv)
|
||||
├── fish.nix # Fish shell + aliases
|
||||
├── fzf.nix # Fuzzy finder
|
||||
├── nitch.nix # System info tool
|
||||
├── nushell.nix # Nushell + aliases
|
||||
├── secrets.nix # Password-store integration
|
||||
├── starship.nix # Shell prompt
|
||||
└── zellij.nix # Terminal multiplexer
|
||||
```
|
||||
|
||||
## WHERE TO LOOK
|
||||
|
||||
| Task | Location | Notes |
|
||||
|------|----------|-------|
|
||||
| Add CLI tool | default.nix home.packages | Check if shell integration needed |
|
||||
| Shell aliases | fish.nix or nushell.nix | Kept in sync between shells |
|
||||
| Prompt config | starship.nix | Uses nerd-fonts symbols |
|
||||
| Secret access | secrets.nix | Agenix integration |
|
||||
|
||||
## CONVENTIONS
|
||||
|
||||
### Shell Integration Pattern
|
||||
Tools with shell hooks enabled in both Fish and Nushell:
|
||||
- **carapace**: Completions
|
||||
- **zoxide**: Smart cd
|
||||
- **eza**: ls replacement
|
||||
- **direnv**: Directory environments
|
||||
- **fzf**: Fuzzy finding
|
||||
|
||||
### NixOS Rebuild Aliases (both shells)
|
||||
```
|
||||
nr/nrs - nixos-rebuild [switch]
|
||||
snr/snrs - sudo nixos-rebuild [switch]
|
||||
hms - home-manager switch
|
||||
```
|
||||
|
||||
### Bat Theme
|
||||
Custom `universal` theme generated from nix-colors palette in default.nix (lines 34-157).
|
||||
|
||||
### Secrets Integration
|
||||
Fish/Nushell source `$HOME/.secrets` if `secrets.enable = true` (CLI secrets feature).
|
||||
|
||||
## ANTI-PATTERNS
|
||||
|
||||
- **DON'T** add aliases to only one shell - keep Fish/Nushell in sync
|
||||
- **DON'T** use `programs.bash` - Nushell is default shell
|
||||
- **DON'T** bypass carapace for completions - integrated by default
|
||||
|
||||
## NOTES
|
||||
|
||||
- zellij-ps custom package for project session management
|
||||
- Default shell set to Nushell in hosts/common/default.nix
|
||||
- Bat theme dynamically generated (no external theme files)
|
||||
- lf file manager uses bat for previews
|
||||
- Agenix CLI (agenix-cli) included for secret management
|
||||
230
home/features.old/cli/default.nix
Normal file
230
home/features.old/cli/default.nix
Normal file
@@ -0,0 +1,230 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
videoDrivers,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./fish.nix
|
||||
./fzf.nix
|
||||
./nitch.nix
|
||||
./nushell.nix
|
||||
./secrets.nix
|
||||
./starship.nix
|
||||
./television.nix
|
||||
./zellij.nix
|
||||
];
|
||||
|
||||
programs.carapace = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {theme = "universal";};
|
||||
themes = {
|
||||
universal = {
|
||||
src = pkgs.writeText "universal.tmTheme" ''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Universal (nix-colors)</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#${config.colorScheme.palette.base00}</string>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base05}</string>
|
||||
<key>caret</key>
|
||||
<string>#${config.colorScheme.palette.base05}</string>
|
||||
<key>selection</key>
|
||||
<string>#${config.colorScheme.palette.base02}</string>
|
||||
<key>selectionForeground</key>
|
||||
<string>#${config.colorScheme.palette.base05}</string>
|
||||
<key>lineHighlight</key>
|
||||
<string>#${config.colorScheme.palette.base01}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comment</string>
|
||||
<key>scope</key>
|
||||
<string>comment</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base03}</string>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base0A}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Number</string>
|
||||
<key>scope</key>
|
||||
<string>constant.numeric</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base0E}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Keyword</string>
|
||||
<key>scope</key>
|
||||
<string>keyword</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base08}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base0B}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Type</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.type, storage.type</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base0D}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Variable</string>
|
||||
<key>scope</key>
|
||||
<string>variable</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base05}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Constant</string>
|
||||
<key>scope</key>
|
||||
<string>constant</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#${config.colorScheme.palette.base0E}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
extraOptions = ["-l" "--icons" "--git" "-a"];
|
||||
};
|
||||
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preview = true;
|
||||
drawbox = true;
|
||||
hidden = true;
|
||||
icons = true;
|
||||
theme = "Dracula";
|
||||
previewer = "bat";
|
||||
};
|
||||
};
|
||||
|
||||
cli.zellij-ps = {
|
||||
enable = true;
|
||||
projectFolders = ["/home/m3tam3re/p"];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
basecamp
|
||||
comma
|
||||
coreutils
|
||||
devenv
|
||||
fabric-ai
|
||||
fd
|
||||
gcc
|
||||
go
|
||||
htop
|
||||
httpie
|
||||
hyprpaper-random
|
||||
jq
|
||||
just
|
||||
lazygit
|
||||
llm
|
||||
lf
|
||||
nix-index
|
||||
nix-update
|
||||
libnotify
|
||||
nushellPlugins.skim
|
||||
progress
|
||||
ripgrep
|
||||
rocmPackages.rocm-smi
|
||||
rocmPackages.rocminfo
|
||||
rocmPackages.rocm-runtime
|
||||
sqlite
|
||||
sqlite-vec
|
||||
tldr
|
||||
pomodoro-timer
|
||||
trash-cli
|
||||
unimatrix
|
||||
unzip
|
||||
vulkan-tools
|
||||
wttrbar
|
||||
wireguard-tools
|
||||
yazi
|
||||
zellij-ps
|
||||
zip
|
||||
];
|
||||
}
|
||||
116
home/features.old/cli/fish.nix
Normal file
116
home/features.old/cli/fish.nix
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.fish;
|
||||
in {
|
||||
options.features.cli.fish.enable = mkEnableOption "enable fish shell";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
# Fish colors using universal nix-colors palette
|
||||
# Text colors
|
||||
set -g fish_color_normal ${config.colorScheme.palette.base05} # text
|
||||
set -g fish_color_param ${config.colorScheme.palette.base05} # text
|
||||
set -g fish_color_comment ${config.colorScheme.palette.base03} # muted
|
||||
set -g fish_color_autosuggestion ${config.colorScheme.palette.base03} # muted
|
||||
|
||||
# Command colors
|
||||
set -g fish_color_command ${config.colorScheme.palette.base0D} # accent6 (blue)
|
||||
set -g fish_color_quote ${config.colorScheme.palette.base0A} # accent3 (yellow)
|
||||
set -g fish_color_redirection ${config.colorScheme.palette.base0E} # accent7 (purple)
|
||||
set -g fish_color_end ${config.colorScheme.palette.base08} # accent1 (red)
|
||||
set -g fish_color_error ${config.colorScheme.palette.base08} # accent1 (red)
|
||||
set -g fish_color_operator ${config.colorScheme.palette.base0C} # accent5 (cyan)
|
||||
set -g fish_color_escape ${config.colorScheme.palette.base09} # accent2 (orange)
|
||||
|
||||
# Path colors
|
||||
set -g fish_color_cwd ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||
set -g fish_color_cwd_root ${config.colorScheme.palette.base08} # accent1 (red)
|
||||
set -g fish_color_valid_path --underline
|
||||
|
||||
# Interactive colors
|
||||
set -g fish_color_match ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||
set -g fish_color_selection --background=${config.colorScheme.palette.base02} # overlay
|
||||
set -g fish_color_search_match --background=${config.colorScheme.palette.base02} # overlay
|
||||
set -g fish_color_history_current --bold
|
||||
set -g fish_color_user ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||
set -g fish_color_host ${config.colorScheme.palette.base0D} # accent6 (blue)
|
||||
set -g fish_color_cancel -r
|
||||
|
||||
# Pager colors
|
||||
set -g fish_pager_color_completion normal
|
||||
set -g fish_pager_color_description ${config.colorScheme.palette.base03} # muted
|
||||
set -g fish_pager_color_prefix ${config.colorScheme.palette.base0E} # accent7 (purple)
|
||||
set -g fish_pager_color_progress ${config.colorScheme.palette.base0B} # accent4 (green)
|
||||
'';
|
||||
loginShellInit = ''
|
||||
set -x NIX_PATH nixpkgs=channel:nixos-unstable
|
||||
set -x NIX_LOG info
|
||||
set -x WEBKIT_DISABLE_COMPOSITING_MODE 1
|
||||
set -x TERMINAL ghostty
|
||||
set -x EDITOR nvim
|
||||
set -x VISUAL zed
|
||||
set -x XDG_DATA_HOME $HOME/.local/share
|
||||
set -x FZF_CTRL_R_OPTS "
|
||||
--preview='bat --color=always -n {}'
|
||||
--preview-window up:3:hidden:wrap
|
||||
--bind 'ctrl-/:toggle-preview'
|
||||
--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'
|
||||
--color header:bold
|
||||
--header 'Press CTRL-Y to copy command into clipboard'"
|
||||
set -x FZF_DEFAULT_COMMAND fd --type f --exclude .git --follow --hidden
|
||||
set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
set -x FLAKE $HOME/p/nixos/nixos-config
|
||||
source /run/agenix/${config.home.username}-secrets
|
||||
|
||||
if test (tty) = "/dev/tty1"
|
||||
exec uwsm start -F /run/current-system/sw/bin/Hyprland
|
||||
end
|
||||
if test (tty) = "/dev/tty2"
|
||||
exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot
|
||||
end
|
||||
'';
|
||||
shellAbbrs = {
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
b = "yazi";
|
||||
ls = "eza";
|
||||
l = "eza -l --icons --git -a";
|
||||
lt = "eza --tree --level=2 --long --icons --git";
|
||||
grep = "rg";
|
||||
ps = "procs";
|
||||
just = "just --unstable";
|
||||
node = "bun";
|
||||
npx = "bunx";
|
||||
fs = "du -ah . | sort -hr | head -n 10";
|
||||
|
||||
n = "nix";
|
||||
nd = "nix develop -c $SHELL";
|
||||
ns = "nix shell";
|
||||
nsn = "nix shell nixpkgs#";
|
||||
nb = "nix build";
|
||||
nbn = "nix build nixpkgs#";
|
||||
nf = "nix flake";
|
||||
|
||||
nr = "sudo nixos-rebuild --flake .";
|
||||
nrs = "sudo nixos-rebuild switch --flake .#(uname -n)";
|
||||
snr = "sudo nixos-rebuild --flake .";
|
||||
snrs = "sudo nixos-rebuild --flake . switch";
|
||||
hm = "home-manager --flake .";
|
||||
hms = "home-manager --flake . switch";
|
||||
hmr = "cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch";
|
||||
|
||||
tsu = "sudo tailscale up";
|
||||
tsd = "sudo tailscale down";
|
||||
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
40
home/features.old/cli/fzf.nix
Normal file
40
home/features.old/cli/fzf.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.fzf;
|
||||
in {
|
||||
options.features.cli.fzf.enable = mkEnableOption "enable fuzzy finder";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
colors = {
|
||||
"fg" = "#${config.colorScheme.palette.base05}";
|
||||
"bg" = "#${config.colorScheme.palette.base00}";
|
||||
"hl" = "#${config.colorScheme.palette.base0E}";
|
||||
"fg+" = "#${config.colorScheme.palette.base05}";
|
||||
"bg+" = "#${config.colorScheme.palette.base02}";
|
||||
"hl+" = "#${config.colorScheme.palette.base0E}";
|
||||
"info" = "#${config.colorScheme.palette.base09}";
|
||||
"prompt" = "#${config.colorScheme.palette.base0B}";
|
||||
"pointer" = "#${config.colorScheme.palette.base08}";
|
||||
"marker" = "#${config.colorScheme.palette.base08}";
|
||||
"spinner" = "#${config.colorScheme.palette.base09}";
|
||||
"header" = "#${config.colorScheme.palette.base03}";
|
||||
};
|
||||
defaultOptions = [
|
||||
"--preview='bat --color=always -n {}'"
|
||||
"--bind 'ctrl-/:toggle-preview'"
|
||||
"--header 'Press CTRL-Y to copy command into clipboard'"
|
||||
"--bind 'ctrl-/:toggle-preview'"
|
||||
"--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'"
|
||||
];
|
||||
defaultCommand = "fd --type f --exclude .git --follow --hidden";
|
||||
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
|
||||
};
|
||||
};
|
||||
}
|
||||
15
home/features.old/cli/nitch.nix
Normal file
15
home/features.old/cli/nitch.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.nitch;
|
||||
in {
|
||||
options.features.cli.nitch.enable = mkEnableOption "enable nitch";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [nitch];
|
||||
};
|
||||
}
|
||||
91
home/features.old/cli/nushell.nix
Normal file
91
home/features.old/cli/nushell.nix
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.nushell;
|
||||
in {
|
||||
options.features.cli.nushell.enable = mkEnableOption "enable nushell";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
envFile.text = ''
|
||||
$env.config.show_banner = false
|
||||
$env.NIX_PATH = "nixpkgs=channel:nixos-unstable"
|
||||
$env.NIX_LOG = "iunfo"
|
||||
$env.WEBKIT_DISABLE_COMPOSITING_MODE = "1"
|
||||
$env.TERMINAL = "ghostty"
|
||||
$env.EDITOR = "nvim"
|
||||
$env.VISUAL = "zeditor"
|
||||
$env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden"
|
||||
$env.FZF_DEFAULT_OPTS = "--preview='bat --color=always -n {}' --bind 'ctrl-/:toggle-preview' --header 'Press CTRL-Y to copy command into clipboard' --bind 'ctrl-/:toggle-preview' --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' --color bg:#282a36,bg+:#44475a,fg:#f8f8f2,fg+:#f8f8f2,header:#6272a4,hl:#bd93f9,hl+:#bd93f9,info:#ffb86c,marker:#ff79c6,pointer:#ff79c6,prompt:#50fa7b,spinner:#ffb86c"
|
||||
$env.XDG_DATA_HOME = $"($env.HOME)/.local/share"
|
||||
$env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden"
|
||||
$env.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh"
|
||||
$env.PATH = ($env.PATH | split row (char esep) | append $"($env.HOME)/.cache/.bun/bin" | append $"($env.HOME)/.npm-global/bin" | uniq)
|
||||
$env.NPM_CONFIG_PREFIX = $"($env.HOME)/.npm-global"
|
||||
$env.FLAKE = $"($env.HOME)/p/NIX/nixos-config"
|
||||
|
||||
# Load kestractl-env from agenix
|
||||
if ("/run/agenix/kestractl-env" | path exists) {
|
||||
open /run/agenix/kestractl-env
|
||||
| lines
|
||||
| where {($in | str trim | str length) > 0}
|
||||
| parse "{key}={value}"
|
||||
| update value {str trim -c '"'}
|
||||
| transpose -r -d
|
||||
| load-env
|
||||
}
|
||||
'';
|
||||
|
||||
# if (tty) == "/dev/tty1" {
|
||||
# exec uwsm start -S -F /run/current-system/sw/bin/Hyprland
|
||||
# }
|
||||
# if (tty) == "/dev/tty2" {
|
||||
# exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot
|
||||
# }
|
||||
configFile.text = ''
|
||||
# Aliases
|
||||
alias .. = cd ..
|
||||
alias ... = cd ...
|
||||
alias h = cd $env.HOME
|
||||
alias b = yazi
|
||||
alias lt = eza --tree --level=2 --long --icons --git
|
||||
alias grep = rg
|
||||
alias just = just --unstable
|
||||
|
||||
alias node = bun
|
||||
alias npx = bunx
|
||||
|
||||
alias n = nix
|
||||
alias nd = nix develop -c $nu.current-shell
|
||||
alias ns = nix shell
|
||||
alias nsn = nix shell nixpkgs#
|
||||
alias nb = nix build
|
||||
alias nbn = nix build nixpkgs#
|
||||
alias nf = nix flake
|
||||
|
||||
alias nr = sudo nixos-rebuild --flake .
|
||||
alias nrs = sudo nixos-rebuild switch --flake .#(sys host | get hostname)
|
||||
alias snr = sudo nixos-rebuild --flake .
|
||||
alias snrs = sudo nixos-rebuild --flake . switch
|
||||
alias hm = home-manager --flake .
|
||||
alias hms = home-manager --flake . switch
|
||||
alias hmr = do { cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch }
|
||||
|
||||
alias tsu = sudo tailscale up
|
||||
alias tsd = sudo tailscale down
|
||||
|
||||
alias vi = nvim
|
||||
alias vim = nvim
|
||||
|
||||
if (which tv | is-not-empty) {
|
||||
mkdir ($nu.data-dir | path join "vendor/autoload")
|
||||
tv init nu | save -f ($nu.data-dir | path join "vendor/autoload/tv.nu")
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
22
home/features.old/cli/secrets.nix
Normal file
22
home/features.old/cli/secrets.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.secrets;
|
||||
in {
|
||||
options.features.cli.secrets.enable = mkEnableOption "enable secrets";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.pass-wayland.withExtensions
|
||||
(exts: [exts.pass-otp exts.pass-import]);
|
||||
settings = {PASSWORD_STORE_DIR = "$XDG_DATA_HOME/password-store";};
|
||||
};
|
||||
home.packages = with pkgs; [pinentry-gnome3];
|
||||
};
|
||||
}
|
||||
68
home/features.old/cli/starship.nix
Normal file
68
home/features.old/cli/starship.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.starship;
|
||||
in {
|
||||
options.features.cli.starship.enable = mkEnableOption "enable starship prompt";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
settings = {
|
||||
format = "$all$character";
|
||||
palette = "universal";
|
||||
|
||||
palettes.universal = {
|
||||
background = "#${config.colorScheme.palette.base00}";
|
||||
surface = "#${config.colorScheme.palette.base01}";
|
||||
muted = "#${config.colorScheme.palette.base03}";
|
||||
text = "#${config.colorScheme.palette.base05}";
|
||||
bright = "#${config.colorScheme.palette.base07}";
|
||||
accent1 = "#${config.colorScheme.palette.base08}";
|
||||
accent2 = "#${config.colorScheme.palette.base09}";
|
||||
accent3 = "#${config.colorScheme.palette.base0A}";
|
||||
accent4 = "#${config.colorScheme.palette.base0B}";
|
||||
accent5 = "#${config.colorScheme.palette.base0C}";
|
||||
accent6 = "#${config.colorScheme.palette.base0D}";
|
||||
accent7 = "#${config.colorScheme.palette.base0E}";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](accent7)";
|
||||
error_symbol = "[❯](accent1)";
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "accent6";
|
||||
truncation_length = 3;
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
style = "accent7";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "accent5";
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
style = "accent3";
|
||||
};
|
||||
|
||||
hostname = {
|
||||
style = "accent4";
|
||||
};
|
||||
|
||||
username = {
|
||||
style_user = "accent2";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
64
home/features.old/cli/television.nix
Normal file
64
home/features.old/cli/television.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.television;
|
||||
in {
|
||||
options.features.cli.television.enable = mkEnableOption "enable nitch";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.television = {
|
||||
enable = true;
|
||||
channels = {
|
||||
tldr = {
|
||||
metadata = {
|
||||
description = "Browse TLDR pages";
|
||||
name = "tldr";
|
||||
requirements = [
|
||||
"tldr"
|
||||
];
|
||||
};
|
||||
preview = {
|
||||
command = "tldr '{}'";
|
||||
};
|
||||
source = {
|
||||
command = "tldr --list";
|
||||
};
|
||||
};
|
||||
git-diff = {
|
||||
metadata = {
|
||||
description = "A channel to select files from git diff commands";
|
||||
name = "git-diff";
|
||||
requirements = [
|
||||
"git"
|
||||
];
|
||||
};
|
||||
preview = {
|
||||
command = "git diff HEAD --color=always -- '{}'";
|
||||
};
|
||||
source = {
|
||||
command = "git diff --name-only HEAD";
|
||||
};
|
||||
};
|
||||
git-log = {
|
||||
metadata = {
|
||||
description = "A channel to select from git log entries";
|
||||
name = "git-log";
|
||||
requirements = [
|
||||
"git"
|
||||
];
|
||||
};
|
||||
preview = {
|
||||
command = "git show -p --stat --pretty=fuller --color=always '{0}'";
|
||||
};
|
||||
source = {
|
||||
command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\"";
|
||||
output = "{split: :0}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
32
home/features.old/cli/zellij.nix
Normal file
32
home/features.old/cli/zellij.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.zellij;
|
||||
in {
|
||||
options.features.cli.zellij.enable = mkEnableOption "enable tmux";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "universal";
|
||||
themes.universal = {
|
||||
bg = "#${config.colorScheme.palette.base00}";
|
||||
fg = "#${config.colorScheme.palette.base05}";
|
||||
black = "#${config.colorScheme.palette.base01}";
|
||||
red = "#${config.colorScheme.palette.base08}";
|
||||
green = "#${config.colorScheme.palette.base0B}";
|
||||
yellow = "#${config.colorScheme.palette.base0A}";
|
||||
blue = "#${config.colorScheme.palette.base0D}";
|
||||
magenta = "#${config.colorScheme.palette.base0E}";
|
||||
cyan = "#${config.colorScheme.palette.base0C}";
|
||||
white = "#${config.colorScheme.palette.base07}";
|
||||
orange = "#${config.colorScheme.palette.base09}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user