random rice

This commit is contained in:
iofq 2025-06-20 23:39:52 -05:00
parent f080730c99
commit 60613b0a1d
No known key found for this signature in database
GPG key ID: ECF3B2DA38BF7183
17 changed files with 221 additions and 143 deletions

View file

@ -7,6 +7,7 @@
tree
jujutsu
emacs-nox
shellcheck
#devops
k9s

View file

@ -1,7 +1,4 @@
{
pkgs,
...
}: {
{pkgs, ...}: {
imports = [
./tmux.nix
./git.nix
@ -88,6 +85,10 @@
pinentry-mode = "loopback";
};
};
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
@ -95,10 +96,8 @@
allow-loopback-pinentry
'';
};
programs = {
nix-index = {
enableBashIntegration = false;
enableFishIntegration = true;
};
programs.nix-index = {
enableBashIntegration = false;
enableFishIntegration = true;
};
}

View file

@ -1,4 +1,4 @@
{pkgs, host, ...}: {
{pkgs, ...}: {
programs.fish = {
enable = true;
interactiveShellInit = ''
@ -6,17 +6,21 @@
set show_startup_tips false
'';
shellInit = "
fish_add_path /usr/local/go/bin
fish_add_path ~/go/bin
fish_add_path ~/.local/bin
set -gx MANPAGER 'nvim +Man!'
set -gx EDITOR 'nvim'
set -gx _JAVA_AWT_WM_NONREPARENTING 1
set -gx NIX_FLAKE '/home/e/dev/nix'
set -gx NH_FLAKE '/home/e/dev/nix'
";
plugins = [
{name = "fzf"; inherit (pkgs.fishPlugins.fzf-fish) src;}
{name = "puffer"; inherit (pkgs.fishPlugins.puffer) src;}
{
name = "fzf";
inherit (pkgs.fishPlugins.fzf-fish) src;
}
{
name = "puffer";
inherit (pkgs.fishPlugins.puffer) src;
}
];
functions = import ./functions.nix;
shellAbbrs = {
@ -25,14 +29,11 @@
};
shellAliases = {
":q" = "exit";
hms = "home-manager switch --flake $NIX_FLAKE#${host.username}";
rbs = "sudo nixos-rebuild switch --flake $NIX_FLAKE#${host.hostName}";
mpv = "mpv --no-keepaspect-window";
cat = "bat -pp";
tcd = "cd $(mktemp -d)";
docker = "nerdctl";
vimdiff = "nvim -d";
ls = "eza";
};
};
}

View file

@ -16,19 +16,29 @@
end
'';
};
nix-prefetch-hash = {
body = ''
nix-hash --type sha256 --to-base64 (nix-prefetch-url $argv)
'';
};
fish_jj_prompt = {
body = ''
if not command -sq jj
return 1
end
if not command -sq timeout
return 1
end
if set -q FISH_JJ
return 0
end
if not jj root &>/dev/null
return 1
end
# Generate prompt
set -l info "$(
jj log --ignore-working-copy --no-graph --color=always --revisions=@ --template "
timeout 5 jj log --ignore-working-copy --no-graph --color=always --revisions=@ --template "
separate(
' ',
self.change_id().shortest(),

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.git = {
enable = true;
userEmail = "cjriddz@protonmail.com";
@ -26,6 +27,9 @@
settings = {
core = {
fsmonitor = "watchman";
watchman = {
register-snapshot-trigger = false;
};
};
user = {
email = "cjriddz@protonmail.com";
@ -35,7 +39,7 @@
username = "iofq";
};
signing = {
behavior = "own";
behavior = "drop";
backend = "gpg";
key = "cjriddz@protonmail.com";
};
@ -43,48 +47,63 @@
sign-on-push = true;
};
ui = {
default-command = ["log"];
default-command = [ "log" ];
conflict-marker-style = "git";
merge-editor = "vimdiff";
diff-editor = "diffview";
diff.format = "git";
diff-formatter = ":git";
paginate = "never";
movement = {
edit = true;
};
};
merge-tools.vimdiff = {
program = "nvim";
program = "nvim";
};
merge-tools.diffview = {
program = "sh";
edit-args = [
"-c"
''
set -eu
rm -f "$right/JJ-INSTRUCTIONS"
git -C "$left" init -q
git -C "$left" add -A
git -C "$left" commit -q -m baseline --allow-empty
mv "$left/.git" "$right"
git -C "$right" add --intent-to-add -A
(cd "$right"; nvim -c "lua vim.g.snacks_indent=false" -c "lua require('lazy').load({plugins = {'diffview.nvim'}})" -c DiffviewOpen)
git -C "$right" diff-index --quiet --cached HEAD && { echo "No changes done, aborting split."; exit 1; }
git -C "$right" commit -q -m split
git -C "$right" restore . # undo changes in modified files
git -C "$right" reset . # undo --intent-to-add
git -C "$right" clean -q -df # remove untracked files
''
];
program = "sh";
edit-args = [
"-c"
''
set -eu
rm -f "$right/JJ-INSTRUCTIONS"
git -C "$left" init -q
git -C "$left" add -A
git -C "$left" commit -q -m baseline --allow-empty
mv "$left/.git" "$right"
git -C "$right" add --intent-to-add -A
(cd "$right"; nvim -c "lua vim.g.snacks_indent=false" -c "lua require('lazy').load({plugins = {'diffview.nvim'}})" -c DiffviewOpen)
git -C "$right" diff-index --quiet --cached HEAD && { echo "No changes done, aborting split."; exit 1; }
git -C "$right" commit -q -m split
git -C "$right" restore . # undo changes in modified files
git -C "$right" reset . # undo --intent-to-add
git -C "$right" clean -q -df # remove untracked files
''
];
};
snapshot = {
max-new-file-size = "10MiB";
};
revsets = {
log = "ancestors(reachable(@,trunk()..),2) | trunk()";
anc = "ancestors(@,10) | trunk()";
};
aliases = {
tug = ["bookmark" "move" "--from" "heads(::@- & bookmarks())" "--to" "@"];
tug = [
"bookmark"
"move"
"--from"
"heads(::@- & bookmarks())"
"--to"
"@"
];
};
fix = {
tools = {
treefmt = {
command = [ "treefmt" ];
patterns = [ "glob:**/*.nix" ];
};
};
};
};
};

View file

@ -26,7 +26,8 @@
default_mode "locked"
keybinds {
tmux {
bind "Ctrl a" { Write 2; SwitchToMode "Locked"; }
bind "Ctrl a" { SwitchToMode "Locked"; }
bind "Ctrl b" { Write 1; }
bind "[" { SwitchToMode "Scroll"; }
bind "\"" { NewPane "Down"; SwitchToMode "Locked"; }
bind "%" { NewPane "Right"; SwitchToMode "Locked"; }
@ -60,6 +61,9 @@
bind "8" { GoToTab 8; SwitchToMode "Locked"; }
bind "9" { GoToTab 9; SwitchToMode "Locked"; }
}
locked {
unbind "Ctrl g"
}
shared_except "tmux" {
bind "Ctrl a" {
SwitchToMode "Tmux"

View file

@ -7,66 +7,76 @@
./alacritty
./hyprland
];
home.packages = with pkgs; [
pulseaudio
pulsemixer
alsa-utils
wlogout
wf-recorder
wdisplays
wl-clipboard
gammastep
sway-contrib.grimshot
xdg-utils
];
home.sessionVariables = {
MOZ_DBUS_REMOTE = 1;
home = {
packages = with pkgs; [
pulseaudio
pulsemixer
alsa-utils
wlogout
wf-recorder
wdisplays
wl-clipboard
gammastep
sway-contrib.grimshot
xdg-utils
];
sessionVariables = {
MOZ_DBUS_REMOTE = 1;
};
file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/DMZ-Black";
};
programs.wofi = {
enable = true;
style = ''
window, #input, #entry, #scroll, #text, #inner-box {
background-color: #152528;
color: #e6eaea;
}
#entry:selected, #text:selected {
background-color: #a1cdd8;
color: #152528;
}
'';
};
services.gammastep = {
enable = true;
dawnTime = "6:00-8:00";
duskTime = "20:00-22:00";
latitude = 43.0;
longitude = -89.0;
temperature.day = 6000;
temperature.night = 3500;
};
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
color = "#152528";
daemonize = true;
clock = true;
ignore-empty-password = true;
services = {
gammastep = {
enable = true;
dawnTime = "6:00-8:00";
duskTime = "20:00-22:00";
latitude = 43.0;
longitude = -89.0;
temperature.day = 6000;
temperature.night = 3500;
};
swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];
};
mako.enable = true;
mako.settings = {
default-timeout = 5;
};
};
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];
programs = {
wofi = {
enable = true;
style = ''
window, #input, #entry, #scroll, #text, #inner-box {
background-color: #152528;
color: #e6eaea;
}
#entry:selected, #text:selected {
background-color: #a1cdd8;
color: #152528;
}
'';
};
swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
color = "#152528";
daemonize = true;
clock = true;
ignore-empty-password = true;
};
};
};
xdg = {
configFile."mimeapps.list".force = true;
@ -92,6 +102,4 @@
};
};
};
services.mako.enable = true;
home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/DMZ-Black";
}

View file

@ -91,7 +91,7 @@
",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
## Movement
"$mod, p, layoutmsg, swapwithmaster"
"$mod, m, layoutmsg, swapwithmaster"
"$mod, e, layoutmsg, orientationnext"
"$mod, i, layoutmsg, addmaster"
"$mod, d, layoutmsg, removemaster"
@ -100,6 +100,7 @@
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, n, changegroupactive, f"
"$mod, p, changegroupactive, b"
"$mod SHIFT, h, movewindoworgroup, l"
"$mod SHIFT, l, movewindoworgroup, r"
"$mod SHIFT, k, movewindoworgroup, u"