Compare commits
2 commits
6da032eae9
...
09f89553b9
| Author | SHA1 | Date | |
|---|---|---|---|
| 09f89553b9 | |||
| 07a2598300 |
3 changed files with 26 additions and 11 deletions
|
|
@ -59,6 +59,22 @@
|
||||||
LC_TIME = "hr_HR.UTF-8";
|
LC_TIME = "hr_HR.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Setup bluetooth
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
hardware.bluetooth.settings = {
|
||||||
|
General = {
|
||||||
|
Enable = "Source,Sink,Media,Socket";
|
||||||
|
Experimental = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Setup dbus broker
|
||||||
|
services.dbus = {
|
||||||
|
enable = true;
|
||||||
|
implementation = "broker";
|
||||||
|
};
|
||||||
|
|
||||||
# Enable seatd
|
# Enable seatd
|
||||||
services.seatd.enable = true;
|
services.seatd.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,12 +73,6 @@
|
||||||
|
|
||||||
'';
|
'';
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
hypr-fix-vrr = pkgs.writeShellScriptBin "hypr-fix-vrr" ''
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
hyprctl --batch "keyword cursor:no_break_fs_vrr 0; keyword cursor:no_hardware_cursors 0"
|
|
||||||
sleep 1
|
|
||||||
hyprctl --batch "keyword cursor:no_break_fs_vrr 1; keyword cursor:no_hardware_cursors 1"
|
|
||||||
'';
|
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
crony.hyprland.enable = lib.mkEnableOption "Enable hyprland and configure it for me";
|
crony.hyprland.enable = lib.mkEnableOption "Enable hyprland and configure it for me";
|
||||||
|
|
@ -117,7 +111,7 @@ in {
|
||||||
{
|
{
|
||||||
timeout = 10; # 10 sec
|
timeout = 10; # 10 sec
|
||||||
on-timeout = "pidof hyprlock && hyprctl dispatch dpms off"; # Turn off screen if hyprlock is running
|
on-timeout = "pidof hyprlock && hyprctl dispatch dpms off"; # Turn off screen if hyprlock is running
|
||||||
on-resume = "hyprctl dispatch dpms on && ${hypr-fix-vrr}/bin/hypr-fix-vrr"; # Turn on screen when activiy is detected after timeout has fired
|
on-resume = "hyprctl dispatch dpms on"; # Turn on screen when activiy is detected after timeout has fired
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
timeout = 300; # 5min
|
timeout = 300; # 5min
|
||||||
|
|
@ -126,7 +120,7 @@ in {
|
||||||
{
|
{
|
||||||
timeout = 310; # 5min and 10 sec
|
timeout = 310; # 5min and 10 sec
|
||||||
on-timeout = "hyprctl dispatch dpms off"; # Turn off screen if hyprlock is running
|
on-timeout = "hyprctl dispatch dpms off"; # Turn off screen if hyprlock is running
|
||||||
on-resume = "hyprctl dispatch dpms on && ${hypr-fix-vrr}/bin/hypr-fix-vrr"; # Turn on screen when activiy is detected after timeout has fired
|
on-resume = "hyprctl dispatch dpms on"; # Turn on screen when activiy is detected after timeout has fired
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
@ -158,13 +152,13 @@ in {
|
||||||
# Fix laptop monitor getting turned on while my external monitor connected
|
# Fix laptop monitor getting turned on while my external monitor connected
|
||||||
"hyprctl monitors | grep 'HDMI' && hyprctl keyword monitor 'eDP-1, disable'"
|
"hyprctl monitors | grep 'HDMI' && hyprctl keyword monitor 'eDP-1, disable'"
|
||||||
"pkill waybar; waybar" # Kill waybar and start new instance because everytime hyprland restarts breaks waybar
|
"pkill waybar; waybar" # Kill waybar and start new instance because everytime hyprland restarts breaks waybar
|
||||||
"${hypr-fix-vrr}/bin/hypr-fix-vrr"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
cursor = {
|
cursor = {
|
||||||
no_break_fs_vrr = 1;
|
# Breaks mouse in fullscreen
|
||||||
|
# no_break_fs_vrr = 1;
|
||||||
no_hardware_cursors = 1;
|
no_hardware_cursors = 1;
|
||||||
use_cpu_buffer = 0;
|
# use_cpu_buffer = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
exec-once = [
|
exec-once = [
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,13 @@
|
||||||
ports = [
|
ports = [
|
||||||
"8123:8123"
|
"8123:8123"
|
||||||
];
|
];
|
||||||
|
capabilities = {
|
||||||
|
NET_ADMIN = true;
|
||||||
|
NET_RAW = true;
|
||||||
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"/var/lib/homeassistant:/config"
|
"/var/lib/homeassistant:/config"
|
||||||
|
"/run/dbus:/run/dbus:ro"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
TZ = "Europe/Berlin";
|
TZ = "Europe/Berlin";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue