mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 10:30:44 +02:00
Added first part of Hyprland config + added some utilities like blueman, brightnessctl, etc.
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|||||||
@@ -38,10 +38,22 @@
|
|||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
# Enable the GNOME Desktop Environment.
|
||||||
services.displayManager.gdm.enable = true;
|
# services.displayManager.gdm.enable = true;
|
||||||
services.desktopManager.gnome.enable = true;
|
services.desktopManager.gnome.enable = true;
|
||||||
# enable hyprland WM
|
# enable hyprland WM
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
#enable sddm
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.upower.enable = true;
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver.xkb = {
|
services.xserver.xkb = {
|
||||||
@@ -115,6 +127,14 @@ programs.hyprland.enable = true;
|
|||||||
wget
|
wget
|
||||||
tree # shows dir in tree
|
tree # shows dir in tree
|
||||||
zsh # better bash
|
zsh # better bash
|
||||||
|
brightnessctl # control brightness
|
||||||
|
pulseaudio # sound server
|
||||||
|
playerctl # controls media player
|
||||||
|
blueman # GTK-based Bluetooth Manager
|
||||||
|
udiskie # removable disk automounter for udisks
|
||||||
|
networkmanagerapplet # NetworkManager control applet
|
||||||
|
cliphist # Wayland clipboard manager
|
||||||
|
wl-clipboard # cli copy/past utilities for Wayland
|
||||||
];
|
];
|
||||||
|
|
||||||
# fonts
|
# fonts
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ imports = [
|
|||||||
../../modules/home-manager/ssh.nix
|
../../modules/home-manager/ssh.nix
|
||||||
../../modules/home-manager/fastfetch.nix
|
../../modules/home-manager/fastfetch.nix
|
||||||
../../modules/home-manager/hyprland.nix
|
../../modules/home-manager/hyprland.nix
|
||||||
|
../../modules/home-manager/wlogout.nix # logout utility
|
||||||
|
../../modules/home-manager/rofi.nix # launcher and keybindings helper
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,145 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
|
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
|
||||||
wayland.windowManager.hyprland.enable = true;
|
wayland.windowManager.hyprland.enable = true;
|
||||||
|
|
||||||
#hint Electron apps to use on wayland;
|
#hint Electron apps to use on wayland;
|
||||||
home.sessionVariables.NIXOS_OZONE_WL="1"
|
home.sessionVariables.NIXOS_OZONE_WL="1";
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
"$term" = "kitty";
|
||||||
|
"$editor" = "nvim";
|
||||||
|
"$file" = "nautilius";
|
||||||
|
"$browser" = "firefox" # change to librewolf later
|
||||||
|
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
|
||||||
|
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
|
||||||
|
|
||||||
|
# █▀▀ █▄░█ █░█
|
||||||
|
# ██▄ █░▀█ ▀▄▀
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||||
|
env = [
|
||||||
|
"PATH, $PATH:$scrPath"
|
||||||
|
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||||
|
"XDG_SESSION_TYPE,wayland"
|
||||||
|
"XDG_SESSION_DESKTOP,Hyprland"
|
||||||
|
"QT_QPA_PLATFORM,wayland;xcb"
|
||||||
|
"QT_QPAPLATFORMTHEME,qt6ct"
|
||||||
|
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||||
|
"MOZ_ENABLE_WAYLAND,1"
|
||||||
|
"GDK_SCALE,1"
|
||||||
|
];
|
||||||
|
|
||||||
|
# █ █▄░█ █▀█ █░█ ▀█▀
|
||||||
|
# █ █░▀█ █▀▀ █▄█ ░█░
|
||||||
|
|
||||||
|
# is it needed? Doesnt nixos already handles that?
|
||||||
|
|
||||||
|
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
|
||||||
|
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
|
||||||
|
#not all binds now. Do it later when all scripts and etc. are moved
|
||||||
|
bind = [
|
||||||
|
#hyprland/utility keybindings
|
||||||
|
"$mod, W, togglefloating"
|
||||||
|
"$mod, G, togglegroup"
|
||||||
|
"Alt, Return, fullscreen"
|
||||||
|
"$mod, Left, movefocus, l"
|
||||||
|
"$mod, Right, movefocus, r"
|
||||||
|
"$mod, Up, movefocus, u"
|
||||||
|
"$mod, Down, movefocus, d"
|
||||||
|
"Alt, Tab, movefocus, d"
|
||||||
|
"$mod, 1, workspace, 1"
|
||||||
|
"$mod, 2, workspace, 2"
|
||||||
|
"$mod, 3, workspace, 3"
|
||||||
|
"$mod, 4, workspace, 4"
|
||||||
|
"$mod, 5, workspace, 5"
|
||||||
|
"$mod, 6, workspace, 6"
|
||||||
|
"$mod, 7, workspace, 7"
|
||||||
|
"$mod, 8, workspace, 8"
|
||||||
|
"$mod, 9, workspace, 9"
|
||||||
|
"$mod, 0, workspace, 10"
|
||||||
|
"$mod+Ctrl, Right, workspace, r+1"
|
||||||
|
"$mod+Ctrl, Left, workspace, r-1"
|
||||||
|
"$mod+Ctrl, Doown, workspace, empty"
|
||||||
|
"$mod+Shift, 1, movetoworkspace, 1"
|
||||||
|
"$mod+Shift, 2, movetoworkspace, 2"
|
||||||
|
"$mod+Shift, 3, movetoworkspace, 3"
|
||||||
|
"$mod+Shift, 4, movetoworkspace, 4"
|
||||||
|
"$mod+Shift, 5, movetoworkspace, 5"
|
||||||
|
"$mod+Shift, 6, movetoworkspace, 6"
|
||||||
|
"$mod+Shift, 7, movetoworkspace, 7"
|
||||||
|
"$mod+Shift, 8, movetoworkspace, 8"
|
||||||
|
"$mod+Shift, 9, movetoworkspace, 9"
|
||||||
|
"$mod+Shift, 0, movetoworkspace, 10"
|
||||||
|
"$mod+Ctrl+Alt, Right, movetoworkspace, r+1"
|
||||||
|
"$mod+Ctrl+Alt, Left, movetoworkspacem r-1"
|
||||||
|
"$mod, Backspace, exec, wlogout -b 5 -T 600 -B 600"
|
||||||
|
"$mod+Shift+Ctrl, Left, movewindow, l"
|
||||||
|
"$mod+Shift+Ctrl, Right, movewindow, r"
|
||||||
|
"$mod+Shift+Ctrl, Up, movewindow, u"
|
||||||
|
"$mod+Shift+Ctrl, Down, movewindow, d"
|
||||||
|
"$mod, mouse_down, workspace, e+1"
|
||||||
|
"$mod, mouse_up, workspace, e-1"
|
||||||
|
#apps keybindings
|
||||||
|
"$mod, T, exec, $term"
|
||||||
|
"$mod, E, exec, $file"
|
||||||
|
"$mod, F, exec, $browser"
|
||||||
|
"$mod+Shift, A, exec, rofi -show drun"
|
||||||
|
|
||||||
|
#plugins keybindings
|
||||||
|
|
||||||
|
];
|
||||||
|
binde = [
|
||||||
|
"$mod+Shift, Right, resizeactive, 30 0"
|
||||||
|
"$mod+Shift, Left, resizeactive, -30, 0"
|
||||||
|
"$mod+Shift, Up, resizeactive, 0 -30"
|
||||||
|
"$mod+Shift, Down, resizeactive,m 0 30"
|
||||||
|
];
|
||||||
|
bindl = [
|
||||||
|
", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ togge" #toggle audio mute
|
||||||
|
", F5, exec, playerctl play-pause" # media F4-F6
|
||||||
|
", F4, exec, playerctl previous"
|
||||||
|
", F6, exec, playerctl next"
|
||||||
|
];
|
||||||
|
bindel = [
|
||||||
|
", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume
|
||||||
|
", F3, exec, pactl set-sinl-volume @DEFAULT_SINK@ +10%" # increase volume
|
||||||
|
", F7, exec, brightnessctl s 10%-" # decrease brightness
|
||||||
|
", F8, exec, brightnessctl s +10%" # increase brightness
|
||||||
|
];
|
||||||
|
bindm = [
|
||||||
|
"$mod, mouse:272, movewindow"
|
||||||
|
"$mod, mouse:273, resizewindow"
|
||||||
|
"$mod, Z, movewindow"
|
||||||
|
"$mod, X, resizewindow"
|
||||||
|
];
|
||||||
|
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
|
||||||
|
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
|
||||||
|
exec-once = [
|
||||||
|
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||||
|
"dbus-update-activation-environment --systemd --all" # for XDPH
|
||||||
|
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||||
|
"systemctl --user start xdg-desktop-portal-wlr.service"
|
||||||
|
"blueman-applet" # systray app for Bluetooth
|
||||||
|
"udiskie --no-automount --smart-tray" # front-end that allows to manage removable media
|
||||||
|
"nm-applet --indicator" # systray app for Network/wifi
|
||||||
|
"wl-paste --type text --watch cliphist store" # clipboard store text data
|
||||||
|
"wl-paste --type image --watch cliphist store" # clipboard store image data
|
||||||
|
];
|
||||||
|
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
|
||||||
|
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
||||||
|
|
||||||
|
# █▀▄▀█ █ █▀ █▀▀
|
||||||
|
# █░▀░█ █ ▄█ █▄▄
|
||||||
|
|
||||||
|
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
|
||||||
|
# █░▀░█ █▄█ █░▀█ █ ░█░ █▄█ █▀▄
|
||||||
|
monitor = [
|
||||||
|
",preferred, auto, auto"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.wlogout = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user