mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 06:46:11 +01:00
feat: laptop optimizations
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -1133,11 +1133,11 @@
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1731730181,
|
||||
"narHash": "sha256-uCyImsva4NYsRywcT+U6cr+MZrXx/e4Gu8SqTujrCBY=",
|
||||
"lastModified": 1731754035,
|
||||
"narHash": "sha256-EyZZwZMs+zfI/NSOVPRh8kW1qljNJsPC11Y7fXLg9Gs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "295cc9ee333bda9e7d58daae4d1c25fcdef3e5a6",
|
||||
"rev": "48d49a916e13bcb6363d8d3ac4c5c862aea21b7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
./system/hyprland.nix
|
||||
./system/rofi.nix
|
||||
./system/stylix.nix
|
||||
./system/theme.nix
|
||||
./system/theme.nix
|
||||
./system/waybar.nix
|
||||
./system/wlsunset.nix
|
||||
./system/wofi.nix
|
||||
@@ -54,7 +54,7 @@
|
||||
./system/hyprland.nix
|
||||
./system/rofi.nix
|
||||
./system/stylix.nix
|
||||
./system/theme.nix
|
||||
./system/theme.nix
|
||||
./system/waybar.nix
|
||||
./system/wlsunset.nix
|
||||
./system/wofi.nix
|
||||
@@ -68,5 +68,6 @@
|
||||
./programs/helix.nix
|
||||
./programs/fastfetch.nix
|
||||
]
|
||||
else [ ];
|
||||
else
|
||||
[ ];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ lib, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
hostname,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# ------------------------------------------------
|
||||
# Needed Packages
|
||||
@@ -268,6 +274,7 @@
|
||||
################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=, preferred, auto, 1
|
||||
monitor=HDMI-A-1, preferred, 0x360, 1
|
||||
monitor=DP-1, highrr, 4480x0, 1
|
||||
monitor=DP-2, highrr, 1920x0, 1
|
||||
@@ -659,48 +666,75 @@
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
listener =
|
||||
if hostname == "zion" then
|
||||
[
|
||||
# {
|
||||
# timeout = 60;
|
||||
# on-timeout = "brightnessctl -sd asus::kbd_backlight set 0";
|
||||
# on-resume = "brightnessctl -rd asus::kbd_backlight";
|
||||
# }
|
||||
|
||||
# {
|
||||
# timeout = 60;
|
||||
# on-timeout = "brightnessctl -sd asus::kbd_backlight set 0";
|
||||
# on-resume = "brightnessctl -rd asus::kbd_backlight";
|
||||
# }
|
||||
# {
|
||||
# timeout = 80;
|
||||
# on-timeout = "brightnessctl -s set 0";
|
||||
# on-resume = "brightnessctl -r";
|
||||
# }
|
||||
|
||||
# {
|
||||
# timeout = 80;
|
||||
# on-timeout = "brightnessctl -s set 0";
|
||||
# on-resume = "brightnessctl -r";
|
||||
# }
|
||||
# {
|
||||
# timeout = 100;
|
||||
# on-timeout = "hyprctl dispatch dpms off ";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
|
||||
# {
|
||||
# timeout = 100;
|
||||
# on-timeout = "hyprctl dispatch dpms off ";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
# {
|
||||
# timeout = 150;
|
||||
# on-timeout = "systemctl suspend";
|
||||
# }
|
||||
{
|
||||
timeout = 300; # 5min
|
||||
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
}
|
||||
|
||||
# {
|
||||
# timeout = 150;
|
||||
# on-timeout = "systemctl suspend";
|
||||
# }
|
||||
{
|
||||
timeout = 300; # 5min
|
||||
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
}
|
||||
{
|
||||
timeout = 600; # 10min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 600; # 10min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
# {
|
||||
# timeout = 1800; # 30min
|
||||
# on-timeout = "systemctl hibernate";
|
||||
# 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.
|
||||
# }
|
||||
]
|
||||
else if hostname == "thor" then
|
||||
[
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "brightnessctl -s set 0";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
|
||||
# {
|
||||
# timeout = 1800; # 30min
|
||||
# on-timeout = "systemctl hibernate";
|
||||
# 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 = 400; # 10min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 450;
|
||||
on-timeout = "hyprctl dispatch dpms off ";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,75 +1,80 @@
|
||||
{ hostname, ... }:
|
||||
{
|
||||
imports =
|
||||
if hostname == "zion" then [
|
||||
./zion.nix
|
||||
if hostname == "zion" then
|
||||
[
|
||||
./zion.nix
|
||||
|
||||
./modules/adb.nix
|
||||
./modules/ananicy.nix
|
||||
# ./modules/bluetooth.nix
|
||||
./modules/boot.nix
|
||||
./modules/configuration.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/gaming.nix
|
||||
./modules/greetd.nix
|
||||
./modules/gsettings.nix
|
||||
# ./modules/kde.nix
|
||||
# ./modules/lanzaboot.nix
|
||||
./modules/network.nix
|
||||
./modules/nh.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/packages.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/printing.nix
|
||||
./modules/remote-builder.nix
|
||||
./modules/security.nix
|
||||
./modules/ssh.nix
|
||||
./modules/users.nix
|
||||
./modules/vm.nix
|
||||
]
|
||||
else if hostname == "thor" then [
|
||||
./thor.nix
|
||||
./modules/adb.nix
|
||||
./modules/ananicy.nix
|
||||
# ./modules/bluetooth.nix
|
||||
./modules/boot.nix
|
||||
./modules/configuration.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/gaming.nix
|
||||
./modules/greetd.nix
|
||||
./modules/gsettings.nix
|
||||
# ./modules/kde.nix
|
||||
# ./modules/lanzaboot.nix
|
||||
./modules/network.nix
|
||||
./modules/nh.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/packages.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/printing.nix
|
||||
./modules/remote-builder.nix
|
||||
./modules/security.nix
|
||||
./modules/ssh.nix
|
||||
./modules/users.nix
|
||||
./modules/vm.nix
|
||||
]
|
||||
else if hostname == "thor" then
|
||||
[
|
||||
./thor.nix
|
||||
|
||||
./modules/adb.nix
|
||||
./modules/ananicy.nix
|
||||
./modules/bluetooth.nix
|
||||
./modules/boot.nix
|
||||
./modules/configuration.nix
|
||||
./modules/distributed-builds.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/gaming.nix
|
||||
./modules/greetd.nix
|
||||
./modules/gsettings.nix
|
||||
# ./modules/kde.nix
|
||||
# ./modules/lanzaboot.nix
|
||||
./modules/network.nix
|
||||
./modules/nh.nix
|
||||
# ./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/packages.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/printing.nix
|
||||
./modules/security.nix
|
||||
./modules/ssh.nix
|
||||
./modules/users.nix
|
||||
./modules/vm.nix
|
||||
]
|
||||
else if hostname == "server" then [
|
||||
./server.nix
|
||||
./modules/adb.nix
|
||||
./modules/ananicy.nix
|
||||
./modules/bluetooth.nix
|
||||
./modules/boot.nix
|
||||
./modules/configuration.nix
|
||||
./modules/distributed-builds.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/gaming.nix
|
||||
./modules/greetd.nix
|
||||
./modules/gsettings.nix
|
||||
# ./modules/kde.nix
|
||||
# ./modules/lanzaboot.nix
|
||||
./modules/network.nix
|
||||
./modules/nh.nix
|
||||
# ./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/packages.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/printing.nix
|
||||
./modules/security.nix
|
||||
./modules/ssh.nix
|
||||
./modules/tlp.nix
|
||||
./modules/users.nix
|
||||
./modules/vm.nix
|
||||
]
|
||||
else if hostname == "server" then
|
||||
[
|
||||
./server.nix
|
||||
|
||||
./modules/nh.nix
|
||||
./modules/tlp.nix
|
||||
./modules/ssh.nix
|
||||
./modules/boot.nix
|
||||
./modules/users.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/system.nix
|
||||
./modules/network.nix
|
||||
./modules/configuration.nix
|
||||
#./modules/lanzaboot.nix
|
||||
]
|
||||
else [ ];
|
||||
./modules/nh.nix
|
||||
./modules/tlp.nix
|
||||
./modules/ssh.nix
|
||||
./modules/boot.nix
|
||||
./modules/users.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/system.nix
|
||||
./modules/network.nix
|
||||
./modules/configuration.nix
|
||||
#./modules/lanzaboot.nix
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user