brightness control, swayidle

This commit is contained in:
Vinzenz Schroeter 2025-03-17 21:49:44 +01:00
parent c3c2c1ad6d
commit 06886d02dc
5 changed files with 63 additions and 23 deletions

View file

@ -16,6 +16,7 @@
"adbusers" "adbusers"
"kvm" "kvm"
"input" "input"
"video"
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
autoSubUidGidRange = true; autoSubUidGidRange = true;

View file

@ -1,8 +1,13 @@
{ pkgs, ... }: {
pkgs,
lib,
devices,
config,
...
}:
{ {
config = { config = {
home.sessionVariables.NIXOS_OZONE_WL = "1"; home.sessionVariables.NIXOS_OZONE_WL = "1";
home.packages = with pkgs; [ home.packages = with pkgs; [
xwayland-satellite xwayland-satellite
alacritty alacritty
@ -24,8 +29,6 @@
}; };
}; };
# services.swayidle.enable = true;
programs.niri.settings = { programs.niri.settings = {
input.keyboard.xkb.layout = "de"; input.keyboard.xkb.layout = "de";
@ -56,7 +59,7 @@
# Suggested binds for running programs: terminal, app launcher, screen locker. # Suggested binds for running programs: terminal, app launcher, screen locker.
"Mod+T".action.spawn = "alacritty"; "Mod+T".action.spawn = "alacritty";
"Mod+D".action.spawn = "fuzzel"; "Mod+D".action.spawn = "fuzzel";
"Super+Alt+L".action.spawn = "swaylock"; "Super+Alt+L".action.spawn = "${config.programs.swaylock.package}/bin/swaylock";
# You can also use a shell. Do this if you need pipes, multiple commands, etc. # You can also use a shell. Do this if you need pipes, multiple commands, etc.
# Note: the entire command goes as a single argument in the end. # Note: the entire command goes as a single argument in the end.

View file

@ -1,21 +1,40 @@
# based on https://codeberg.org/kiara/cfg/src/commit/b9c472acd78c9c08dfe8b6a643c5c82cc5828433/home-manager/kiara/swaylock.nix# # based on https://codeberg.org/kiara/cfg/src/commit/b9c472acd78c9c08dfe8b6a643c5c82cc5828433/home-manager/kiara/swaylock.nix#
{ pkgs, ... }: { pkgs, config, ... }:
{ {
programs.swaylock = { config = {
enable = true; programs.swaylock = {
package = pkgs.swaylock-effects; enable = true;
# https://github.com/jirutka/swaylock-effects/blob/master/swaylock.1.scd package = pkgs.swaylock-effects;
settings = { # https://github.com/jirutka/swaylock-effects/blob/master/swaylock.1.scd
screenshot = true; settings = {
effect-blur = "9x9"; screenshot = true;
effect-vignette = "0.5:0.5"; effect-blur = "9x9";
fade-in = 0.5; effect-vignette = "0.2:0.2";
font-size = 75; fade-in = 0.5;
indicator-caps-lock = true; font-size = 75;
clock = true; indicator-caps-lock = true;
indicator-radius = 400; clock = true;
show-failed-attempts = true; indicator-radius = 400;
ignore-empty-password = true; show-failed-attempts = true;
ignore-empty-password = true;
grace = 2;
color = "000000";
indicator-thickness = 20;
};
};
services.swayidle = {
enable = true;
timeouts = [
{
timeout = 60;
command = "${config.programs.swaylock.package}/bin/swaylock";
}
#{
# timeout = 90;
# command = "${pkgs.systemd}/bin/systemctl suspend";
#}
];
}; };
}; };
} }

View file

@ -1,4 +1,9 @@
{ pkgs, device, ... }: {
pkgs,
device,
config,
...
}:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
waybar waybar
@ -8,6 +13,7 @@
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true;
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
@ -105,6 +111,8 @@
backlight = { backlight = {
device = "intel_backlight"; device = "intel_backlight";
format = "{percent}% "; format = "{percent}% ";
on-scroll-down = "light -U 1";
on-scroll-up = "light -A 1";
}; };
cpu = { cpu = {
interval = 1; interval = 1;

View file

@ -27,6 +27,15 @@
# ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key''
#]; #];
programs.adb.enable = true; programs = {
adb.enable = true;
light = {
enable = true;
brightnessKeys = {
enable = true;
step = 5;
};
};
};
}; };
} }