misc: formatting + updates that weren't commited properly before
This commit is contained in:
@@ -4,17 +4,7 @@
|
||||
programs.gitui.enable = true;
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
||||
# TODO: https://www.imagile.fr/utiliser-automatiquement-plusieurs-identites-sur-git/
|
||||
userEmail = "pierre@front-commerce.com";
|
||||
userName = "Pierre Martin";
|
||||
|
||||
aliases = {
|
||||
co = "checkout";
|
||||
pushf = "push --force-with-lease --force-if-includes";
|
||||
aimr = "log --pretty=format:'%s%n%b---'";
|
||||
};
|
||||
package = pkgs.gitFull;
|
||||
|
||||
ignores = [
|
||||
".DS_Store"
|
||||
@@ -28,11 +18,29 @@
|
||||
"shell.nix"
|
||||
".envrc"
|
||||
".direnv"
|
||||
".ddev"
|
||||
".claude"
|
||||
"CLAUDE.local.md"
|
||||
];
|
||||
|
||||
# see https://github.com/dandavison/delta#get-started
|
||||
delta.enable = true;
|
||||
extraConfig = {
|
||||
#delta.enable = true;
|
||||
# TEMPORARY DEACTIVATED due to the error
|
||||
# error[E0282]: type annotations needed for `Box<_>`
|
||||
# --> /build/delta-0.17.0-vendor.tar.gz/time/src/format_description/parse/mod.rs:83:9
|
||||
|
||||
settings = {
|
||||
alias = {
|
||||
co = "checkout";
|
||||
pushf = "push --force-with-lease --force-if-includes";
|
||||
aimr = "log --pretty=format:'%s%n%b---'";
|
||||
};
|
||||
|
||||
user = {
|
||||
email = "pierre@front-commerce.com";
|
||||
name = "Pierre Martin";
|
||||
};
|
||||
|
||||
merge.conflictstyle = "diff3";
|
||||
diff.colorMoved = "default";
|
||||
|
||||
|
||||
202
programs/i3.nix
202
programs/i3.nix
@@ -3,96 +3,118 @@
|
||||
{
|
||||
home.file.".i3status.conf".source = ../files/.i3status.conf;
|
||||
|
||||
xsession.windowManager.i3 =
|
||||
let
|
||||
modifier = "Mod4";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
config = {
|
||||
assigns = {
|
||||
# https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.assigns
|
||||
};
|
||||
focus = {
|
||||
mouseWarping = false; # Whether mouse cursor should be warped to the center of the window when switching focus to a window on a different output.
|
||||
};
|
||||
|
||||
modifier = modifier;
|
||||
|
||||
# see https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.keybindings
|
||||
keybindings = pkgs.lib.mkOptionDefault {
|
||||
"${modifier}+Return" = "exec sakura"; #i3-sensible-terminal
|
||||
|
||||
### BÉPO ###
|
||||
"${modifier}+b" = "kill";
|
||||
"${modifier}+d" = "exec rofi -combi-modi 'window#run#ssh#emoji#calc' -modi 'calc#combi' -show combi";
|
||||
"${modifier}+e" = "fullscreen toggle";
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
"${modifier}+u" = "layout stacking";
|
||||
"${modifier}+eacute" = "layout tabbed";
|
||||
"${modifier}+p" = "layout toggle split";
|
||||
"${modifier}+Shift+t" = "i3lock --colour=000000";
|
||||
# switch to workspace
|
||||
"${modifier}+quotedbl" = "workspace 1";
|
||||
"${modifier}+guillemotleft" = "workspace 2";
|
||||
"${modifier}+guillemotright" = "workspace 3";
|
||||
"${modifier}+parenleft" = "workspace 4";
|
||||
"${modifier}+parenright" = "workspace 5";
|
||||
"${modifier}+at" = "workspace 6";
|
||||
"${modifier}+plus" = "workspace 7";
|
||||
"${modifier}+minus" = "workspace 8";
|
||||
"${modifier}+slash" = "workspace 9";
|
||||
"${modifier}+asterisk" = "workspace 10";
|
||||
# move workspaces between outputs
|
||||
"${modifier}+Control+Left" = "move workspace to output left";
|
||||
"${modifier}+Control+Right" = "move workspace to output right";
|
||||
"${modifier}+Control+Up" = "move workspace to output up";
|
||||
"${modifier}+Control+Down" = "move workspace to output down";
|
||||
# move focused container to workspace
|
||||
"${modifier}+Shift+quotedbl" = "move container to workspace 1";
|
||||
"${modifier}+Shift+guillemotleft" = "move container to workspace 2";
|
||||
"${modifier}+Shift+guillemotright" = "move container to workspace 3";
|
||||
"${modifier}+Shift+4" = "move container to workspace 4";
|
||||
"${modifier}+Shift+5" = "move container to workspace 5";
|
||||
"${modifier}+Shift+at" = "move container to workspace 6";
|
||||
"${modifier}+Shift+plus" = "move container to workspace 7";
|
||||
"${modifier}+Shift+minus" = "move container to workspace 8";
|
||||
"${modifier}+Shift+slash" = "move container to workspace 9";
|
||||
"${modifier}+Shift+asterisk" = "move container to workspace 10";
|
||||
### /BÉPO ###
|
||||
|
||||
# See https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html
|
||||
# Pulse Audio controls
|
||||
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume 0 +5%"; #increase sound volume
|
||||
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume 0 -5%"; #decrease sound volume
|
||||
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute 0 toggle"; # mute sound
|
||||
|
||||
# Media player controls
|
||||
"XF86AudioPlay" = "exec playerctl play";
|
||||
"XF86AudioPause" = "exec playerctl pause";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
|
||||
# Sreen brightness controls
|
||||
"XF86MonBrightnessUp" = "exec light -A 2"; # increase screen brightness
|
||||
"XF86MonBrightnessDown" = "exec light -U 2"; # decrease screen brightness
|
||||
|
||||
# Speech-to-text (toggle: press to start/stop)
|
||||
"${modifier}+space" = "exec ~/.local/bin/stt-dictate toggle";
|
||||
};
|
||||
|
||||
startup = [
|
||||
{ command = "nextcloud"; notification = false; }
|
||||
{ command = "setxkbmap -layout fr -variant bepo"; notification = false; }
|
||||
{ command = "copyq"; notification = false; }
|
||||
{ command = "numlockx on"; notification = false; } # turn verr num on
|
||||
|
||||
{ command = "autorandr -c"; notification = false; }
|
||||
{ command = "feh --bg-scale /home/pierre/Documents/Graphisme/fc-bg-light-black.png"; notification = false; }
|
||||
|
||||
# docker run -d --net traefik --ip 172.10.0.10 --restart always -v /var/run/docker.sock:/var/run/docker.sock:ro --name traefik -p 80:80 -p 8080:8080 traefik:2.4.9 --api.insecure=true --providers.docker
|
||||
# { command = "docker start traefik"; notification = false; }
|
||||
];
|
||||
xsession.windowManager.i3 = let modifier = "Mod4";
|
||||
in {
|
||||
enable = true;
|
||||
config = {
|
||||
assigns = {
|
||||
# https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.assigns
|
||||
};
|
||||
focus = {
|
||||
mouseWarping =
|
||||
false; # Whether mouse cursor should be warped to the center of the window when switching focus to a window on a different output.
|
||||
};
|
||||
|
||||
modifier = modifier;
|
||||
|
||||
# see https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.keybindings
|
||||
keybindings = pkgs.lib.mkOptionDefault {
|
||||
"${modifier}+Return" = "exec sakura"; # i3-sensible-terminal
|
||||
|
||||
### BÉPO ###
|
||||
"${modifier}+b" = "kill";
|
||||
"${modifier}+d" =
|
||||
"exec rofi -combi-modi 'window#run#ssh#emoji#calc' -modi 'calc#combi' -show combi";
|
||||
"${modifier}+e" = "fullscreen toggle";
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
"${modifier}+u" = "layout stacking";
|
||||
"${modifier}+eacute" = "layout tabbed";
|
||||
"${modifier}+p" = "layout toggle split";
|
||||
"${modifier}+Shift+t" = "i3lock --colour=000000";
|
||||
# switch to workspace
|
||||
"${modifier}+quotedbl" = "workspace 1";
|
||||
"${modifier}+guillemotleft" = "workspace 2";
|
||||
"${modifier}+guillemotright" = "workspace 3";
|
||||
"${modifier}+parenleft" = "workspace 4";
|
||||
"${modifier}+parenright" = "workspace 5";
|
||||
"${modifier}+at" = "workspace 6";
|
||||
"${modifier}+plus" = "workspace 7";
|
||||
"${modifier}+minus" = "workspace 8";
|
||||
"${modifier}+slash" = "workspace 9";
|
||||
"${modifier}+asterisk" = "workspace 10";
|
||||
# move workspaces between outputs
|
||||
"${modifier}+Control+Left" = "move workspace to output left";
|
||||
"${modifier}+Control+Right" = "move workspace to output right";
|
||||
"${modifier}+Control+Up" = "move workspace to output up";
|
||||
"${modifier}+Control+Down" = "move workspace to output down";
|
||||
# move focused container to workspace
|
||||
"${modifier}+Shift+quotedbl" = "move container to workspace 1";
|
||||
"${modifier}+Shift+guillemotleft" = "move container to workspace 2";
|
||||
"${modifier}+Shift+guillemotright" = "move container to workspace 3";
|
||||
"${modifier}+Shift+4" = "move container to workspace 4";
|
||||
"${modifier}+Shift+5" = "move container to workspace 5";
|
||||
"${modifier}+Shift+at" = "move container to workspace 6";
|
||||
"${modifier}+Shift+plus" = "move container to workspace 7";
|
||||
"${modifier}+Shift+minus" = "move container to workspace 8";
|
||||
"${modifier}+Shift+slash" = "move container to workspace 9";
|
||||
"${modifier}+Shift+asterisk" = "move container to workspace 10";
|
||||
### /BÉPO ###
|
||||
|
||||
# See https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html
|
||||
# Pulse Audio controls
|
||||
"XF86AudioRaiseVolume" =
|
||||
"exec --no-startup-id pactl set-sink-volume 0 +5%"; # increase sound volume
|
||||
"XF86AudioLowerVolume" =
|
||||
"exec --no-startup-id pactl set-sink-volume 0 -5%"; # decrease sound volume
|
||||
"XF86AudioMute" =
|
||||
"exec --no-startup-id pactl set-sink-mute 0 toggle"; # mute sound
|
||||
|
||||
# Media player controls
|
||||
"XF86AudioPlay" = "exec playerctl play";
|
||||
"XF86AudioPause" = "exec playerctl pause";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
|
||||
# Sreen brightness controls
|
||||
"XF86MonBrightnessUp" = "exec light -A 2"; # increase screen brightness
|
||||
"XF86MonBrightnessDown" =
|
||||
"exec light -U 2"; # decrease screen brightness
|
||||
|
||||
# Speech-to-text (toggle: press to start/stop)
|
||||
"${modifier}+space" = "exec ~/.local/bin/stt-dictate toggle";
|
||||
};
|
||||
|
||||
startup = [
|
||||
{
|
||||
command = "nextcloud";
|
||||
notification = false;
|
||||
}
|
||||
{
|
||||
command = "setxkbmap -layout fr -variant bepo";
|
||||
notification = false;
|
||||
}
|
||||
{
|
||||
command = "copyq";
|
||||
notification = false;
|
||||
}
|
||||
{
|
||||
command = "numlockx on";
|
||||
notification = false;
|
||||
} # turn verr num on
|
||||
|
||||
{
|
||||
command = "autorandr -c";
|
||||
notification = false;
|
||||
}
|
||||
{
|
||||
command =
|
||||
"feh --bg-scale /home/pierre/Documents/Graphisme/fc-bg-light-black.png";
|
||||
notification = false;
|
||||
}
|
||||
|
||||
# docker run -d --net traefik --ip 172.10.0.10 --restart always -v /var/run/docker.sock:/var/run/docker.sock:ro --name traefik -p 80:80 -p 8080:8080 traefik:2.4.9 --api.insecure=true --providers.docker
|
||||
# { command = "docker start traefik"; notification = false; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# see https://starship.rs/fr-fr/installing/#declaration-utilisateur-unique-via-home-manager
|
||||
programs.starship =
|
||||
{
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion = {
|
||||
enable = true;
|
||||
};
|
||||
autosuggestion = { enable = true; };
|
||||
enableCompletion = true;
|
||||
history = {
|
||||
ignoreDups = true;
|
||||
@@ -37,9 +36,9 @@
|
||||
|
||||
# `$` must be escaped with `''` :metal:
|
||||
# source: https://nixos.org/nix-dev/2015-December/019018.html
|
||||
initExtra = ''
|
||||
initContent = ''
|
||||
bindkey ' ' forward-word
|
||||
zstyle ':completion:*:hosts' hosts ''${=''${''${''${''${(@M)''${(f)"''$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
zstyle ':completion:*:hosts' hosts ''${=''${''${''${''${(@M)''${(f)"$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
setopt PROMPT_CR
|
||||
setopt PROMPT_SP
|
||||
|
||||
@@ -77,6 +76,9 @@
|
||||
source <(k3d completion zsh)
|
||||
source <(kubectl completion zsh)
|
||||
source <(k9s completion zsh); compdef _k9s k9s
|
||||
|
||||
# https://github.com/Schniz/fnm#shell-setup
|
||||
eval "$(fnm env --use-on-cd --shell zsh)"
|
||||
'';
|
||||
|
||||
sessionVariables = {
|
||||
@@ -88,6 +90,7 @@
|
||||
# see https://github.com/NixOS/nixpkgs/pull/56387 and https://discourse.nixos.org/t/cypress-with-npm/15137/4
|
||||
CYPRESS_INSTALL_BINARY = 0;
|
||||
CYPRESS_RUN_BINARY = "$HOME/.nix-profile/bin/Cypress";
|
||||
LD_LIBRARY_PATH = "${pkgs.libgcc}/lib";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
|
||||
Reference in New Issue
Block a user