Compare commits
2 commits
d10761f8de
...
5c2a2c611b
Author | SHA1 | Date | |
---|---|---|---|
5c2a2c611b | |||
30021a9998 |
9 changed files with 193 additions and 42 deletions
|
@ -13,6 +13,30 @@
|
||||||
# optimize power usage
|
# optimize power usage
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
|
|
||||||
|
# prevent overheat
|
||||||
|
services.thermald.enable = true;
|
||||||
|
|
||||||
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
|
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||||
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||||
|
|
||||||
|
CPU_MIN_PERF_ON_AC = 0;
|
||||||
|
CPU_MAX_PERF_ON_AC = 100;
|
||||||
|
CPU_MIN_PERF_ON_BAT = 0;
|
||||||
|
CPU_MAX_PERF_ON_BAT = 20;
|
||||||
|
|
||||||
|
#Optional helps save long term battery health
|
||||||
|
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||||
|
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# optimize storage
|
# optimize storage
|
||||||
nix.optimise.automatic = true;
|
nix.optimise.automatic = true;
|
||||||
|
|
||||||
|
@ -26,6 +50,12 @@
|
||||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
services.logind.extraConfig = ''
|
||||||
|
# don’t shutdown when power button is short-pressed
|
||||||
|
HandlePowerKey=lock
|
||||||
|
'';
|
||||||
|
services.logind.lidSwitch = "lock";
|
||||||
|
|
||||||
networking.hostName = "absol";
|
networking.hostName = "absol";
|
||||||
# networking.wireless.enable = true;
|
# networking.wireless.enable = true;
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
@ -70,14 +100,13 @@
|
||||||
console.keyMap = "us";
|
console.keyMap = "us";
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
#services.avahi = {
|
services.avahi = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
# openFirewall = true;
|
openFirewall = true;
|
||||||
#};
|
};
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# drivers = [ pkgs.splix ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# bluetooth
|
# bluetooth
|
||||||
|
@ -118,6 +147,7 @@
|
||||||
variant = "macchiato";
|
variant = "macchiato";
|
||||||
};
|
};
|
||||||
in [
|
in [
|
||||||
|
texliveFull
|
||||||
# for connecting to nas
|
# for connecting to nas
|
||||||
nfs-utils
|
nfs-utils
|
||||||
|
|
||||||
|
@ -134,7 +164,7 @@
|
||||||
|
|
||||||
# deps for hyprland / eww
|
# deps for hyprland / eww
|
||||||
socat
|
socat
|
||||||
texliveFull
|
xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
34
absol/hypr/hypridle.conf
Normal file
34
absol/hypr/hypridle.conf
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
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 = 150 # 2.5min.
|
||||||
|
# on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||||
|
# on-resume = brightnessctl -r # monitor backlight restore.
|
||||||
|
#}
|
||||||
|
|
||||||
|
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
|
||||||
|
#listener {
|
||||||
|
# timeout = 150 # 2.5min.
|
||||||
|
# on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
|
||||||
|
# on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
|
||||||
|
#}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 300 # 5min
|
||||||
|
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 330 # 5.5min
|
||||||
|
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.
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 1800 # 30min
|
||||||
|
on-timeout = systemctl suspend # suspend pc
|
||||||
|
}
|
|
@ -110,6 +110,9 @@
|
||||||
|
|
||||||
# scratchpad
|
# scratchpad
|
||||||
"$mod, C, togglespecialworkspace, scratchpad"
|
"$mod, C, togglespecialworkspace, scratchpad"
|
||||||
|
|
||||||
|
# status bar
|
||||||
|
"$mod, T, exec, eww open --toggle top-bar"
|
||||||
];
|
];
|
||||||
bindm = [
|
bindm = [
|
||||||
"$mod, mouse:272, movewindow"
|
"$mod, mouse:272, movewindow"
|
||||||
|
@ -124,8 +127,11 @@
|
||||||
", XF86MonBrightnessDown, exec, brillo -q -U 5"
|
", XF86MonBrightnessDown, exec, brillo -q -U 5"
|
||||||
];
|
];
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"bash ~/Git/nixos/absol/hypr/start.sh"
|
"/home/leonv/Git/nixos/absol/hypr/killer.sh"
|
||||||
|
"/home/leonv/Git/nixos/absol/hypr/start.sh"
|
||||||
"hyprctl setcursor Bibata-Original-Classic 48"
|
"hyprctl setcursor Bibata-Original-Classic 48"
|
||||||
|
"systemctl --user import-environment"
|
||||||
|
"hypridle"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
70
absol/hypr/hyprlock.conf
Normal file
70
absol/hypr/hyprlock.conf
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
# GENERAL
|
||||||
|
general {
|
||||||
|
disable_loading_bar = true
|
||||||
|
hide_cursor = true
|
||||||
|
}
|
||||||
|
|
||||||
|
# BACKGROUND
|
||||||
|
background {
|
||||||
|
monitor =
|
||||||
|
path = /home/leonv/Git/nixos/absol/hypr/wallpaper.jpg
|
||||||
|
blur_passes = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
# TIME
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:30000] echo "$(date +"%R")"
|
||||||
|
# color = $text
|
||||||
|
font_size = 90
|
||||||
|
# font_family = $font
|
||||||
|
position = -130, -100
|
||||||
|
halign = right
|
||||||
|
valign = top
|
||||||
|
shadow_passes = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
# DATE
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
|
||||||
|
# color = $text
|
||||||
|
font_size = 25
|
||||||
|
# font_family = $font
|
||||||
|
position = -130, -250
|
||||||
|
halign = right
|
||||||
|
valign = top
|
||||||
|
shadow_passes = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
input-field {
|
||||||
|
monitor =
|
||||||
|
size = 200, 50
|
||||||
|
outline_thickness = 3
|
||||||
|
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
|
||||||
|
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
|
||||||
|
dots_center = false
|
||||||
|
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
|
||||||
|
outer_color = rgb(151515)
|
||||||
|
inner_color = rgb(200, 200, 200)
|
||||||
|
font_color = rgb(10, 10, 10)
|
||||||
|
fade_on_empty = true
|
||||||
|
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
|
||||||
|
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
|
||||||
|
hide_input = false
|
||||||
|
rounding = -1 # -1 means complete rounding (circle/oval)
|
||||||
|
check_color = rgb(204, 136, 34)
|
||||||
|
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
|
||||||
|
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
|
||||||
|
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
|
||||||
|
capslock_color = -1
|
||||||
|
numlock_color = -1
|
||||||
|
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
|
||||||
|
invert_numlock = false # change color if numlock is off
|
||||||
|
swap_font_color = false # see below
|
||||||
|
|
||||||
|
position = 0, -20
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
8
absol/hypr/killer.sh
Executable file
8
absol/hypr/killer.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
sleep 1
|
||||||
|
killall -e xdg-desktop-portal-hyprland
|
||||||
|
killall -e xdg-desktop-portal-wlr
|
||||||
|
killall xdg-desktop-portal
|
||||||
|
/usr/lib/xdg-desktop-portal-hyprland &
|
||||||
|
sleep 2
|
||||||
|
/usr/lib/xdg-desktop-portal &
|
|
@ -6,8 +6,5 @@
|
||||||
swww init
|
swww init
|
||||||
swww img /home/leonv/Git/nixos/absol/hypr/wallpaper.jpg
|
swww img /home/leonv/Git/nixos/absol/hypr/wallpaper.jpg
|
||||||
|
|
||||||
eww daemon
|
|
||||||
eww open top-bar
|
|
||||||
|
|
||||||
# notification
|
# notification
|
||||||
mako
|
mako &
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./../common
|
./../common
|
||||||
./hypr/hyprland.nix
|
./hypr/hyprland.nix
|
||||||
# ./eww
|
./eww
|
||||||
];
|
];
|
||||||
/* The home.stateVersion option does not have a default and must be set */
|
/* The home.stateVersion option does not have a default and must be set */
|
||||||
home.stateVersion = "24.05";
|
home.stateVersion = "24.05";
|
||||||
|
@ -62,6 +62,8 @@
|
||||||
qimgv
|
qimgv
|
||||||
playerctl
|
playerctl
|
||||||
hyprpicker
|
hyprpicker
|
||||||
|
hypridle
|
||||||
|
hyprlock
|
||||||
wev
|
wev
|
||||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
||||||
bluez
|
bluez
|
||||||
|
@ -91,6 +93,10 @@
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
xdg.configHome = /home/leonv/.config;
|
||||||
|
xdg.configFile."hypr/hypridle.conf".source = ./hypr/hypridle.conf;
|
||||||
|
xdg.configFile."hypr/hyprlock.conf".source = ./hypr/hyprlock.conf;
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
54
flake.lock
54
flake.lock
|
@ -20,11 +20,11 @@
|
||||||
"cask-fonts": {
|
"cask-fonts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714444667,
|
"lastModified": 1715569399,
|
||||||
"narHash": "sha256-eWM0uB/QiptHbIzH+8yzsXFOWRX48yooFWOreSDfv/g=",
|
"narHash": "sha256-bGbC5sO3wN7UWVlaCoUUnlpp24P/9kV34LaBjvXQP9Y=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask-fonts",
|
"repo": "homebrew-cask-fonts",
|
||||||
"rev": "93bac1ec51db32b671b3c1cce12a4b9dfbd95652",
|
"rev": "fe9faf2469a035266992c35bed50e082420679f8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"cl-nix-lite": {
|
"cl-nix-lite": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698901928,
|
"lastModified": 1709357207,
|
||||||
"narHash": "sha256-gMHZybEVA3uMOBu1483gXfvUqpv4Qn7GJs3ZfCQYxpc=",
|
"narHash": "sha256-YZgXj6oL2Y/zDkSkGcoacpQPRLiYM8KeEB68CUs2irc=",
|
||||||
"owner": "hraban",
|
"owner": "hraban",
|
||||||
"repo": "cl-nix-lite",
|
"repo": "cl-nix-lite",
|
||||||
"rev": "9ad861b45bda7f59eba5ad1b43565a03c7c58553",
|
"rev": "f55d263b30a601b1b4dd61b7c8787e97510f4018",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -91,11 +91,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1709126324,
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -128,11 +128,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714430505,
|
"lastModified": 1715486357,
|
||||||
"narHash": "sha256-SSJQ/KOy8uISnoZgqDoRha7g7PFLSFP/BtMWm0wUz8Q=",
|
"narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f8e6694edabe4aaa7a85aac47b43ea5d978b116d",
|
"rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -144,11 +144,11 @@
|
||||||
"homebrew-cask": {
|
"homebrew-cask": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714451093,
|
"lastModified": 1715577907,
|
||||||
"narHash": "sha256-eWF+DoscTe1q+V7AK+JyXyI78iPSoKC5YCHNA74e7vI=",
|
"narHash": "sha256-K4GPPLjVdDOZZRE50tVwqLh96+WGSWnO9uZkuut/5vs=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask",
|
"repo": "homebrew-cask",
|
||||||
"rev": "2645f5afac026403bc02596590f2fc56ede4df05",
|
"rev": "3c5e18462378b0a02c110600db381ac5aefa64b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -160,11 +160,11 @@
|
||||||
"homebrew-core": {
|
"homebrew-core": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714451504,
|
"lastModified": 1715572697,
|
||||||
"narHash": "sha256-1G1ksvFwzg1i9ZYLACtVIS/0EAop0tiAeexfD01pHyc=",
|
"narHash": "sha256-yd2rB2muS/hD/JwhUioGzGssLVE+AnECSWeVlmBQq4k=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-core",
|
"repo": "homebrew-core",
|
||||||
"rev": "b376432848daaf1243709cee4c835c2a7c6397c1",
|
"rev": "8e99417b09acd7f3421aa539732f85107f6f64ff",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -201,11 +201,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707183497,
|
"lastModified": 1710104942,
|
||||||
"narHash": "sha256-K6LVwmM32uUEYXpDFCnwNqOyi863FRXR6KFq87X3iHg=",
|
"narHash": "sha256-YrzF8P9Hi4CHky2z3hTKdPn/Zks+n4O4RkbSg75QhVc=",
|
||||||
"owner": "hraban",
|
"owner": "hraban",
|
||||||
"repo": "mac-app-util",
|
"repo": "mac-app-util",
|
||||||
"rev": "95d9c38d6dec0296d73929f63a7de130f435437b",
|
"rev": "b2d3667f3b8d650310e55b38d3c4a5f35949e1f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -255,11 +255,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698553279,
|
"lastModified": 1710066242,
|
||||||
"narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=",
|
"narHash": "sha256-bO7kahLdawW7rBqUTfWgf9mdPYrnOo5DGvWRJa9N8Do=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035",
|
"rev": "db339f1706f555794b71aa4eb26a5a240fb6a599",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -341,11 +341,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714253743,
|
"lastModified": 1715447595,
|
||||||
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
|
"narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
|
"rev": "062ca2a9370a27a35c524dc82d540e6e9824b652",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
Loading…
Reference in a new issue