Compare commits

...

3 Commits

Author SHA1 Message Date
Dave Gallant
a5eae0df83 Remove sbx-h6-rgb 2025-01-27 20:23:41 -05:00
Dave Gallant
266401ceec Add cd-fzf 2025-01-27 20:14:33 -05:00
Dave Gallant
755ba0ca57 Remove tmux 2025-01-27 17:26:05 -05:00
9 changed files with 38 additions and 112 deletions

View File

@@ -8,7 +8,6 @@ in
src = ./.;
hooks = {
shellcheck.enable = true;
nixfmt.enable = true;
};
};
}

View File

@@ -18,7 +18,6 @@ in
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
targets = {
alacritty.enable = true;
tmux.enable = true;
vscode.enable = false; # overrides synced settings
};
@@ -145,6 +144,7 @@ in
envExtra = ''
export PAGER=less
export EDITOR=vim
export DOCKER_CLI_HINTS=false
export PATH=$PATH:~/.cargo/bin
export PATH=$PATH:~/.local/bin
@@ -197,8 +197,7 @@ in
m = "make";
nix-install = "nix-env -iA";
ps = "procs";
t = "tms";
ts = "tms switch";
t = "cd-fzf";
tf = "terraform";
tree = "eza --tree";
v = "nvim";
@@ -213,64 +212,6 @@ in
enable = true;
};
tmux = {
enable = true;
clock24 = true;
terminal = "tmux-256color";
customPaneNavigationAndResize = true;
plugins = with pkgs.tmuxPlugins; [
{
plugin = sessionist;
extraConfig = "set -g @plugin 'tmux-plugins/tmux-sessionist'";
}
{
plugin = sensible;
extraConfig = "set -g @plugin 'tmux-plugins/tmux-sensible'";
}
{
plugin = yank;
extraConfig = "set -g @plugin 'tmux-plugins/tmux-yank'";
}
{
plugin = resurrect;
extraConfig = ''
set -g @plugin 'tmux-plugins/tmux-resurrect'
'';
}
{
plugin = continuum;
extraConfig = ''
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
'';
}
{
plugin = open;
extraConfig = ''
set -g @plugin 'tmux-plugins/tmux-open'
'';
}
];
extraConfig = ''
set-window-option -g automatic-rename on
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
unbind-key -T copy-mode-vi MouseDragEnd1Pane
set-option -g set-titles on
set -g mouse on
set -g default-command "zsh"
set -g status-left-length 30
set -g status-right-length 150
set -g xterm-keys on
set -g monitor-activity on
set -g status-right '#(gitmux #{pane_current_path})'
set -g @yank_action 'copy-pipe'
'';
};
fzf = {
enable = true;
};
@@ -473,9 +414,7 @@ in
ms-kubernetes-tools.vscode-kubernetes-tools
redhat.vscode-yaml
]
++ lib.optionals stdenv.isLinux [
ms-python.python
];
++ lib.optionals stdenv.isLinux [ ms-python.python ];
};
firefox = {

View File

@@ -114,7 +114,6 @@ in
prismlauncher
qemu
ryujinx
sbx-h6-rgb
strace
unityhub
unstable.burpsuite
@@ -256,9 +255,6 @@ in
enable = true;
package = unstable.tailscale;
};
udev.extraRules = ''
ACTION=="add", ATTR{idVendor}=="041e", ATTR{idProduct}=="3255", RUN+="${pkgs.sbx-h6-rgb}/bin/sbx-h6-ctl -c c010ff 041e:3255"
'';
xserver = {
enable = true;
displayManager = {

View File

@@ -1,7 +1,4 @@
{ pkgs, ... }:
let
checkBrew = "command -v brew > /dev/null";
in
{
nixpkgs = {
config = {
@@ -29,9 +26,6 @@ in
users.users."dave.gallant".home = "/Users/dave.gallant";
environment = {
extraInit = ''
${checkBrew} || >&2 echo "brew is not installed (install it via https://brew.sh)"
'';
variables = {
LANG = "en_US.UTF-8";
};

17
overlays/cd-fzf/cd-fzf Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
readarray -t directories < ~/.config/cd-fzf
if [[ $# -eq 1 ]]; then
selected=$1
else
selected=$(find "${directories[@]}" -mindepth 1 -maxdepth 1 -type d | fzf --exact)
fi
if [[ -z $selected ]]; then
exit 0
fi
cd "$selected"
$SHELL

View File

@@ -0,0 +1,16 @@
{ stdenv, lib, fetchurl, }:
stdenv.mkDerivation rec {
pname = "cd-fzf";
version = "0.0.1";
executable = ./cd-fzf;
phases = [ "unpackPhase" ]; # Remove all other phases
unpackPhase = ''
mkdir -p $out/bin
cp ${executable} $out/bin/cd-fzf
'';
meta = with lib; {
description =
"\n Fuzzy find change directory";
platforms = platforms.unix;
};
}

View File

@@ -1,4 +1,4 @@
final: prev: {
sbx-h6-rgb = prev.callPackage ./sbx-h6-rgb { };
cd-fzf = prev.callPackage ./cd-fzf { };
vpngate = prev.callPackage ./vpngate { };
}

View File

@@ -1,35 +0,0 @@
{
lib,
fetchFromGitHub,
pkgs,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "sbx-h6-rgb";
version = "95b4ef9788ef94e557a4d1e815079d5ea8a70943";
src = fetchFromGitHub {
owner = "Oscillope";
repo = "sbx-h6-rgb";
rev = version;
sha256 = "sha256-tKKNdzijloBiGBHf5C604824B/BbxBxvCL/ms4orT9M=";
};
buildInputs = with pkgs; [ hidapi ];
buildPhase = ''
make
'';
installPhase = ''
install -D sbx-h6-ctl $out/bin/sbx-h6-ctl
'';
meta = with lib; {
description = "Creative SoundBlasterX RGB LED setter.";
license = licenses.gpl3;
maintainers = with maintainers; [ davegallant ];
platforms = platforms.linux;
};
}

View File

@@ -22,6 +22,7 @@ in
# modern cli
bat
cd-fzf
doggo
eza
fd
@@ -34,7 +35,6 @@ in
shellcheck
shfmt
tldr
tmux-sessionizer
atuin
github-cli