screen and power mgmt

This commit is contained in:
Semere Meharena Mebrahtom 2026-07-19 12:10:00 +02:00
parent c04b4f777c
commit ee4bbcf26b
Signed by: semere
GPG key ID: 7FC937214DF30488
2 changed files with 63 additions and 0 deletions

View file

@ -34,6 +34,7 @@ in
hardware.graphics.enable = true;
security.polkit.enable = true;
security.pam.services.swaylock = {};
environment.systemPackages = with pkgs; [
pamixer
@ -44,6 +45,9 @@ in
foot
firefox
tor-browser
grim
slurp
wlopm
];
home-manager.users."${userVars.username}" = {
@ -55,6 +59,62 @@ in
};
};
};
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
clock = true;
indicator = true;
screenshots = true;
effect-blur = "7x5";
effect-vignette = "0.5:0.5";
ring-color = "b085f5";
key-hl-color = "5e35b1";
line-color = "00000000";
inside-color = "00000088";
separator-color = "00000000";
fade-in = 0.2;
};
};
services.swayidle = {
enable = true;
events = {
before-sleep = "${pkgs.swaylock-effects}/bin/swaylock -f";
lock = "${pkgs.swaylock-effects}/bin/swaylock -f";
};
timeouts = [
{ timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -f"; }
{ timeout = 600; command = "${pkgs.wlopm}/bin/wlopm --off '*'"; resumeCommand = "${pkgs.wlopm}/bin/wlopm --on '*'"; }
];
};
services.wlsunset = {
enable = true;
latitude = "52.5";
longitude = "13.4";
temperature = {
day = 6500;
night = 4000;
};
};
services.fnott = {
enable = true;
settings = {
main = {
font = "JetBrainsMono Nerd Font:size=11";
background = "1a1a24e0";
border-color = "b085f5ff";
border-size = 2;
padding-vertical = 12;
padding-horizontal = 16;
summary-color = "ffffffff";
body-color = "e0e0e0ff";
};
};
};
};
};
}