restore hyprland dotfiles from backups
This commit is contained in:
parent
5dc6c8a77c
commit
4dd1504a4c
12 changed files with 397 additions and 30 deletions
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
/nix/store/4bp4cbx2311fk4h0mrflwd7d2q3z0zwa-home-manager-files/.config/inkscape/palettes
|
/nix/store/vqp7indgm0igwilycffxj384y17x2g7z-home-manager-files/.config/inkscape/palettes
|
||||||
|
|
@ -1 +1 @@
|
||||||
/nix/store/4bp4cbx2311fk4h0mrflwd7d2q3z0zwa-home-manager-files/.config/inkscape/templates
|
/nix/store/vqp7indgm0igwilycffxj384y17x2g7z-home-manager-files/.config/inkscape/templates
|
||||||
|
|
@ -1 +1 @@
|
||||||
/nix/store/4bp4cbx2311fk4h0mrflwd7d2q3z0zwa-home-manager-files/.config/kitty/kitty.conf
|
/nix/store/vqp7indgm0igwilycffxj384y17x2g7z-home-manager-files/.config/kitty/kitty.conf
|
||||||
|
|
@ -1,20 +1,18 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
dots = "${config.home.homeDirectory}/nixos-config/dotfiles";
|
||||||
|
link = config.lib.file.mkOutOfStoreSymlink;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# dotfiles pour inkscape (fichier dimensionné pour LaTeX)
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"inkscape/templates".source =
|
"inkscape/templates".source = link "${dots}/inkscape/templates";
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/inkscape/templates";
|
"inkscape/palettes".source = link "${dots}/inkscape/palettes";
|
||||||
"inkscape/palettes".source =
|
"rofi".source = link "${dots}/rofi";
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/inkscape/palettes";
|
"nvim".source = link "${dots}/nvim";
|
||||||
}; # dotfiles pour Rofi
|
};
|
||||||
xdg.configFile."rofi".source =
|
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/rofi";
|
# hypr/conf est un symlink hors-store : utilise home.file, pas xdg.configFile
|
||||||
# dotfiles pour hyprland
|
home.file.".config/hypr/conf".source = link "${dots}/hypr/conf";
|
||||||
xdg.configFile."hypr".source =
|
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/hypr";
|
|
||||||
# dotfiles nvim
|
|
||||||
xdg.configFile."nvim".source =
|
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-config/dotfiles/nvim";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# xdg.configFile."i3blocks/config".source = ./i3blocks.conf;
|
# xdg.configFile."i3blocks/config".source = ./i3blocks.conf;
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
./packages/mpv.nix
|
./packages/mpv.nix
|
||||||
#./packages/music.nix
|
#./packages/music.nix
|
||||||
./packages/neovim.nix
|
./packages/neovim.nix
|
||||||
|
./packages/niri.nix
|
||||||
./packages/nextcloud.nix
|
./packages/nextcloud.nix
|
||||||
./packages/obs.nix
|
./packages/obs.nix
|
||||||
./packages/other_apps.nix
|
./packages/other_apps.nix
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,45 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hyprPkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = hyprPkgs.hyprland;
|
||||||
|
portalPackage = hyprPkgs.xdg-desktop-portal-hyprland;
|
||||||
|
xwayland.enable = true;
|
||||||
|
configType = "lua";
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
variables = [ "--all" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
local hypr_config = os.getenv("XDG_CONFIG_HOME") or "${config.xdg.configHome}"
|
||||||
|
package.path = hypr_config .. "/hypr/?.lua;"
|
||||||
|
.. hypr_config .. "/hypr/?/init.lua;"
|
||||||
|
.. package.path
|
||||||
|
|
||||||
|
require("conf.variables")
|
||||||
|
require("conf.binding")
|
||||||
|
require("conf.env")
|
||||||
|
require("conf.input")
|
||||||
|
require("conf.others")
|
||||||
|
require("conf.monitor")
|
||||||
|
require("conf.startup")
|
||||||
|
require("conf.style")
|
||||||
|
require("conf.windowrules")
|
||||||
|
require("conf.workspace")
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hyprpolkitagent.enable = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
hyprpaper
|
hyprpaper
|
||||||
hyprlock
|
hyprlock
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,270 @@
|
||||||
{ ... }:
|
|
||||||
{
|
{
|
||||||
programs.niri = {
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
# Stylix expose sa palette base16 ici (pas `config.colorScheme`, qui vient de
|
||||||
|
# nix-colors et n'existe pas dans cette config).
|
||||||
|
c = config.lib.stylix.colors.withHashtag;
|
||||||
|
|
||||||
|
wallpaper = "${config.home.homeDirectory}/nixos-config/dotfiles/hypr/wallpaper/nix-wallpaper.png";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
wayland.windowManager.niri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.niri;
|
||||||
|
|
||||||
|
# xwayland-satellite dans le PATH suffit : niri démarre XWayland à la demande
|
||||||
|
xwaylandSatellitePackage = pkgs.xwayland-satellite;
|
||||||
|
|
||||||
|
# niri recommande le portail gnome (screencast, file chooser)
|
||||||
|
portalPackage = pkgs.xdg-desktop-portal-gnome;
|
||||||
|
|
||||||
|
# valide le KDL généré au moment du build : les erreurs de config
|
||||||
|
# apparaissent pendant `nixos-rebuild`, pas au premier login
|
||||||
|
checkConfig = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
prefer-no-csd = true;
|
prefer-no-csd = { };
|
||||||
input.keyboard.xkb = {
|
screenshot-path = "~/Screenshots/%Y-%m-%d %H-%M-%S.png";
|
||||||
layout = "us";
|
hotkey-overlay.skip-at-startup = { };
|
||||||
variant = "intl";
|
|
||||||
|
# --- entrées -------------------------------------------------------
|
||||||
|
input = {
|
||||||
|
keyboard.xkb.layout = "fr";
|
||||||
|
keyboard.numlock = { };
|
||||||
|
touchpad = {
|
||||||
|
tap = { };
|
||||||
|
dwt = { };
|
||||||
|
accel-profile = "adaptive";
|
||||||
|
scroll-factor = 1.2;
|
||||||
|
};
|
||||||
|
mouse = {
|
||||||
|
accel-profile = "adaptive";
|
||||||
|
accel-speed = -0.3;
|
||||||
|
};
|
||||||
|
focus-follows-mouse = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# --- disposition ---------------------------------------------------
|
||||||
layout = {
|
layout = {
|
||||||
gaps = 4;
|
gaps = 8;
|
||||||
|
center-focused-column = "never";
|
||||||
|
|
||||||
|
default-column-width.proportion = 0.5;
|
||||||
|
preset-column-widths._children = [
|
||||||
|
{ proportion = 0.33333; }
|
||||||
|
{ proportion = 0.5; }
|
||||||
|
{ proportion = 0.66667; }
|
||||||
|
];
|
||||||
|
|
||||||
focus-ring = {
|
focus-ring = {
|
||||||
enable = true;
|
|
||||||
width = 2;
|
width = 2;
|
||||||
active.color = "#${config.colorScheme.palette.base0D}ff";
|
active-color = c.base0D;
|
||||||
inactive.color = "#${config.colorScheme.palette.base03}ff";
|
inactive-color = c.base03;
|
||||||
|
};
|
||||||
|
border.off = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- raccourcis ----------------------------------------------------
|
||||||
|
# calqués sur conf/binding.lua pour garder les réflexes.
|
||||||
|
# NB : dans niri `Mod` = Super. J/K reprennent ton inversion Hyprland
|
||||||
|
# (J = haut, K = bas).
|
||||||
|
binds = {
|
||||||
|
"Mod+Shift+Slash".show-hotkey-overlay = { };
|
||||||
|
|
||||||
|
# session
|
||||||
|
"Ctrl+Alt+M".quit = { };
|
||||||
|
"Ctrl+Alt+L".spawn = [ "hyprlock" ];
|
||||||
|
|
||||||
|
# lanceurs
|
||||||
|
"Alt+Q".spawn = [ "kitty" ];
|
||||||
|
"Alt+N".spawn = [
|
||||||
|
"kitty"
|
||||||
|
"-e"
|
||||||
|
"nvim"
|
||||||
|
];
|
||||||
|
"Alt+D".spawn = [ "dolphin" ];
|
||||||
|
"Alt+F".spawn = [ "zen-beta" ];
|
||||||
|
"Alt+Z".spawn = [ "zotero" ];
|
||||||
|
"Alt+T".spawn = [ "thunderbird" ];
|
||||||
|
"Alt+W".spawn = [
|
||||||
|
"rofi"
|
||||||
|
"-show"
|
||||||
|
"drun"
|
||||||
|
];
|
||||||
|
"Alt+X".spawn = [
|
||||||
|
"rofi"
|
||||||
|
"-show"
|
||||||
|
"window"
|
||||||
|
];
|
||||||
|
"Alt+C".spawn = [
|
||||||
|
"rofi"
|
||||||
|
"-show"
|
||||||
|
"filebrowser"
|
||||||
|
];
|
||||||
|
"Super+V".spawn = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy"
|
||||||
|
];
|
||||||
|
|
||||||
|
# fenêtres
|
||||||
|
"Alt+F4".close-window = { };
|
||||||
|
"Alt+V".toggle-window-floating = { };
|
||||||
|
"Alt+M".maximize-column = { };
|
||||||
|
"Alt+Shift+F".fullscreen-window = { };
|
||||||
|
|
||||||
|
# focus (colonnes = gauche/droite, fenêtres dans la colonne = haut/bas)
|
||||||
|
"Alt+H".focus-column-left = { };
|
||||||
|
"Alt+L".focus-column-right = { };
|
||||||
|
"Alt+J".focus-window-up = { };
|
||||||
|
"Alt+K".focus-window-down = { };
|
||||||
|
|
||||||
|
# déplacement de fenêtre
|
||||||
|
"Ctrl+Super+H".move-column-left = { };
|
||||||
|
"Ctrl+Super+L".move-column-right = { };
|
||||||
|
"Ctrl+Super+J".move-window-up = { };
|
||||||
|
"Ctrl+Super+K".move-window-down = { };
|
||||||
|
|
||||||
|
# espaces de travail (verticaux dans niri)
|
||||||
|
"Super+L".focus-workspace-down = { };
|
||||||
|
"Super+H".focus-workspace-up = { };
|
||||||
|
"Super+K".move-column-to-workspace-down = { };
|
||||||
|
"Super+J".move-column-to-workspace-up = { };
|
||||||
|
|
||||||
|
# écrans
|
||||||
|
"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 = { };
|
||||||
|
|
||||||
|
# largeur de colonne
|
||||||
|
"Alt+R".switch-preset-column-width = { };
|
||||||
|
"Alt+Minus".set-column-width = [ "-10%" ];
|
||||||
|
"Alt+Equal".set-column-width = [ "+10%" ];
|
||||||
|
|
||||||
|
# captures d'écran (intégrées à niri, pas besoin de grim/slurp)
|
||||||
|
"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"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# --- nœuds répétés / paramétrés ------------------------------------
|
||||||
|
_children = [
|
||||||
|
# écrans : niri prend le mode « preferred » si on ne précise rien
|
||||||
|
{
|
||||||
|
output = {
|
||||||
|
_args = [ "eDP-1" ];
|
||||||
|
scale = 1.0;
|
||||||
|
position._props = {
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{ output._args = [ "HDMI-A-1" ]; }
|
||||||
|
|
||||||
|
# démarrage
|
||||||
|
{
|
||||||
|
spawn-at-startup._args = [
|
||||||
|
"swaybg"
|
||||||
|
"-i"
|
||||||
|
wallpaper
|
||||||
|
"-m"
|
||||||
|
"fill"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ spawn-at-startup._args = [ "mako" ]; }
|
||||||
|
{
|
||||||
|
spawn-at-startup._args = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"wl-paste --type text --watch cliphist store"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
spawn-at-startup._args = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"wl-paste --type image --watch cliphist store"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
# règles de fenêtres : exemple, à étoffer au fur et à mesure
|
||||||
|
{
|
||||||
|
window-rule._children = [
|
||||||
|
{ match._props.app-id = "^org\\.keepassxc\\.KeePassXC$"; }
|
||||||
|
{ block-out-from = "screen-capture"; }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
swaybg # niri n'a pas de gestionnaire de fond d'écran intégré
|
||||||
|
xwayland-satellite
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
40
hosts/nixos-home/config/wayland.nix
Normal file
40
hosts/nixos-home/config/wayland.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
security = {
|
||||||
|
polkit.enable = true;
|
||||||
|
pam.services.hyprlock = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.graphical-desktop.enable = true;
|
||||||
|
|
||||||
|
services.xserver.desktopManager.runXdgAutostartIfNone = lib.mkDefault true;
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [ "https://hyprland.cachix.org" ];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIITfGmwGaMwaOAd6DDeaU="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
security.wrappers.Hyprland = {
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
capabilities = "cap_sys_nice+ep";
|
||||||
|
source = lib.getExe inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
./config/programs/gamescope.nix
|
./config/programs/gamescope.nix
|
||||||
./config/programs/steam.nix
|
./config/programs/steam.nix
|
||||||
# packages & others
|
# packages & others
|
||||||
./config/hyprland.nix
|
./config/wayland.nix
|
||||||
./config/system_packages.nix
|
./config/system_packages.nix
|
||||||
# profil nixos pour mon ordi portable maison
|
# profil nixos pour mon ordi portable maison
|
||||||
# nécessite l'input nixos-hardware dans flake.nix.
|
# nécessite l'input nixos-hardware dans flake.nix.
|
||||||
|
|
|
||||||
40
hosts/nixos-laptop/config/wayland.nix
Normal file
40
hosts/nixos-laptop/config/wayland.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
security = {
|
||||||
|
polkit.enable = true;
|
||||||
|
pam.services.hyprlock = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.graphical-desktop.enable = true;
|
||||||
|
|
||||||
|
services.xserver.desktopManager.runXdgAutostartIfNone = lib.mkDefault true;
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings = {
|
||||||
|
substituters = [ "https://hyprland.cachix.org" ];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIITfGmwGaMwaOAd6DDeaU="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
security.wrappers.Hyprland = {
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
capabilities = "cap_sys_nice+ep";
|
||||||
|
source = lib.getExe inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
./config/drivers_video.nix
|
./config/drivers_video.nix
|
||||||
./config/extra-services.nix
|
./config/extra-services.nix
|
||||||
./config/fonts.nix
|
./config/fonts.nix
|
||||||
./config/hyprland.nix
|
|
||||||
./config/language.nix
|
./config/language.nix
|
||||||
./config/power_management.nix
|
./config/power_management.nix
|
||||||
./config/sound.nix
|
./config/sound.nix
|
||||||
|
|
@ -19,6 +18,7 @@
|
||||||
./config/system_saves.nix
|
./config/system_saves.nix
|
||||||
./config/system_services.nix
|
./config/system_services.nix
|
||||||
./config/user.nix
|
./config/user.nix
|
||||||
|
./config/wayland.nix
|
||||||
# ajout pour forcer l'utilisation de cachix au max
|
# ajout pour forcer l'utilisation de cachix au max
|
||||||
./config/low-ram.nix
|
./config/low-ram.nix
|
||||||
# profil nixos-hardware pour le ThinkPad E560
|
# profil nixos-hardware pour le ThinkPad E560
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue