First hikari specific configuration

Add a way to detect the current system.
This commit is contained in:
Daniel Siepmann 2022-11-02 22:13:19 +01:00
parent 54622867ba
commit 6d76ce80a6
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 23 additions and 11 deletions

View file

@ -0,0 +1,3 @@
{
onHikari = _: builtins.readFile(/etc/hostname) == "hikari\n";
}

View file

@ -1,14 +1,29 @@
{ config, pkgs }:
{
let
ownLib = import ./packages/lib;
initExtraHikari = ''
xrandr --auto --output eDP-1 --brightness 1 --scale 1.25x1.25
# Use natural scrolling for trackpad
xinput --set-prop bcm5974 'libinput Natural Scrolling Enabled' 1
'';
initExtraHikari2 = ''
xrandr --auto --brightness 1
# Enable tapping instead of phsyical click
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Tapping Enabled' 1
# Use natural scrolling for trackpad
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
'';
in {
enable = true;
numlock.enable = true;
initExtra = ''
# Auto setup output and set brightness
xrandr --auto --brightness 1
initExtra = (if ownLib.onHikari {} then initExtraHikari else initExtraHikari2) + ''
# Set backlight of output
xbacklight -set 25
@ -18,12 +33,6 @@
# Disable screen saver
xset s off
# Enable tapping instead of phsyical click
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Tapping Enabled' 1
# Use natural scrolling for trackpad
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
# Increase mouse speed
xinput --set-prop 13 'libinput Accel Speed' 1
'';