Set up wluma

This commit is contained in:
Kiana Sheibani 2024-06-18 22:20:22 -04:00
parent e763b564f0
commit da26a63998
4 changed files with 59 additions and 18 deletions

View file

@ -52,8 +52,8 @@ in
users.users.${username} = {
isNormalUser = true;
description = fullname;
extraGroups = [ "wheel" "networkmanager" ]
++ lib.optionals isMobile [ "dialout" "feedbackd" "video" ];
extraGroups = [ "wheel" "networkmanager" "video" ]
++ lib.optionals isMobile [ "dialout" "feedbackd" ];
shell = pkgs.fish;
inherit hashedPassword;
};

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs;
let aspell' = aspellWithDicts.override {
@ -35,6 +35,7 @@
graphviz
texlive.combined.scheme-full
aspell'
nil
];
@ -58,4 +59,13 @@
keep-derivations = true
keep-outputs = true
'';
# WLuma
# services.udev.extraRules = let core = exe: lib.getExe' pkgs.coreutils exe; in ''
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${core "chgrp"} video /sys/class/backlight/%k/brightness"
# ACTION=="add", SUBSYSTEM=="backlight", RUN+="${core "chmod"} g+w /sys/class/backlight/%k/brightness"
# ACTION=="add", SUBSYSTEM=="leds", RUN+="${core "chgrp"} video /sys/class/leds/%k/brightness"
# ACTION=="add", SUBSYSTEM=="leds", RUN+="${core "chmod"} g+w /sys/class/leds/%k/brightness"
# '';
}

View file

@ -47,7 +47,7 @@ in {
Unit = {
Description = "Inhibit Wayland idling when media is played through pipewire";
Documentation= "https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit";
Documentation = "https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
ConditionEnvironment = "WAYLAND_DISPLAY";

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }:
{ pkgs, lib, config, ... }:
{
home.packages = with pkgs; [
wl-clipboard
@ -9,20 +9,18 @@
imv
];
xdg.configFile = {
"swaynag/config".text = ''
font=JetBrainsMono 10
layer=top
xdg.configFile."swaynag/config".text = ''
font=JetBrainsMono 10
layer=top
[exit]
background=111320D0
text=a9b1d6
border-bottom=7BC5E4
border-bottom-size=1
button-background=282E49F0
button-border-size=2
'';
};
[exit]
background=111320D0
text=a9b1d6
border-bottom=7BC5E4
border-bottom-size=1
button-background=282E49F0
button-border-size=2
'';
# Hyprlock
@ -142,4 +140,37 @@
progress-color=source #a08348
'';
};
# WLuma
# systemd.user.services.wluma = lib.mkIf (config.platform == "laptop") {
# Install.WantedBy = [ "graphical-session.target" ];
# Unit = {
# Description = "Adjust screen brightness based on screen contents and ambient lighting";
# Documentation = "https://github.com/maximbaz/wluma";
# After = [ "graphical-session-pre.target" ];
# PartOf = [ "graphical-session.target" ];
# ConditionEnvironment = "WAYLAND_DISPLAY";
# };
# Service = {
# ExecStart = "${lib.getExe pkgs.wluma}";
# Restart = "always";
# RestartSec = "5";
# PrivateNetwork = "true";
# PrivateMounts = "false";
# };
# };
# xdg.configFile."wluma/config.toml".text = ''
# [als.iio]
# path = "/sys/bus/iio/devices"
# thresholds = { 0 = "night", 20 = "dark", 80 = "dim", 250 = "normal", 500 = "bright", 800 = "outdoors" }
# [[output.backlight]]
# name = "eDP-1"
# path = "/sys/class/backlight/intel_backlight"
# capturer = "wlroots"
# '';
}