stuff
Some checks failed
CI / nix_flake_check (push) Waiting to run
CI / formatting (push) Has been cancelled

This commit is contained in:
Narrator 2025-12-05 11:02:03 +01:00
parent 22a055c5de
commit 2fca95aa89
5 changed files with 228 additions and 4 deletions

View file

@ -47,7 +47,10 @@ boot.loader.grub.gfxpayloadBios = "keep";
# Set your time zone.
time.timeZone = "Europe/Rome";
virtualisation.docker.enable = true;
# optional but sane:
virtualisation.docker.enableOnBoot = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
@ -108,7 +111,7 @@ boot.loader.grub.gfxpayloadBios = "keep";
programs.fish.enable = true;
users.users.narrator = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
extraGroups = [ "wheel" "docker" ]; # Enable sudo for the user.
shell = pkgs.fish;
packages = with pkgs; [
tree
@ -223,6 +226,7 @@ boot.loader.grub.gfxpayloadBios = "keep";
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
# SSH config:
};
}

View file

@ -6,16 +6,27 @@
./i3.nix
./i3blocks.nix
./modules/neovim.nix
./modules/fish.nix
./modules/tmux.nix
];
home.username = "narrator";
home.homeDirectory = "/home/narrator";
home.stateVersion = "25.05";
programs.home-manager.enable = true;
programs.ssh = {
enable = true;
matchBlocks = {
"git.unime.it" = {
hostname = "git.unime.it";
port = 42000; # e.g. 2222
};
};
};
home.packages = with pkgs; [
nix-prefetch-github
gemini-cli
picard
chromaprint

View file

@ -25,7 +25,7 @@
keybindings = {
"Mod1+Return" = "exec alacritty";
"Mod1+q" = "kill";
"Mod1+p" = "exec feh --bg-fill -r -z ~/Pictures/winrip";
"Mod1+p" = "exec feh --bg-fill -r -z ~/Pictures/gruvbox-dark-rainbow.png";
"Mod1+d" = "exec rofi -show drun";
# Volume control
@ -125,7 +125,7 @@
{ command = "xinput --set-prop '$(xinput list --name-only | grep -i touchpad)' 'libinput Natural Scrolling Enabled' 1"; always = true; }
{ command = "setxkbmap -option grp:alt_caps_toggle -layout us,ir"; }
{ command = "feh --bg-fill -r -z ~/Pictures/Wallpapers/wall.png"; always = true; }
{ command = "feh --bg-fill -r -z ~/Pictures/gruvbox-dark-rainbow.png"; always = true; }
{
command = "exec i3-msg workspace 1";
}

118
hosts/nxs/modules/fish.nix Normal file
View file

@ -0,0 +1,118 @@
{ pkgs, ... }: {
home.packages = [
pkgs.zoxide
# fzf for zi magic
pkgs.fzf
];
programs.fish = {
enable = true;
shellInit = ''
if test -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
end
'';
interactiveShellInit = ''
set fish_greeting
direnv hook fish | source
zoxide init fish | source
'';
shellAbbrs = {
# basics
ls = "lsd --long";
ll = "lsd -l";
la = "lsd -la";
tree = "${pkgs.tree}/bin/tree -C";
# docker/buildx
d = "docker";
di = "docker images";
dps = "docker ps -a";
dl = "docker logs -f";
dr = "docker run -it --rm";
db = "docker buildx build";
dbp = "docker buildx build --push";
dpr = "docker prune -af";
# zoxide
z = "zoxide query"; # fuzzy cd
zi = "zoxide interactive"; # menu cd
za = "zoxide add"; # mark dir
zrm = "zoxide remove"; # forget dir
# make
m = "make";
mc = "make clean";
mi = "make install";
# k8s poweruser
k = "kubectl";
kx = "kubectx";
kns = "kubens";
kgp = "kubectl get pods -o wide";
kgs = "kubectl get svc";
kgn = "kubectl get nodes -o wide";
kdelp = "kubectl delete pod";
kpf = "kubectl port-forward";
kep = "kubectl exec -it (kubectl get po -o jsonpath='{range .items[*]}{.metadata.name}{\"\t\"}{.status.phase}{\"\n\"}{end}' | fzf | cut -f1) --";
# git porcelain
g = "git";
ga = "git add";
gc = "git commit -v";
gca = "git commit -v -a";
gp = "git push";
gl = "git pull";
gst = "git status -sb";
glog = "git log --oneline --graph --decorate -10";
gb = "git branch";
gco = "git checkout";
grb = "git rebase -i";
gsta = "git stash push -m";
gdiff = "git diff --cached";
};
plugins = [
{
name = "fish-logo";
src = pkgs.fetchFromGitHub {
owner= "laughedelic";
repo= "fish_logo";
rev= "dc6a40836de8c24c62ad7c4365aa9f21292c3e6e";
sha256= "sha256-DZXQt0fa5LdbJ4vPZFyJf5FWB46Dbk58adpHqbiUmyY=";
};
}
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
{
name = "fzf.fish";
src = pkgs.fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "8920367cf85eee5218cc25a11e209d46e2591e7a";
sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
};
}
{
name = "gitnow";
src = pkgs.fetchFromGitHub {
owner = "joseluisq";
repo = "gitnow";
rev = "818996a5a1de5af697d909a44fb27ac1c8856aad";
hash = "sha256-3pLOeeY1Wo9GJVhA2YxSTlVR0wWG9hHpr3BcHHfPrnA=";
};
}
{
name = "pure";
src = pkgs.fetchFromGitHub {
owner = "pure-fish";
repo = "pure";
rev = "f435b584884ebb7c9c75de8967202e3d3299b73a";
hash = "sha256-LtiaIlMJ1ZyzNvBzi5uPztoBV6G57Q6z6HUFcOBi9cg=";
};
}
];
functions.fish_greeting.body = ''
fish_logo
'';
};
}

View file

@ -0,0 +1,91 @@
{ config, pkgs, ... }:
{
programs.zellij = {
enable = true;
# if you want shell completions:
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = false; # or true if you use it
settings = {
keybinds.normal = {
bind = [
{
key = "Ctrl+a";
action = {
SwitchToMode = "command";
};
}
{
key = "|";
action = {
NewPane = "Right";
};
}
{
key = "_";
action = {
NewPane = "Down";
};
}
{
key = "Ctrl+h";
action = {
GoToTab = "Prev";
};
}
{
key = "Ctrl+l";
action = {
GoToTab = "Next";
};
}
{
key = "z";
action = {
ToggleFocusFullscreen = null;
};
}
{
key = "m";
action = {
SetOption = {
name = "mouse_mode";
value = "true";
};
};
}
{
key = "M";
action = {
SetOption = {
name = "mouse_mode";
value = "false";
};
};
}
];
};
disable_ui = true;
mouse_mode = true;
pane_frames = false;
simplified_ui = true;
default_layout = "compact";
copy_clipboard = "primary";
scrollback_editor = "vi";
plugin = {
search = true;
session_manager = true;
strider = true;
filepicker = true;
};
};
};
}