misc: formatting + updates that weren't commited properly before

This commit is contained in:
Pierre Martin
2025-11-27 17:16:07 +01:00
parent 2dc7c688ed
commit 1da4bf6163
12 changed files with 400 additions and 295 deletions

7
.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
# Secrets
files/.aider.conf.yml
*.conf
# Nix
.direnv/
result

27
Makefile Normal file
View File

@@ -0,0 +1,27 @@
.PHONY: all fmt fmt-nix fmt-shell lint lint-shell check clean
all: fmt lint
# Formatage
fmt: fmt-nix fmt-shell
fmt-nix:
find . -name '*.nix' -not -path './.direnv/*' | xargs nixfmt
fmt-shell:
find . -name '*.sh' -not -path './.direnv/*' | xargs shfmt -w -i 2
# Validation
lint: lint-shell
lint-shell:
find . -name '*.sh' -not -path './.direnv/*' | xargs shellcheck
# Vérification sans modification
check:
find . -name '*.nix' -not -path './.direnv/*' | xargs nixfmt --check
find . -name '*.sh' -not -path './.direnv/*' | xargs shfmt -d -i 2
# Nettoyage
clean:
rm -rf .direnv result

9
files/curl-timings.txt Normal file
View File

@@ -0,0 +1,9 @@
time_namelookup: %{time_namelookup}s\n
time_connect: %{time_connect}s\n
time_appconnect: %{time_appconnect}s\n
time_pretransfer: %{time_pretransfer}s\n
time_redirect: %{time_redirect}s\n
time_starttransfer: %{time_starttransfer}s\n
----------\n
time_total: %{time_total}s\n
Legend: https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2EfInkqn7sNtWkWFdxPDk4/2f3e1c0202ed6025bbe12f6f540c1b4a/Screen-Shot-2018-10-16-at-14.51.29-1.png

View File

@@ -76,10 +76,10 @@ stop_and_transcribe() {
-l fr \ -l fr \
-nt \ -nt \
-np \ -np \
"$AUDIO_FILE" 2>&1 \ "$AUDIO_FILE" 2>&1 |
| grep -v "^load_backend:" \ grep -v "^load_backend:" |
| tr -d '\n' \ tr -d '\n' |
| sed 's/^[[:space:]]*//;s/[[:space:]]*$//') sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
rm -f "$AUDIO_FILE" rm -f "$AUDIO_FILE"

View File

@@ -8,13 +8,13 @@
home.file.".config/traefik/traefik.toml".source = ./files/traefik.toml; home.file.".config/traefik/traefik.toml".source = ./files/traefik.toml;
home.file.".npmrc".source = ./files/.npmrc; home.file.".npmrc".source = ./files/.npmrc;
home.file.".aider.conf.yml".source = ./files/.aider.conf.yml;
home.file.".local/bin/stt-dictate" = { home.file.".local/bin/stt-dictate" = {
source = ./files/stt-dictate.sh; source = ./files/stt-dictate.sh;
executable = true; executable = true;
}; };
imports = imports = [
[
./packages.nix ./packages.nix
./programs/git.nix ./programs/git.nix
@@ -27,7 +27,7 @@
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscode.fhs; package = pkgs.vscode.fhs;
extensions = [ ]; profiles = { default = { extensions = [ ]; }; };
}; };
programs.rofi = { programs.rofi = {
enable = true; enable = true;
@@ -37,23 +37,35 @@
programs.autorandr = { programs.autorandr = {
enable = true; enable = true;
hooks = { hooks = {
postswitch = { postswitch = { "notify-i3" = "${pkgs.i3}/bin/i3-msg restart"; };
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
};
}; };
}; };
# https://github.com/nix-community/nix-direnv/ # https://github.com/nix-community/nix-direnv/
programs.direnv = programs.direnv = {
{
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [ obs-backgroundremoval ];
};
services.unclutter.enable = true; services.unclutter.enable = true;
services.blueman-applet.enable = true; services.blueman-applet.enable = true;
services.dunst.enable = true; # notification daemon services.dunst.enable = true; # notification daemon
services.udiskie.enable = true; # require "services.udisks2.enable = true" in system configuration services.udiskie.enable =
true; # require "services.udisks2.enable = true" in system configuration
# Workaround for Failed to restart syncthingtray.service: Unit tray.target not found.
# - https://github.com/nix-community/home-manager/issues/2064
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
} }

View File

@@ -5,8 +5,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./framework.nix ./framework.nix
@@ -30,25 +29,24 @@
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.extraHosts = " networking.extraHosts = "";
";
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.utf8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
LC_ADDRESS = "fr_FR.utf8"; LC_ADDRESS = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.utf8"; LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.utf8"; LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.utf8"; LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.utf8"; LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.utf8"; LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.utf8"; LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.utf8"; LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.utf8"; LC_TIME = "fr_FR.UTF-8";
}; };
# Configure keymap in X11 # Configure keymap in X11
@@ -59,15 +57,9 @@
variant = "bepo"; variant = "bepo";
}; };
windowManager = { windowManager = { i3 = { enable = true; }; };
i3 = {
enable = true;
};
};
};
services.displayManager = {
defaultSession = "none+i3";
}; };
services.displayManager = { defaultSession = "none+i3"; };
# Configure console keymap # Configure console keymap
console.keyMap = "fr"; console.keyMap = "fr";
@@ -89,7 +81,7 @@
# Basics # Basics
docker docker
gitAndTools.gitFull gitFull
vim vim
# Sound # Sound
@@ -108,25 +100,36 @@
# enable = true; # enable = true;
# enableSSHSupport = true; # enableSSHSupport = true;
# }; # };
programs.zsh.enable = true; # see https://github.com/NixOS/nixpkgs/issues/20548#issuecomment-261965667 programs.zsh.enable =
true; # see https://github.com/NixOS/nixpkgs/issues/20548#issuecomment-261965667
programs.light.enable = true; programs.light.enable = true;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [ fnm stdenv.cc.cc.lib ];
};
# List services that you want to enable: # List services that you want to enable:
services.nscd.enable = true; services.nscd.enable = true;
services.tlp.enable = true; services.tlp.enable = true;
services.upower.enable = true; # keyboard backlight services.upower.enable = true; # keyboard backlight
services.gnome.at-spi2-core.enable = true; # see https://github.com/NixOS/nixpkgs/pull/49636/files services.gnome.at-spi2-core.enable =
services.gnome.gnome-keyring.enable = true; # see https://nixos.wiki/wiki/Visual_Studio_Code#Error_after_Sign_On true; # see https://github.com/NixOS/nixpkgs/pull/49636/files
services.gnome.gnome-keyring.enable =
true; # see https://nixos.wiki/wiki/Visual_Studio_Code#Error_after_Sign_On
services.blueman.enable = true; services.blueman.enable = true;
services.udisks2.enable = true; services.udisks2.enable = true;
services.resolved.enable = true; services.resolved.enable = true;
services.gvfs.enable =
true; # to view MTP devices in file manager - https://www.perplexity.ai/search/how-to-browse-files-from-bus-0-QWBoYG1gRLu3uMRqFSzw9A
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # Ports: 9003 - Xdebug
# networking.firewall.allowedUDPPorts = [ ... ]; networking.firewall.allowedTCPPorts = [ 9003 ];
networking.firewall.allowedUDPPorts = [ 9003 ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;
# https://github.com/nix-community/nix-direnv/ # https://github.com/nix-community/nix-direnv/
@@ -134,6 +137,7 @@
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true
''; '';
nix.settings.extra-experimental-features = [ "nix-command" "flakes" ];
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions

View File

@@ -1,4 +1,3 @@
#
# NixOS Configuration for Framework Laptop # NixOS Configuration for Framework Laptop
# Source: https://gist.github.com/digitalknk/ee0379c1cd4597463c31a323ea5882a5 # Source: https://gist.github.com/digitalknk/ee0379c1cd4597463c31a323ea5882a5
# Alt: https://github.com/NixOS/nixos-hardware/blob/master/framework/default.nix # Alt: https://github.com/NixOS/nixos-hardware/blob/master/framework/default.nix
@@ -17,8 +16,7 @@
"layout=bls" # Read $KERNEL_INSTALL_LAYOUT from /etc/machine-info. Please move it to the layout= setting of /etc/kernel/install.conf. "layout=bls" # Read $KERNEL_INSTALL_LAYOUT from /etc/machine-info. Please move it to the layout= setting of /etc/kernel/install.conf.
]; ];
# Use latest kernel version because on 5.15 screen is not detected properly (and external monitor doesn't work either) boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_6_1; # see https://github.com/NixOS/nixpkgs/issues/183955#issuecomment-1210468614
# prevent "/boot/efi No space left on device" errors - see https://github.com/NixOS/nixpkgs/issues/23926 # prevent "/boot/efi No space left on device" errors - see https://github.com/NixOS/nixpkgs/issues/23926
boot.loader.grub.configurationLimit = 10; boot.loader.grub.configurationLimit = 10;
@@ -47,12 +45,11 @@
# Display things like a boss # Display things like a boss
## Make it work ## Make it work
hardware.opengl.enable = true; hardware.graphics.enable = true;
hardware.opengl.extraPackages = with pkgs; [ hardware.graphics.extraPackages = with pkgs; [
mesa.drivers # was mesa_drivers before 27th september 2022 mesa
vaapiIntel intel-vaapi-driver # used to be vaapiIntel
vaapiVdpau libva-vdpau-driver # used to be vaapiVdpau
libvdpau-va-gl
intel-media-driver intel-media-driver
]; ];
## Make it nice (https://nixos.wiki/wiki/Xorg && https://wiki.archlinux.org/title/Framework_Laptop#HiDPI_settings) ## Make it nice (https://nixos.wiki/wiki/Xorg && https://wiki.archlinux.org/title/Framework_Laptop#HiDPI_settings)
@@ -64,9 +61,9 @@
services.xserver.dpi = 130; services.xserver.dpi = 130;
environment.variables = { environment.variables = {
GDK_SCALE = "1.5"; GDK_SCALE = "1.3";
GDK_DPI_SCALE = "0.77"; # 1/1.3 GDK_DPI_SCALE = "0.77"; # 1/1.3
_JAVA_OPTIONS = "-Dsun.java2d.uiScale=1.5"; _JAVA_OPTIONS = "-Dsun.java2d.uiScale=1.3";
}; };
# Bring in some audio # Bring in some audio

View File

@@ -4,24 +4,20 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/db660732-f520-4e68-9141-b0899f221e82"; device = "/dev/disk/by-uuid/db660732-f520-4e68-9141-b0899f221e82";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" = {
{
device = "/dev/disk/by-uuid/D7D6-B4C6"; device = "/dev/disk/by-uuid/D7D6-B4C6";
fsType = "vfat"; fsType = "vfat";
}; };
@@ -37,5 +33,6 @@
# networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@@ -1,7 +1,11 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ let
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ atomicptr = import (fetchTarball
"https://github.com/atomicptr/nix/archive/refs/heads/master.tar.gz") { };
in {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"1password" "1password"
"1password-cli" "1password-cli"
@@ -10,12 +14,10 @@
"vscode" "vscode"
"code" "code"
"vivaldi"
"google-chrome" "google-chrome"
"slack" "slack"
"spotify" "spotify"
"spotify-unwrapped" "spotify-unwrapped"
"zoom"
"ticktick" "ticktick"
]; ];
@@ -24,7 +26,7 @@
wget wget
curl curl
httpie httpie
hurl hurl # TODO 2025-08-28 Compilation error: error: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
bind bind
gcc gcc
openssl.dev openssl.dev
@@ -34,11 +36,14 @@
hey hey
ngrok ngrok
openssl openssl
atomicptr.crab
pulseaudioFull pulseaudioFull
pavucontrol pavucontrol
bluez # was bluezFull before 27th september 2022 bluez # was bluezFull before 27th september 2022
solaar # bluetooth unifying devices and receiver
# see https://discourse.nixos.org/t/error-nose-1-3-7-not-supported-for-interpreter-python3-12/48703
# solaar # bluetooth unifying devices and receiver
sakura sakura
fasd fasd
@@ -62,12 +67,12 @@
xsel xsel
trippy trippy
monolith # save a web page as a single file monolith # save a web page as a single file
killport
atool atool
unzip unzip
zip zip
pass
_1password-cli _1password-cli
_1password-gui _1password-gui
yubico-pam yubico-pam
@@ -85,35 +90,32 @@
gh gh
meld meld
difftastic difftastic
glab
firefox firefox
vivaldi
google-chrome google-chrome
epiphany
offpunk offpunk
lagrange lagrange
thunderbird thunderbird
slack slack
mattermost-desktop
signal-desktop signal-desktop
tdesktop
zoom-us
libreoffice libreoffice
freemind freemind
filezilla filezilla
vokoscreen-ng vokoscreen-ng
ffmpeg ffmpeg
flameshot ksnip
gimp gimp
copyq copyq
wireshark wireshark
gcalcli gcalcli
zed-editor
kdePackages.kcachegrind
spotify spotify
spotdl # spotdl see https://discourse.nixos.org/t/error-nose-1-3-7-not-supported-for-interpreter-python3-12/48703
vlc vlc
audacity
obs-studio
shotcut
jetbrains-mono jetbrains-mono
vscode.fhs vscode.fhs
@@ -122,13 +124,14 @@
playerctl playerctl
numlockx numlockx
nixpkgs-fmt nixfmt-classic
nodejs_20 nodejs_22
fnm
bun bun
cypress cypress
docker docker
docker-compose docker-compose
kube3d k3d
kubectl kubectl
kubernetes-helm kubernetes-helm
stern stern
@@ -136,16 +139,23 @@
krew krew
php php
php83Packages.composer php84Packages.composer
python3 mariadb
pipx # for global python packages (aider-chat, fabric, etc.) adminer
conda python312
python312Packages.pip
python312Packages.uv
# pipx # for global python packages (aider-chat, fabric, etc.)
twine
# uv
# conda
mkcert mkcert
goaccess goaccess
grafana-loki # logcli grafana-loki # logcli
checkbashisms checkbashisms
shellcheck shellcheck
shfmt
toilet toilet
# AI # AI
@@ -158,9 +168,18 @@
# Perso # Perso
nextcloud-client nextcloud-client
rclone rclone
ventoy-full
# calibre # calibre
gparted gparted
ticktick ticktick
agate
beancount
## TODO: fix fava
# Checking runtime dependencies for fava-1.29-py3-none-any.whl
# copying path '/nix/store/yxd2da4vc9gi5jbs1nlvwpsmwj308bp1-kdoctools-6.10.0' from 'https://cache.nixos.org'...
# - beancount<3,>=2.3.5 not satisfied by version 3.0.0
# copying path '/nix/store/a8n27li3n2fy8jfdm99v9j3yn6w3yk5y-kguiaddons-6.10.0' from 'https://cache.nixos.org'...
# error: builder for '/nix/store/2xd25ssas4yliykz4y4n8p6h762wcalm-fava-1.29.drv' failed with exit code 1
# fava
]; ];
} }

View File

@@ -4,17 +4,7 @@
programs.gitui.enable = true; programs.gitui.enable = true;
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitAndTools.gitFull; package = pkgs.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---'";
};
ignores = [ ignores = [
".DS_Store" ".DS_Store"
@@ -28,11 +18,29 @@
"shell.nix" "shell.nix"
".envrc" ".envrc"
".direnv" ".direnv"
".ddev"
".claude"
"CLAUDE.local.md"
]; ];
# see https://github.com/dandavison/delta#get-started # see https://github.com/dandavison/delta#get-started
delta.enable = true; #delta.enable = true;
extraConfig = { # 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"; merge.conflictstyle = "diff3";
diff.colorMoved = "default"; diff.colorMoved = "default";

View File

@@ -3,18 +3,16 @@
{ {
home.file.".i3status.conf".source = ../files/.i3status.conf; home.file.".i3status.conf".source = ../files/.i3status.conf;
xsession.windowManager.i3 = xsession.windowManager.i3 = let modifier = "Mod4";
let in {
modifier = "Mod4";
in
{
enable = true; enable = true;
config = { config = {
assigns = { assigns = {
# https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.assigns # https://rycee.gitlab.io/home-manager/options.html#opt-xsession.windowManager.i3.config.assigns
}; };
focus = { 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. 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; modifier = modifier;
@@ -25,7 +23,8 @@
### BÉPO ### ### BÉPO ###
"${modifier}+b" = "kill"; "${modifier}+b" = "kill";
"${modifier}+d" = "exec rofi -combi-modi 'window#run#ssh#emoji#calc' -modi 'calc#combi' -show combi"; "${modifier}+d" =
"exec rofi -combi-modi 'window#run#ssh#emoji#calc' -modi 'calc#combi' -show combi";
"${modifier}+e" = "fullscreen toggle"; "${modifier}+e" = "fullscreen toggle";
# change container layout (stacked, tabbed, toggle split) # change container layout (stacked, tabbed, toggle split)
"${modifier}+u" = "layout stacking"; "${modifier}+u" = "layout stacking";
@@ -63,9 +62,12 @@
# See https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html # See https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html
# Pulse Audio controls # Pulse Audio controls
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume 0 +5%"; #increase sound volume "XF86AudioRaiseVolume" =
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume 0 -5%"; #decrease sound volume "exec --no-startup-id pactl set-sink-volume 0 +5%"; # increase sound volume
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute 0 toggle"; # mute sound "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 # Media player controls
"XF86AudioPlay" = "exec playerctl play"; "XF86AudioPlay" = "exec playerctl play";
@@ -75,20 +77,40 @@
# Sreen brightness controls # Sreen brightness controls
"XF86MonBrightnessUp" = "exec light -A 2"; # increase screen brightness "XF86MonBrightnessUp" = "exec light -A 2"; # increase screen brightness
"XF86MonBrightnessDown" = "exec light -U 2"; # decrease screen brightness "XF86MonBrightnessDown" =
"exec light -U 2"; # decrease screen brightness
# Speech-to-text (toggle: press to start/stop) # Speech-to-text (toggle: press to start/stop)
"${modifier}+space" = "exec ~/.local/bin/stt-dictate toggle"; "${modifier}+space" = "exec ~/.local/bin/stt-dictate toggle";
}; };
startup = [ startup = [
{ command = "nextcloud"; notification = false; } {
{ command = "setxkbmap -layout fr -variant bepo"; notification = false; } command = "nextcloud";
{ command = "copyq"; notification = false; } notification = false;
{ command = "numlockx on"; notification = false; } # turn verr num on }
{
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; } 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 # 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; } # { command = "docker start traefik"; notification = false; }

View File

@@ -1,16 +1,15 @@
{ pkgs, ... }:
{ {
# see https://starship.rs/fr-fr/installing/#declaration-utilisateur-unique-via-home-manager # see https://starship.rs/fr-fr/installing/#declaration-utilisateur-unique-via-home-manager
programs.starship = programs.starship = {
{
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
}; };
programs.zsh = { programs.zsh = {
enable = true; enable = true;
autosuggestion = { autosuggestion = { enable = true; };
enable = true;
};
enableCompletion = true; enableCompletion = true;
history = { history = {
ignoreDups = true; ignoreDups = true;
@@ -37,9 +36,9 @@
# `$` must be escaped with `''` :metal: # `$` must be escaped with `''` :metal:
# source: https://nixos.org/nix-dev/2015-December/019018.html # source: https://nixos.org/nix-dev/2015-December/019018.html
initExtra = '' initContent = ''
bindkey ' ' forward-word 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_CR
setopt PROMPT_SP setopt PROMPT_SP
@@ -77,6 +76,9 @@
source <(k3d completion zsh) source <(k3d completion zsh)
source <(kubectl completion zsh) source <(kubectl completion zsh)
source <(k9s completion zsh); compdef _k9s k9s source <(k9s completion zsh); compdef _k9s k9s
# https://github.com/Schniz/fnm#shell-setup
eval "$(fnm env --use-on-cd --shell zsh)"
''; '';
sessionVariables = { sessionVariables = {
@@ -88,6 +90,7 @@
# see https://github.com/NixOS/nixpkgs/pull/56387 and https://discourse.nixos.org/t/cypress-with-npm/15137/4 # see https://github.com/NixOS/nixpkgs/pull/56387 and https://discourse.nixos.org/t/cypress-with-npm/15137/4
CYPRESS_INSTALL_BINARY = 0; CYPRESS_INSTALL_BINARY = 0;
CYPRESS_RUN_BINARY = "$HOME/.nix-profile/bin/Cypress"; CYPRESS_RUN_BINARY = "$HOME/.nix-profile/bin/Cypress";
LD_LIBRARY_PATH = "${pkgs.libgcc}/lib";
}; };
shellAliases = { shellAliases = {