-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refac(boar): DDCCI loading (but no cigar yet)
- Loading branch information
Showing
7 changed files
with
39 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /run/current-system/sw/bin/bash | ||
set -euo pipefail | ||
|
||
# See https://discourse.nixos.org/t/brightness-control-of-external-monitors-with-ddcci-backlight/8639/10 | ||
|
||
sleep 5 | ||
|
||
echo Trying to attach ddcci to i2c-7 | ||
counter=10 | ||
while [ $counter -gt 0 ]; do | ||
if ddcutil getvcp 10 -b 7; then | ||
echo ddcci 0x37 >/sys/bus/i2c/devices/i2c-7/new_device | ||
break | ||
fi | ||
sleep 1 | ||
counter=$((counter - 1)) | ||
done | ||
|
||
# echo Trying to attach ddcci to i2c-5 | ||
# counter=10 | ||
# while [ $counter -gt 0 ]; do | ||
# if ddcutil getvcp 10 -b 5; then | ||
# echo ddcci 0x37 >/sys/bus/i2c/devices/i2c-5/new_device | ||
# break | ||
# fi | ||
# sleep 1 | ||
# counter=$((counter - 1)) | ||
# done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
{pkgs, ...}: { | ||
# Controlling external screens | ||
services.ddccontrol.enable = true; | ||
hardware.i2c.enable = true; | ||
users.users.farlion.extraGroups = ["i2c"]; | ||
|
||
{...}: { | ||
# For redshift | ||
services.geoclue2.enable = true; | ||
} |