From 552683a2b5e7bdd7b0921b29df077cdb3c5ec6ec Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 11 Feb 2016 17:06:50 +0100 Subject: ma: refactoring --- 2configs/base-gui.nix | 2 ++ 2configs/hw/tp-x220.nix | 14 ++++++++++---- 2configs/hw/tp-x2x0.nix | 18 +++++++++--------- 2configs/main-laptop.nix | 5 ++++- 2configs/printer.nix | 4 ++++ 5 files changed, 29 insertions(+), 14 deletions(-) (limited to '2configs') diff --git a/2configs/base-gui.nix b/2configs/base-gui.nix index 1d6750284..da3ad4afe 100644 --- a/2configs/base-gui.nix +++ b/2configs/base-gui.nix @@ -44,6 +44,8 @@ in displayManager.auto.user = mainUser; desktopManager.xterm.enable = false; }; + # lid switch is handled via button presses + services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore"; nixpkgs.config.packageOverrides = pkgs: rec { awesome = pkgs.stdenv.lib.overrideDerivation pkgs.awesome (oldAttrs : { postFixup = '' diff --git a/2configs/hw/tp-x220.nix b/2configs/hw/tp-x220.nix index f03922150..0c90e6fde 100644 --- a/2configs/hw/tp-x220.nix +++ b/2configs/hw/tp-x220.nix @@ -16,10 +16,16 @@ with lib; }; services.xserver.displayManager.sessionCommands ='' - xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1 - xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2 - xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 - # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 + xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1 + xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2 + xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 + # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 + ''; + + # enable HDMI output switching with pulseaudio + hardware.pulseaudio.configFile = pkgs.writeText "pulse-default-pa" '' + ${builtins.readFile "${config.hardware.pulseaudio.package}/etc/pulse/default.pa"} + load-module module-alsa-sink device=hw:0,3 sink_properties=device.description="HDMIOutput" sink_name="HDMI" ''; } diff --git a/2configs/hw/tp-x2x0.nix b/2configs/hw/tp-x2x0.nix index ebc72a06e..1033f69c0 100644 --- a/2configs/hw/tp-x2x0.nix +++ b/2configs/hw/tp-x2x0.nix @@ -18,18 +18,18 @@ with lib; sensitivity = 220; speed = 220; emulateWheel = true; - }; + }; services.tlp.enable = true; services.tlp.extraConfig = '' - START_CHARGE_THRESH_BAT0=80 - - CPU_SCALING_GOVERNOR_ON_AC=performance - CPU_SCALING_GOVERNOR_ON_BAT=ondemand - CPU_MIN_PERF_ON_AC=0 - CPU_MAX_PERF_ON_AC=100 - CPU_MIN_PERF_ON_BAT=0 - CPU_MAX_PERF_ON_BAT=30 + START_CHARGE_THRESH_BAT0=80 + + CPU_SCALING_GOVERNOR_ON_AC=performance + CPU_SCALING_GOVERNOR_ON_BAT=ondemand + CPU_MIN_PERF_ON_AC=0 + CPU_MAX_PERF_ON_AC=100 + CPU_MIN_PERF_ON_BAT=0 + CPU_MAX_PERF_ON_BAT=30 ''; } diff --git a/2configs/main-laptop.nix b/2configs/main-laptop.nix index b725f661d..32f194e6b 100644 --- a/2configs/main-laptop.nix +++ b/2configs/main-laptop.nix @@ -3,6 +3,7 @@ # stuff for the main laptop # this is pretty much nice-to-have and does # not fit into base-gui +# TODO split generic desktop stuff and laptop-specifics like lidswitching with lib; { @@ -17,8 +18,10 @@ with lib; chromium keepassx ntfs3g + at_spi2_core + gnome3.dconf virtmanager - at_spi2_core # dep for virtmanager? + krebspaste ]; services.redshift = { diff --git a/2configs/printer.nix b/2configs/printer.nix index 35ad54bd9..d288748f9 100644 --- a/2configs/printer.nix +++ b/2configs/printer.nix @@ -7,4 +7,8 @@ pkgs.samsungUnifiedLinuxDriver ]; }; + + # scanners are printers just in reverse anyway + hardware.sane.enable = true; + hardware.sane.extraBackends = [ pkgs.samsungUnifiedLinuxDriver ]; } -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/c4100000.lock: No such file or directory (2)