mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 22:00:14 +00:00
separate hardware
This commit is contained in:
11
modules/hardware/audio.nix
Normal file
11
modules/hardware/audio.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
pamixer # Audio control
|
||||
];
|
||||
|
||||
}
|
13
modules/hardware/keyboard.nix
Normal file
13
modules/hardware/keyboard.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ ... }: {
|
||||
|
||||
services.xserver = {
|
||||
# Keyboard responsiveness
|
||||
autoRepeatDelay = 250;
|
||||
autoRepeatInterval = 40;
|
||||
|
||||
# Configure keymap in X11
|
||||
layout = "us";
|
||||
xkbOptions = "eurosign:e,caps:swapescape";
|
||||
};
|
||||
|
||||
}
|
46
modules/hardware/monitors.nix
Normal file
46
modules/hardware/monitors.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# Timezone required for Redshift schedule
|
||||
imports = [ ../system/timezone.nix ];
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
ddcutil # Monitor brightness control
|
||||
];
|
||||
|
||||
# Reduce blue light at night
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
brightness = {
|
||||
day = "1.0";
|
||||
night = "1.0";
|
||||
};
|
||||
};
|
||||
|
||||
# Detect monitors (brightness)
|
||||
hardware.i2c.enable = true;
|
||||
|
||||
services.xserver.displayManager = {
|
||||
|
||||
# Put the login screen on the left monitor
|
||||
lightdm.greeters.gtk.extraConfig = ''
|
||||
active-monitor=0
|
||||
'';
|
||||
|
||||
# Set up screen position and rotation
|
||||
setupCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 \
|
||||
--mode 1920x1200 \
|
||||
--pos 1920x0 \
|
||||
--rotate left \
|
||||
--output HDMI-0 \
|
||||
--primary \
|
||||
--mode 1920x1080 \
|
||||
--pos 0x559 \
|
||||
--rotate normal \
|
||||
--output DVI-0 --off \
|
||||
--output DVI-1 --off \
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
17
modules/hardware/mouse.nix
Normal file
17
modules/hardware/mouse.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }: {
|
||||
|
||||
# Mouse config
|
||||
services.ratbagd.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libratbag # Mouse adjustments
|
||||
piper # Mouse adjustments GUI
|
||||
];
|
||||
|
||||
services.xserver.libinput.mouse = {
|
||||
# Disable mouse acceleration
|
||||
accelProfile = "flat";
|
||||
accelSpeed = "1.15";
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user