Skip to content

JimJ92120/nixos-hyprland-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nixos-hyprland-module

Some basics configurations for hyprland on nixos.

Includes configuration example for:

Includes:

  • chromium
  • codium
  • gnome-text-editor
  • gnome-calculator
  • seahorse
  • nautilus

screenshot

home-manager is used here to copy over some configuration files.



setup

  1. clone the repository
  2. move the files into /etc/nixos directory
  3. edit variables in hyprland.nix according to your setup (e.g NIXOS_VERSION, MAIN_USER) - https://github.com/JimJ92120/nixos-hyprland-module/blob/main/hyprland.nix#L3-L11
  4. import module in /etc/nixos/configuration.nix

wayland.windowManager.hyprland.settings.monitor is not set, commented lines shows configurations for a 3 displays layout (left - center - right).


utils

waybar

Edit ./files/waybar/config.jsonrc.

cpu

Edit temperature module accordingly with thermal-zone or hwmon-path accordingly.

# check `thermal-zone`
# see https://github.com/Alexays/Waybar/blob/master/resources/config.jsonc#L126
for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done

# check `hwmon-path`
# see https://github.com/Alexays/Waybar/blob/master/resources/config.jsonc#L127
for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done

gpu

custom/gpu and custom/temperature_gpu are set for an Nvidia GPU. Please edit the following according to the device hardware and needs:

"custom/gpu": {
  "format": "{}%",
  "interval": 5,
  "return-type": "",
  "exec": "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader | sed 's/%//'"
},
"custom/temperature_gpu": {
  "format": "{}°C",
  "interval": 5,
  "return-type": "",
  "exec": "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader"
},

screenshot-waybar

screenshot

hyprshot is used to do screenshots (see key binding section below). Screenshots are saved into ~/Pictures/Screenshots directory.

Directory can be set with with HYPRSHOT_DIR env variable:

wayland.windowManager.hyprland.settings.env = [
  "HYPRSHOT_DIR, $HOME/Pictures/Screenshots"
];

keyring

gnome-keyring is used here.


theming

nwg-look is used to set themes, cursor styles, fonts, etc.

(screenshot example uses Gruvbox GTK Theme)

wallpaper

hyprpaper is used to set the wallpaper.

Update ./files/wallpaper.png if needed or set home-manager.users.${USERNAME}.services.hyprpaper.settings.wallpaper to another source.

(the current wallpaper comes from the nixos-artwork repository)

kitty

Edit ./files/kitty/kitty.conf.

waybar

Edit ./files/waybar/style.css.

nautilus

Nautilus requires GTK_THEME env variable to be set with the current theme to apply it.

wayland.windowManager.hyprland.settings.env = [
  "GTK_THEME, Dark-Gruvbox"
];

key binding

SUPER + 1 open app launcher
SUPER + 2 open code editor (codium)
SUPER + 3 open browser (chromium)
SUPER + 4 open text editor (gnome-text-editor)
SUPER + MouseScroll move current window to next (up) or previous (down) workspace
SUPER + Q close current window
SUPER + M logout
Print open screenshot utility (hypershot)

See wayland.windowManager.hyprland.settings.bind* for more shortcuts.


documentation and links

About

Some basics Hypland configurations for Nixos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published