add hyprland and greetd
This commit is contained in:
parent
7a6da71236
commit
77b3ecebb7
22 changed files with 84 additions and 321 deletions
|
|
@ -1 +1 @@
|
|||
/nix/store/s13yx204km1b2wcpy7p2va1nyh9jd1f4-home-manager-files/.config/inkscape/palettes
|
||||
/nix/store/lc7307i2h8wffkfgdmy22wm9xf7cllj2-home-manager-files/.config/inkscape/palettes
|
||||
|
|
@ -1 +1 @@
|
|||
/nix/store/s13yx204km1b2wcpy7p2va1nyh9jd1f4-home-manager-files/.config/inkscape/templates
|
||||
/nix/store/lc7307i2h8wffkfgdmy22wm9xf7cllj2-home-manager-files/.config/inkscape/templates
|
||||
|
|
@ -1 +1 @@
|
|||
/nix/store/s13yx204km1b2wcpy7p2va1nyh9jd1f4-home-manager-files/.config/kitty/kitty.conf
|
||||
/nix/store/lc7307i2h8wffkfgdmy22wm9xf7cllj2-home-manager-files/.config/kitty/kitty.conf
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
# flake hyprland (git version)
|
||||
# flake hyprland (git version) (when lua was not yet available on nixpkgs)
|
||||
#hyprland.url = "github:hyprwm/Hyprland";
|
||||
# hardware
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
|
@ -79,6 +79,7 @@
|
|||
./hosts/nixos-laptop/configuration.nix
|
||||
stylix.nixosModules.stylix
|
||||
home-manager.nixosModules.home-manager
|
||||
niri.nixosModules.niri
|
||||
{
|
||||
# default config
|
||||
home-manager = {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
./packages/niri/niri.nix
|
||||
./packages/nextcloud.nix
|
||||
./packages/other_apps_light.nix
|
||||
./packages/protonmail.nix
|
||||
./packages/mako.nix
|
||||
./packages/python.nix
|
||||
./packages/texlive.nix
|
||||
./packages/thunderbird.nix
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
./packages/nextcloud.nix
|
||||
./packages/obs.nix
|
||||
./packages/other_apps.nix
|
||||
./packages/protonmail.nix
|
||||
./packages/mako.nix
|
||||
./packages/python.nix
|
||||
./packages/texlive.nix
|
||||
./packages/thunderbird.nix
|
||||
|
|
|
|||
|
|
@ -2,17 +2,13 @@
|
|||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
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;
|
||||
package = pkgs.hyprland;
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
xwayland.enable = true;
|
||||
configType = "lua";
|
||||
systemd = {
|
||||
|
|
|
|||
6
home/afoucaultc/packages/mako.nix
Normal file
6
home/afoucaultc/packages/mako.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,270 +0,0 @@
|
|||
{
|
||||
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;
|
||||
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 = {
|
||||
prefer-no-csd = { };
|
||||
screenshot-path = "~/Screenshots/%Y-%m-%d %H-%M-%S.png";
|
||||
hotkey-overlay.skip-at-startup = { };
|
||||
|
||||
# --- 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 = {
|
||||
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 = {
|
||||
width = 2;
|
||||
active-color = c.base0D;
|
||||
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
|
||||
];
|
||||
}
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
{ ... }:
|
||||
# General idea
|
||||
# Alt is for focus switch or open/close windows shortcut
|
||||
# Ctrl is for changing size or state
|
||||
# Mod is for moving windows
|
||||
{
|
||||
programs.niri.settings.binds = {
|
||||
# open programs
|
||||
|
|
@ -25,43 +29,40 @@
|
|||
"-e"
|
||||
"nvim"
|
||||
];
|
||||
|
||||
"Alt+F".action.spawn = [ "zen-beta" ];
|
||||
"Alt+Z".action.spawn = [ "zotero" ];
|
||||
"Alt+T".action.spawn = [ "thunderbird" ];
|
||||
|
||||
# other actions
|
||||
"ALT+F4".action.close-window = { };
|
||||
"ALT+V".action.toggle-window-floating = { };
|
||||
"ALT+V".action.switch-focus-between-floating-and-tiling = { };
|
||||
# size control
|
||||
"Ctrl+V".action.toggle-window-floating = { };
|
||||
"CTRL+M".action.maximize-column = { };
|
||||
"CTRL+F".action.fullscreen-window = { };
|
||||
|
||||
"ALT+H".action.focus-column-left = { };
|
||||
"ALT+L".action.focus-column-right = { };
|
||||
"ALT+K".action.focus-workspace-up = { };
|
||||
"ALT+J".action.focus-workspace-down = { };
|
||||
|
||||
"Super+H".action.move-column-left = { };
|
||||
"Super+L".action.move-column-right = { };
|
||||
"Super+K".action.move-column-to-workspace-up = { };
|
||||
"Super+J".action.move-column-to-workspace-down = { };
|
||||
|
||||
"Alt+A".action.focus-monitor-left = { };
|
||||
"Alt+B".action.focus-monitor-right = { };
|
||||
"Super+A".action.move-column-to-monitor-left = { };
|
||||
"Super+B".action.move-column-to-monitor-right = { };
|
||||
|
||||
"Alt+R".action.switch-preset-column-width = { };
|
||||
"Ctrl+R".action.switch-preset-column-width = { };
|
||||
"Ctrl+Alt+H".action.set-column-width = [ "-10%" ];
|
||||
"Ctrl+Alt+L".action.set-column-width = [ "+10%" ];
|
||||
"Ctrl+Alt+J".action.set-window-height = "-10%";
|
||||
"Ctrl+Alt+K".action.set-window-height = "+10%";
|
||||
|
||||
# switch focus
|
||||
"ALT+H".action.focus-column-left = { };
|
||||
"ALT+L".action.focus-column-right = { };
|
||||
"ALT+K".action.focus-workspace-up = { };
|
||||
"ALT+J".action.focus-workspace-down = { };
|
||||
"Alt+A".action.focus-monitor-left = { };
|
||||
"Alt+B".action.focus-monitor-right = { };
|
||||
# move windows
|
||||
"Super+H".action.move-column-left = { };
|
||||
"Super+L".action.move-column-right = { };
|
||||
"Super+K".action.move-column-to-workspace-up = { };
|
||||
"Super+J".action.move-column-to-workspace-down = { };
|
||||
"Super+A".action.move-column-to-monitor-left = { };
|
||||
"Super+B".action.move-column-to-monitor-right = { };
|
||||
# screenshot
|
||||
"Print".action.screenshot = { };
|
||||
"Ctrl+Print".action.screenshot-screen = { };
|
||||
"Alt+Print".action.screenshot-window = { };
|
||||
|
||||
# multimédia / luminosité
|
||||
# special shortcut
|
||||
"XF86MonBrightnessUp" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
|
|
@ -128,5 +129,7 @@
|
|||
};
|
||||
# Aperçu global (overview)
|
||||
"Alt+Tab".action.toggle-overview = { };
|
||||
# Quitter niri
|
||||
"Ctrl+Alt+M".action.quit = { };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
programs.niri.settings.layout = {
|
||||
gaps = 8;
|
||||
center-focused-column = "never"; # never, always, on-overflow
|
||||
always-center-single-column = true;
|
||||
always-center-single-column = false;
|
||||
|
||||
preset-column-widths = [
|
||||
{ proportion = 0.33333; }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.niri.settings = {
|
||||
prefer-no-csd = true;
|
||||
|
|
@ -8,7 +8,14 @@
|
|||
command = [
|
||||
"swaybg"
|
||||
"-i"
|
||||
"~/nixos-config/dotfiles/hypr/wallpaper/nix-wallpaper.png"
|
||||
"${config.home.homeDirectory}/nixos-config/dotfiles/hypr/wallpaper/nix-wallpaper.png"
|
||||
];
|
||||
}
|
||||
{
|
||||
command = [
|
||||
"gnome-keyring-daemon"
|
||||
"--start"
|
||||
"--components=secrets"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@
|
|||
rofi
|
||||
kitty
|
||||
swaylock
|
||||
swaybg
|
||||
wireplumber
|
||||
brightnessctl
|
||||
xwayland-satellite
|
||||
wl-clipboard
|
||||
];
|
||||
# when greetd active
|
||||
systemd.user.services.niri.enableDefaultPath = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,10 +34,6 @@
|
|||
ffmpeg
|
||||
fastfetch
|
||||
pkg-config
|
||||
mako
|
||||
cliphist
|
||||
grim
|
||||
slurp
|
||||
mullvad-vpn
|
||||
rofi
|
||||
bitwarden-desktop
|
||||
|
|
|
|||
|
|
@ -31,10 +31,6 @@
|
|||
fastfetch
|
||||
pkg-config
|
||||
brightnessctl
|
||||
mako
|
||||
cliphist
|
||||
grim
|
||||
slurp
|
||||
mullvad-vpn
|
||||
rofi
|
||||
# --- Themes
|
||||
|
|
|
|||
4
hosts/common/hyprland.nix
Normal file
4
hosts/common/hyprland.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.hyprland.enable = true;
|
||||
}
|
||||
|
|
@ -2,4 +2,5 @@
|
|||
{
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.login.enableGnomeKeyring = true;
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
}
|
||||
|
|
|
|||
13
hosts/common/services/greetd.nix
Normal file
13
hosts/common/services/greetd.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
# for niri
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-user-session --cmd ${config.programs.niri.package}/bin/niri-session";
|
||||
# for hyprland
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.gnome-keyring = {
|
||||
services.protonmail-bridge = {
|
||||
enable = true;
|
||||
components = [ "secrets" ];
|
||||
};
|
||||
|
||||
services.protonmail-bridge.enable = true;
|
||||
|
||||
systemd.user.services.protonmail-bridge.Service = {
|
||||
systemd.user.services.protonmail-bridge.serviceConfig = {
|
||||
ExecStartPre = "${pkgs.bash}/bin/bash -c 'until ${pkgs.systemd}/bin/busctl --user list | grep -q org.freedesktop.secrets; do sleep 1; done'";
|
||||
RestartSec = "10s";
|
||||
};
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
security = {
|
||||
polkit.enable = true;
|
||||
pam.services.hyprlock = { };
|
||||
pam.services.swaylock = { };
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
|
|
|||
|
|
@ -22,11 +22,14 @@
|
|||
../common/services/gnome-keyring.nix
|
||||
../common/services/mullvad.nix
|
||||
../common/services/sound.nix
|
||||
../common/services/greetd.nix
|
||||
../common/services/protonmail.nix
|
||||
# programs
|
||||
../common/programs/gamescope.nix
|
||||
../common/programs/steam.nix
|
||||
# packages & others
|
||||
../common/niri.nix
|
||||
../common/hyprland.nix
|
||||
../common/wayland.nix
|
||||
../common/system_packages.nix
|
||||
# profil nixos pour mon ordi portable maison
|
||||
|
|
|
|||
|
|
@ -23,11 +23,14 @@
|
|||
../common/services/gnome-keyring.nix
|
||||
../common/services/mullvad.nix
|
||||
../common/services/sound.nix
|
||||
../common/services/greetd.nix
|
||||
../common/services/protonmail.nix
|
||||
# programs
|
||||
../common/programs/gamescope.nix
|
||||
../common/programs/steam.nix
|
||||
# packages & others
|
||||
../common/niri.nix
|
||||
../common/hyprland.nix
|
||||
../common/wayland.nix
|
||||
../common/system_packages.nix # profil nixos-hardware pour le ThinkPad E560
|
||||
# nécessite l'input nixos-hardware dans flake.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue