First hikari specific configuration
Add a way to detect the current system.
This commit is contained in:
parent
54622867ba
commit
6d76ce80a6
3
home/packages/lib/default.nix
Normal file
3
home/packages/lib/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
onHikari = _: builtins.readFile(/etc/hostname) == "hikari\n";
|
||||
}
|
|
@ -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
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue