Migrate config (frues-pc machine for now) from https://git.peprolinbot.com/peprolinbot/nixos-config, with improvements
This commit is contained in:
parent
ebd178b0a5
commit
7606f9e051
66 changed files with 9465 additions and 73 deletions
11
users/pedro/home-configuration/hyprland/default.nix
Normal file
11
users/pedro/home-configuration/hyprland/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
./variables.nix
|
||||
./utils.nix
|
||||
];
|
||||
|
||||
xdg.configFile."hypr/default_wallpaper.png".source = ./default_wallpaper.png;
|
||||
}
|
BIN
users/pedro/home-configuration/hyprland/default_wallpaper.png
Normal file
BIN
users/pedro/home-configuration/hyprland/default_wallpaper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 MiB |
23
users/pedro/home-configuration/hyprland/hypridle.nix
Normal file
23
users/pedro/home-configuration/hyprland/hypridle.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{...}: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 300; # 5 min
|
||||
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
{
|
||||
timeout = 330; # 5.5 min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
389
users/pedro/home-configuration/hyprland/hyprland.nix
Normal file
389
users/pedro/home-configuration/hyprland/hyprland.nix
Normal file
|
@ -0,0 +1,389 @@
|
|||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
systemd.enable = false;
|
||||
|
||||
plugins = [
|
||||
pkgs.hyprlandPlugins.hyprgrass
|
||||
];
|
||||
|
||||
settings = let
|
||||
app_menu = "${pkgs.fuzzel}/bin/fuzzel";
|
||||
in {
|
||||
# Autostart
|
||||
exec-once = [
|
||||
"uwsm app -- nm-applet"
|
||||
"uwsm app -- ${pkgs.wl-clip-persist}/bin/persist --clipboard regular"
|
||||
"uwsm app -- bash -c 'if [ ! -f ~/.config/hypr/wallpaper.png ]; then wall-change ~/.config/hypr/default_wallpaper.png; fi'"
|
||||
"uwsm app -- ${pkgs.swaybg}/bin/swaybg -m fill -i ~/.config/hypr/wallpaper.png &"
|
||||
"uwsm app -- ${pkgs.poweralertd}/bin/poweralertd"
|
||||
"uwsm app -- waybar"
|
||||
"uwsm app -- element-desktop --hidden"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "es,us";
|
||||
kb_options = "grp:alt_caps_toggle";
|
||||
numlock_by_default = true;
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
};
|
||||
|
||||
general = {
|
||||
"$mainMod" = "SUPER";
|
||||
layout = "dwindle";
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
no_border_on_floating = false;
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_autoreload = true;
|
||||
disable_hyprland_logo = true;
|
||||
always_follow_on_dnd = true;
|
||||
layers_hog_keyboard_focus = true;
|
||||
animate_manual_resizes = false;
|
||||
enable_swallow = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
force_split = 0;
|
||||
special_scale_factor = 1.0;
|
||||
split_width_multiplier = 1.0;
|
||||
use_active_for_splits = true;
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
special_scale_factor = 1;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 1;
|
||||
passes = 1;
|
||||
brightness = 1;
|
||||
contrast = 1.400;
|
||||
ignore_opacity = true;
|
||||
noise = 0;
|
||||
new_optimizations = true;
|
||||
xray = false;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
|
||||
ignore_window = true;
|
||||
offset = "0 2";
|
||||
range = 20;
|
||||
render_power = 3;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"fluent_decel, 0, 0.2, 0.4, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutCubic, 0.33, 1, 0.68, 1"
|
||||
"easeinoutsine, 0.37, 0, 0.63, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
# Windows
|
||||
"windowsIn, 1, 3, easeOutCubic, popin 30%" # window open
|
||||
"windowsOut, 1, 3, fluent_decel, popin 70%" # window close.
|
||||
"windowsMove, 1, 2, easeinoutsine, slide" # everything in between, moving, dragging, resizing.
|
||||
|
||||
# Fade
|
||||
"fadeIn, 1, 3, easeOutCubic" # fade in (open) -> layers and windows
|
||||
"fadeOut, 1, 2, easeOutCubic" # fade out (close) -> layers and windows
|
||||
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
|
||||
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
|
||||
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
|
||||
"border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
|
||||
"borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
|
||||
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
|
||||
];
|
||||
};
|
||||
|
||||
bind =
|
||||
[
|
||||
# show keybinds list
|
||||
"$mainMod, F1, exec, show-keybinds"
|
||||
|
||||
# keybindings
|
||||
"$mainMod, Return, exec, uwsm app -- kitty"
|
||||
"ALT, Return, exec, uwsm app -- kitty --title float_kitty"
|
||||
"$mainMod SHIFT, Return, exec, uwsm app -- kitty --start-as=fullscreen -o 'font_size=16'"
|
||||
"$mainMod, B, exec, uwsm app -- librewolf"
|
||||
"$mainMod, N, exec, uwsm app -- makoctl mode -t do-not-disturb"
|
||||
"$mainMod SHIFT, N, exec, uwsm app -- swaync-client -d"
|
||||
"$mainMod SHIFT, Q, killactive,"
|
||||
"$mainMod, F, fullscreen, 0"
|
||||
"$mainMod SHIFT, F, fullscreen, 1"
|
||||
"$mainMod, Space, togglefloating,"
|
||||
"$mainMod, D, exec, uwsm app -- ${app_menu}"
|
||||
"$mainMod SHIFT, E, exec, uwsm app -- ${pkgs.bemoji}/bin/bemoji -n"
|
||||
"$mainMod, M, exec, uwsm app -- element-desktop"
|
||||
"$mainMod, Y, exec, uwsm app -- kitty spotify_player"
|
||||
"$mainMod, X, exec, uwsm app -- rofi-rbw"
|
||||
"$mainMod, Escape, exec, uwsm app -- loginctl lock-session"
|
||||
"$mainMod SHIFT, Escape, exec, uwsm app -- shutdown-script"
|
||||
"$mainMod, P, pseudo,"
|
||||
"$mainMod SHIFT, P, togglesplit,"
|
||||
"$mainMod, E, exec, uwsm app -- nemo"
|
||||
"$mainMod SHIFT, B, exec, uwsm app -- pkill -SIGUSR1 .waybar-wrapped"
|
||||
"$mainMod, C ,exec, uwsm app -- ${pkgs.hyprpicker}/bin/hyprpicker -a"
|
||||
"$mainMod, W,exec, uwsm app -- wallpaper-picker"
|
||||
|
||||
# screenshot
|
||||
"$mainMod, Print, exec, uwsm app -- screenshot-menu"
|
||||
",Print, exec, uwsm app -- ${pkgs.grimblast}/bin/grimblast --notify --freeze copy area"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10
|
||||
)
|
||||
)
|
||||
++ [
|
||||
"$mainMod CTRL, c, workspace, emptym"
|
||||
"$mainMod SHIFT, c, movetoworkspace, emptym"
|
||||
|
||||
"$mainMod, S, togglespecialworkspace,"
|
||||
"$mainMod SHIFT, S, movetoworkspacesilent, special"
|
||||
]
|
||||
++ (
|
||||
# Window focus, movement and control
|
||||
builtins.concatLists (
|
||||
let
|
||||
keys = ["H" "L" "K" "J"];
|
||||
directions = ["l" "r" "u" "d"];
|
||||
resize = toString 80; # Change this to change how much a window resizes each keypress
|
||||
resize_list = ["-${resize} 0" "${resize} 0" "0 -${resize}" "0 ${resize}"];
|
||||
in
|
||||
builtins.genList (
|
||||
x: let
|
||||
k = builtins.elemAt keys x;
|
||||
d = builtins.elemAt directions x;
|
||||
r = builtins.elemAt resize_list x;
|
||||
in [
|
||||
"$mainMod, ${k}, movefocus, ${d}"
|
||||
"$mainMod SHIFT, ${k}, movewindow, ${d}"
|
||||
"$mainMod CTRL, ${k}, resizeactive, ${r}"
|
||||
"$mainMod ALT, ${k}, moveactive, ${r}"
|
||||
]
|
||||
)
|
||||
4
|
||||
)
|
||||
)
|
||||
++ [
|
||||
"$mainMod, mouse_down, workspace, e-1"
|
||||
"$mainMod, mouse_up, workspace, e+1"
|
||||
|
||||
# laptop brigthness
|
||||
",XF86MonBrightnessUp, exec, brightnessctl set 5%+"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
"$mainMod, XF86MonBrightnessUp, exec, brightnessctl set 100%+"
|
||||
"$mainMod, XF86MonBrightnessDown, exec, brightnessctl set 100%-"
|
||||
|
||||
# clipboard manager
|
||||
"$mainMod, V, exec, cliphist list | fuzzel --dmenu --prompt '📋 ' | cliphist decode | wl-copy"
|
||||
];
|
||||
|
||||
# Bindings that work when locked
|
||||
bindl = [
|
||||
# media and volume controls
|
||||
",XF86AudioRaiseVolume,exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ && wp-vol"
|
||||
",XF86AudioLowerVolume,exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && wp-vol"
|
||||
",XF86AudioMute,exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioPlay,exec, playerctl play-pause"
|
||||
",XF86AudioNext,exec, playerctl next"
|
||||
",XF86AudioPrev,exec, playerctl previous"
|
||||
",XF86AudioStop, exec, playerctl stop"
|
||||
];
|
||||
|
||||
# mouse binding
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
# windowrule
|
||||
windowrule = [
|
||||
"float,class:vimiv"
|
||||
"center,class:vimiv"
|
||||
"float,class:mpv"
|
||||
"center,class:mpv"
|
||||
"size 1200 725,class:mpv"
|
||||
"float,title:^(float_kitty)$"
|
||||
"center,title:^(float_kitty)$"
|
||||
"size 950 600,title:^(float_kitty)$"
|
||||
"tile, class:neovide"
|
||||
"idleinhibit focus,class:mpv"
|
||||
"float,class:udiskie"
|
||||
"float,title:^(Volume Control)$"
|
||||
"float,title:^(Firefox — Sharing Indicator)$"
|
||||
"move 0 0,title:^(Firefox — Sharing Indicator)$"
|
||||
"size 700 450,title:^(Volume Control)$"
|
||||
"move 40 55%,title:^(Volume Control)$"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
"opacity 1.0 override 1.0 override, class:(Aseprite)"
|
||||
"opacity 1.0 override 1.0 override, class:(Unity)"
|
||||
"idleinhibit focus, class:^(mpv)$"
|
||||
"idleinhibit fullscreen, class:^(firefox)$"
|
||||
"float,class:^(zenity)$"
|
||||
"center,class:^(zenity)$"
|
||||
"size 850 500,class:^(zenity)$"
|
||||
"float,class:^(pavucontrol)$"
|
||||
"float,class:^(.sameboy-wrapped)$"
|
||||
"float,class:^(file_progress)$"
|
||||
"float,class:^(confirm)$"
|
||||
"float,class:^(dialog)$"
|
||||
"float,class:^(download)$"
|
||||
"float,class:^(notification)$"
|
||||
"float,class:^(error)$"
|
||||
"float,class:^(confirmreset)$"
|
||||
"float,title:^(Open File)$"
|
||||
"float,title:^(branchdialog)$"
|
||||
"float,title:^(Confirm to replace files)$"
|
||||
"float,title:^(File Operation Progress)$"
|
||||
|
||||
"opacity 0.0 override,class:^(xwaylandvideobridge)$"
|
||||
"noanim,class:^(xwaylandvideobridge)$"
|
||||
"noinitialfocus,class:^(xwaylandvideobridge)$"
|
||||
"maxsize 1 1,class:^(xwaylandvideobridge)$"
|
||||
"noblur,class:^(xwaylandvideobridge)$"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
",preferred,auto,1"
|
||||
];
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_direction_lock = false;
|
||||
};
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
plugin = {
|
||||
touch_gestures = {
|
||||
# The default sensitivity is probably too low on tablet screens,
|
||||
# I recommend turning it up to 4.0
|
||||
sensitivity = 5.0;
|
||||
|
||||
# must be >= 3
|
||||
workspace_swipe_fingers = 3;
|
||||
|
||||
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
|
||||
# and can be used at the same time
|
||||
# possible values: l, r, u, or d
|
||||
# to disable it set it to anything else
|
||||
workspace_swipe_edge = "no";
|
||||
|
||||
# in milliseconds
|
||||
long_press_delay = 400;
|
||||
|
||||
# resize windows by long-pressing on window borders and gaps.
|
||||
# If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating
|
||||
# windows
|
||||
resize_on_border_long_press = true;
|
||||
|
||||
# in pixels, the distance from the edge that is considered an edge
|
||||
edge_margin = 20;
|
||||
|
||||
# emulates touchpad swipes when swiping in a direction that does not trigger workspace swipe.
|
||||
# ONLY triggers when finger count is equal to workspace_swipe_fingers
|
||||
#
|
||||
# might be removed in the future in favor of event hooks
|
||||
emulate_touchpad_swipe = false;
|
||||
|
||||
hyprgrass-bind = [
|
||||
# swipe left from right edge
|
||||
", edge:r:l, exec, playerctl next"
|
||||
|
||||
# swipe right from left edge
|
||||
", edge:l:r, exec, playerctl previous"
|
||||
|
||||
# swipe up from bottom edge
|
||||
", edge:d:u, exec, pkill -SIGUSR2 wvkbd" # Show wvkbd
|
||||
|
||||
# swipe down to bottom edge
|
||||
", edge:u:d, exec, pkill -SIGUSR1 wvkbd" # Hide wvkbd
|
||||
|
||||
# tap with 3 fingers
|
||||
", tap:4, exec, pkill -SIGRTMIN wvkbd" # Toggles wvkbd
|
||||
|
||||
# swipe up from left edge
|
||||
", edge:l:u, exec, pamixer -i 4"
|
||||
|
||||
# swipe down from left edge
|
||||
", edge:l:d, exec, pamixer -d 4"
|
||||
|
||||
# swipe up with 3 fingers
|
||||
", swipe:3:u, exec, ${pkgs.nwg-drawer}/bin/nwg-drawer"
|
||||
|
||||
# swipe down with 3 fingers
|
||||
", swipe:3:d, killactive"
|
||||
|
||||
# swipe diagonally left and down with 3 fingers
|
||||
", swipe:3:ld, exec, uwsm app -- librewolf"
|
||||
|
||||
# swipe diagonally right and down with 3 fingers
|
||||
", swipe:3:rd, exec, uwsm app -- xournalpp"
|
||||
|
||||
# tap with 3 fingers
|
||||
", tap:3, exec, playerctl play-pause"
|
||||
];
|
||||
|
||||
# longpress can trigger mouse binds:
|
||||
hyprgrass-bindm = [
|
||||
", longpress:2, movewindow"
|
||||
", longpress:3, resizewindow"
|
||||
];
|
||||
|
||||
experimental = {
|
||||
# send proper cancel events to windows instead of hacky touch_up events,
|
||||
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
|
||||
send_cancel = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
73
users/pedro/home-configuration/hyprland/hyprlock.nix
Normal file
73
users/pedro/home-configuration/hyprland/hyprlock.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{config, ...}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = let
|
||||
colors = with config.lib.stylix.colors; {
|
||||
text = base05;
|
||||
accent = base0E;
|
||||
warning = base0A;
|
||||
};
|
||||
in {
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
background = {
|
||||
path = "~/.config/hypr/wallpaper.png";
|
||||
blur_passes = 2;
|
||||
};
|
||||
|
||||
label = [
|
||||
# Time
|
||||
{
|
||||
text = "cmd[update:30000] echo \"<b><big> $(date +\"%R\") </big></b>\"";
|
||||
color = "rgb(${colors.text})";
|
||||
font_size = 110;
|
||||
shadow_passes = 3;
|
||||
shadow_size = 3;
|
||||
|
||||
position = "0, -100";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
|
||||
# Date
|
||||
{
|
||||
text = "cmd[update:43200000] echo \"$(date +\"%A, %d %B %Y\")\"";
|
||||
color = "rgb(${colors.text})";
|
||||
font_size = 18;
|
||||
position = "0, -300";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
|
||||
# User Avatar
|
||||
image = {
|
||||
path = "~/.face.png";
|
||||
size = 125;
|
||||
border_color = "rgb(${colors.accent})";
|
||||
|
||||
position = "0, -450";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
input-field = {
|
||||
size = "300, 60";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.4;
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "<span foreground=\"##${colors.text}\"><i> Logged in as </i><span foreground=\"##${colors.accent}\">$USER</span></span>";
|
||||
hide_input = false;
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = "rgb(${colors.warning})";
|
||||
position = "0, -100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
49
users/pedro/home-configuration/hyprland/utils.nix
Normal file
49
users/pedro/home-configuration/hyprland/utils.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{pkgs, ...}: {
|
||||
services.hyprpolkitagent.enable = true;
|
||||
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
use-bold = true;
|
||||
line-height = 25;
|
||||
fields = "name,generic,comment,categories,filename,keywords";
|
||||
terminal = "kitty";
|
||||
prompt = "'🔍 '";
|
||||
layer = "top";
|
||||
lines = 10;
|
||||
width = 35;
|
||||
horizontal-pad = 25;
|
||||
inner-pad = 5;
|
||||
dpi-aware = false;
|
||||
};
|
||||
border = {
|
||||
radius = 15;
|
||||
width = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
|
||||
allowImages = true;
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication
|
||||
{
|
||||
# From https://github.com/emersion/mako/wiki/Volume-change-notification#1-create-the-notifier-script
|
||||
name = "wp-vol";
|
||||
runtimeInputs = with pkgs; [wireplumber gawk bc];
|
||||
text = ''
|
||||
# Get the volume level and convert it to a percentage
|
||||
volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@)
|
||||
volume=$(echo "$volume" | awk '{print $2}')
|
||||
volume=$(echo "( $volume * 100 ) / 1" | bc)
|
||||
|
||||
notify-send -t 1000 -a 'wp-vol' -h "int:value:$volume" "Volume: ''${volume}%"
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
31
users/pedro/home-configuration/hyprland/variables.nix
Normal file
31
users/pedro/home-configuration/hyprland/variables.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{lib, ...}: let
|
||||
variables = {
|
||||
NIXOS_OZONE_WL = 1;
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
__GL_GSYNC_ALLOWED = 0;
|
||||
__GL_VRR_ALLOWED = 0;
|
||||
_JAVA_AWT_WM_NONEREPARENTING = 1;
|
||||
DISABLE_QT5_COMPAT = 0;
|
||||
GDK_BACKEND = "wayland,x11,*";
|
||||
ANKI_WAYLAND = 1;
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
WLR_DRM_NO_ATOMIC = 1;
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = 1;
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
MOZ_USE_XINPUT2 = 1;
|
||||
WLR_BACKEND = "vulkan";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
};
|
||||
in {
|
||||
home.sessionVariables = variables;
|
||||
|
||||
xdg.configFile."uwsm/env".text = builtins.concatStringsSep "\n" (
|
||||
lib.attrsets.mapAttrsToList (
|
||||
name: value: "export ${name}=\"${builtins.toString value}\""
|
||||
)
|
||||
variables
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue