This commit is contained in:
afoucaultc 2026-08-07 20:04:22 +02:00
parent 9be597750d
commit 00ca4baa74
41 changed files with 795 additions and 113 deletions

View file

@ -15,7 +15,6 @@
./packages/neovim.nix
./packages/nextcloud.nix
./packages/other_apps_light.nix
./packages/pass.nix
./packages/protonmail.nix
./packages/python.nix
./packages/texlive.nix

View file

@ -14,11 +14,10 @@
./packages/mpv.nix
#./packages/music.nix
./packages/neovim.nix
./packages/niri.nix
./packages/niri/niri.nix
./packages/nextcloud.nix
./packages/obs.nix
./packages/other_apps.nix
./packages/pass.nix
./packages/protonmail.nix
./packages/python.nix
./packages/texlive.nix

View file

@ -1,4 +1,4 @@
{ pkgs, inputs, ... }:
{ ... }:
{
programs.git = {
enable = true;

View file

@ -1,6 +1,7 @@
{
pkgs,
config,
lib,
inputs,
...
}:
@ -48,7 +49,9 @@ in
slurp
];
# Force le symlink hors-store, sans passer par dotfiles_apps
home.file.".config/hypr/conf".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/hypr/conf";
home.activation.symlinkHyprConf = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p ${config.home.homeDirectory}/.config/hypr
unlink ${config.home.homeDirectory}/.config/hypr/conf 2>/dev/null || true
ln -sf ${config.home.homeDirectory}/nixos-config/dotfiles/hypr/conf ${config.home.homeDirectory}/.config/hypr/conf
'';
}

View file

@ -1,44 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
# --- DAW principal ---
lmms
# --- Boîte à rythmes ---
hydrogen
drumgizmo
# --- SoundFonts ---
soundfont-fluid
soundfont-generaluser-gs
# --- Synthés (LV2/VST) ---
surge-xt
zynaddsubfx
yoshimi
helm
vital
# --- Effets LV2 ---
calf
lsp-plugins
x42-plugins
# --- Sampling / édition ---
audacity
# --- Utilitaires ---
qpwgraph
sonic-visualiser
];
# Aide les hôtes LV2/VST à trouver les plugins installés via Nix
home.sessionVariables = {
LV2_PATH = "$HOME/.nix-profile/lib/lv2";
LADSPA_PATH = "$HOME/.nix-profile/lib/ladspa";
DSSI_PATH = "$HOME/.nix-profile/lib/dssi";
VST_PATH = "$HOME/.nix-profile/lib/vst";
VST3_PATH = "$HOME/.nix-profile/lib/vst3";
};
}

View file

@ -0,0 +1,55 @@
{ ... }:
{
programs.niri.settings.animations = {
enable = true;
slowdown = 1.0;
workspace-switch.spring = {
damping-ratio = 1.0;
stiffness = 1000;
epsilon = 0.0001;
};
window-open = {
duration-ms = 150;
curve = "ease-out-expo";
};
window-close = {
duration-ms = 150;
curve = "ease-out-quad";
};
horizontal-view-movement.spring = {
damping-ratio = 1.0;
stiffness = 800;
epsilon = 0.0001;
};
window-movement.spring = {
damping-ratio = 1.0;
stiffness = 800;
epsilon = 0.0001;
};
window-resize.spring = {
damping-ratio = 1.0;
stiffness = 800;
epsilon = 0.0001;
};
config-notification-open-close.spring = {
damping-ratio = 0.6;
stiffness = 1000;
epsilon = 0.001;
};
screenshot-ui-open.duration-ms = 200;
overview-open-close.spring = {
damping-ratio = 1.0;
stiffness = 800;
epsilon = 0.0001;
};
};
}

View file

@ -0,0 +1,16 @@
{ ... }:
{
programs.niri.settings.gestures = {
dnd-edge-view-scroll = {
trigger-width = 30;
delay-ms = 100;
max-speed = 1500;
};
dnd-edge-workspace-switch = {
trigger-height = 50;
delay-ms = 100;
max-speed = 1500;
};
hot-corners.enable = true;
};
}

View file

@ -0,0 +1,51 @@
{ ... }:
{
programs.niri.settings.input = {
keyboard = {
xkb = {
layout = "fr";
variant = "";
model = "";
rules = "";
options = "caps:escape";
};
repeat-delay = 600;
repeat-rate = 25;
track-layout = "global";
numlock = true;
};
touchpad = {
off = true;
tap = true;
dwt = true;
dwtp = true;
drag = true;
drag-lock = false;
natural-scroll = true;
accel-speed = 0.0;
accel-profile = "adaptive";
scroll-method = "two-finger";
tap-button-map = "left-middle-right";
click-method = "clickfinger";
middle-emulation = false;
scroll-factor = 1.2;
};
mouse = {
natural-scroll = false;
accel-speed = -0.3;
accel-profile = "flat";
scroll-factor = 1.2;
scroll-method = null;
};
mouse-scroll-factor = 1.0;
touchpad-scroll-factor = 1.0;
focus-follows-mouse = {
enable = true;
# max-scroll-amount = "0%";
};
};
}

View file

@ -0,0 +1,122 @@
{ ... }:
{
programs.niri.settings.binds = {
# open programs
"ALT+Q".action.spawn = "kitty";
"ALT+W".action.spawn = "fuzzel";
"ALT+D".action.spawn = "dolphin";
"ALT+N".action.spawn = [
"kitty"
"-e"
"nvim"
];
"Alt+F".spawn = [ "zen-beta" ];
"Alt+Z".spawn = [ "zotero" ];
"Alt+T".spawn = [ "thunderbird" ];
# other actions
"ALT+F4".action.close-window = { };
"ALT+V".toggle-window-floating = { };
"ALT+M".maximize-column = { };
"ALT+F".fullscreen-window = { };
"ALT+H".focus-column-left = { };
"ALT+L".focus-column-right = { };
"ALT+K".focus-window-up = { };
"ALT+J".focus-window-down = { };
"Ctrl+Super+H".move-column-left = { };
"Ctrl+Super+L".move-column-right = { };
"Ctrl+Super+K".move-window-up = { };
"Ctrl+Super+J".move-window-down = { };
"Super+L".focus-workspace-down = { };
"Super+H".focus-workspace-up = { };
"Super+K".move-column-to-workspace-down = { };
"Super+J".move-column-to-workspace-up = { };
"Alt+A".focus-monitor-left = { };
"Alt+B".focus-monitor-right = { };
"Ctrl+Super+A".move-column-to-monitor-left = { };
"Ctrl+Super+B".move-column-to-monitor-right = { };
"Alt+R".switch-preset-column-width = { };
"Ctrl+H".set-column-width = [ "-10%" ];
"Ctrl+L".set-column-width = [ "+10%" ];
"Ctrl+K".action.set-window-height = "-10%";
"Ctrl+J".action.set-window-height = "+10%";
"Print".screenshot = { };
"Ctrl+Print".screenshot-screen = { };
"Alt+Print".screenshot-window = { };
# multimédia / luminosité
"XF86MonBrightnessUp" = {
_props.allow-when-locked = true;
spawn = [
"brightnessctl"
"-e4"
"-n2"
"set"
"5%+"
];
};
"XF86MonBrightnessDown" = {
_props.allow-when-locked = true;
spawn = [
"brightnessctl"
"-e4"
"-n2"
"set"
"5%-"
];
};
"XF86AudioRaiseVolume" = {
_props.allow-when-locked = true;
spawn = [
"wpctl"
"set-volume"
"-l"
"1"
"@DEFAULT_AUDIO_SINK@"
"5%+"
];
};
"XF86AudioLowerVolume" = {
_props.allow-when-locked = true;
spawn = [
"wpctl"
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"5%-"
];
};
"XF86AudioMute" = {
_props.allow-when-locked = true;
spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SINK@"
"toggle"
];
};
"XF86AudioMicMute" = {
_props.allow-when-locked = true;
spawn = [
"wpctl"
"set-mute"
"@DEFAULT_AUDIO_SOURCE@"
"toggle"
];
};
# Verrouillage d'écran
"Ctrl+Alt+L".action = {
spawn = [ "swaylock" ];
allow-when-locked = true;
};
# Aperçu global (overview)
"Alt+Tab".action.toggle-overview = { };
};
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
programs.niri.settings.layer-rules = [
{
matches = [ { namespace = "^notifications$"; } ];
block-out-from = "screen-capture";
}
{
matches = [ { namespace = "^waybar$"; } ];
place-within-backdrop = false;
}
];
}

View file

@ -0,0 +1,5 @@
{ ... }:
{
programs.niri.settings.ENTER = {
};
}

View file

@ -0,0 +1,79 @@
{ ... }:
{
programs.niri.settings.layout = {
gaps = 16;
center-focused-column = "never"; # never, always, on-overflow
always-center-single-column = false;
preset-column-widths._children = [
{ proportion = 0.33333; }
{ proportion = 0.5; }
{ proportion = 0.66667; }
];
default-column-width.proportion = 0.5;
preset-window-heights = [
{ proportion = 0.33333; }
{ proportion = 0.5; }
{ proportion = 0.66667; }
];
focus-ring = {
enable = true;
width = 4;
# active.color = "#7fc8ff";
# inactive.color = "#505050";
# urgent.color = "#9b0000";
};
border = {
enable = false;
width = 4;
# active.color = "#ffc87f";
# inactive.color = "#505050";
# urgent.color = "#9b0000";
};
shadow = {
enable = false;
softness = 30;
spread = 5;
offset = {
x = 0;
y = 5;
};
# color = "#0007";
# inactive-color = null;
};
tab-indicator = {
enable = true;
hide-when-single-tab = true;
place-within-column = false;
gap = 5;
width = 4;
length.total-proportion = 0.5;
position = "left"; # "left" | "right" | "top" | "bottom"
gaps-between-tabs = 0;
corner-radius = 0;
# active.color = "#7fc8ff";
# inactive.color = "#505050";
# urgent.color = "#9b0000";
};
insert-hint = {
enable = true;
# color = "#7fc8ff4d";
};
struts = {
left = 0;
right = 0;
top = 0;
bottom = 0;
};
# background-color = "transparent";
};
}

View file

@ -0,0 +1,35 @@
{ ... }:
{
programs.niri.settings = {
prefer-no-csd = true;
screenshot-path = "~/Screenshots/%Y-%m-%d %H-%M-%S.png";
spawn-at-startup = [
{
command = [
"swaybg"
"-i"
"~/nixos-config/dotfiles/hypr/wallpaper/nix-wallpaper.png"
];
}
];
environment = {
DISPLAY = null;
QT_QPA_PLATFORM = "wayland";
MOZ_ENABLE_WAYLAND = "1";
};
cursor = {
xcursor-theme = "Bibata-Modern-Ice";
xcursor-size = 24;
hide-when-typing = true;
hide-after-inactive-ms = null;
};
xwayland-satellite = {
enable = true;
path = "xwayland-satellit";
};
clipboard.disable-primary = false;
hotkey-overlay.skip-at-startup = false;
overview.zoom = 0.5;
};
}

View file

@ -0,0 +1,30 @@
{ ... }:
{
programs.niri.settings.output = {
"eDP-1" = {
enable = true;
scale = 1.0;
transform.rotation = 0; # 0, 90, 180, 270
position = {
x = 0;
y = 0;
};
mode = {
width = 1920;
height = 1080;
refresh = 120.0;
};
variable-refresh-rate = null; # true, false, on-demand
# background-color = "#000000";
};
# 2nd screen
# `niri msg outputs`) :
# "HDMI-A-1" = {
# enable = true;
# scale = 1.0;
# position = { x = 1920; y = 0; };
# mode = { width = 2560; height = 1440; refresh = 144.0; };
# };
};
}

View file

@ -0,0 +1,5 @@
{ ... }:
{
programs.niri.settings.ENTER = {
};
}

View file

@ -0,0 +1,41 @@
{ ... }:
{
programs.niri.settings.window-rules = [
{
matches = [ { app-id = "^firefox$"; } ];
default-column-width = {
proportion = 0.66667;
};
}
{
matches = [ { title = "^Picture-in-Picture$"; } ];
open-floating = true;
default-floating-position = {
x = 16;
y = 16;
relative-to = "bottom-right";
};
}
{
matches = [ { app-id = "^(pavucontrol|blueman-manager)$"; } ];
open-floating = true;
}
{
# Exemple : bordure/opacité par app
matches = [ { app-id = "^kitty$"; } ];
opacity = 0.95;
geometry-corner-radius = {
top-left = 8.0;
top-right = 8.0;
bottom-left = 8.0;
bottom-right = 8.0;
};
clip-to-geometry = true;
}
{
exclude-from-window-list = false;
matches = [ { is-active = false; } ];
opacity = 1.0;
}
];
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
programs.niri.settings.workspaces = {
# "1" = { name = "web"; open-on-output = "eDP-1"; };
# "2" = { name = "code"; };
# "3" = { name = "chat"; };
};
}

View file

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
imports = [
./settings.nix
];
programs.niri = {
enable = true;
};
home.packages = with pkgs; [
fuzzel
kitty
swaylock
wireplumber # fournit wpctl
brightnessctl
];
}

View file

@ -0,0 +1,15 @@
{ ... }:
{
imports = [
conf/animations.nix
conf/gestures.nix
conf/input.nix
conf/keybind.nix
conf/layer-rules.nix
conf/layout.nix
conf/misc.nix
conf/output.nix
conf/window-rules.nix
conf/workspaces.nix
];
}

View file

@ -1,6 +0,0 @@
{ ... }:
{
programs.password-store = {
enable = true;
};
}

View file

@ -1,9 +1,14 @@
{ pkgs, ... }:
{
# agent pour les clés gpg demandées par protonmail
services.gpg-agent = {
services.gnome-keyring = {
enable = true;
pinentry.package = pkgs.pinentry-curses;
components = [ "secrets" ];
};
services.protonmail-bridge.enable = true;
systemd.user.services.protonmail-bridge.Service = {
ExecStartPre = "${pkgs.bash}/bin/bash -c 'until ${pkgs.systemd}/bin/busctl --user list | grep -q org.freedesktop.secrets; do sleep 1; done'";
RestartSec = "10s";
};
}