mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 20:25:38 +00:00
separate hardware
This commit is contained in:
parent
2a5c896322
commit
992496b1f0
@ -38,11 +38,15 @@
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
./nixos/configuration.nix
|
|
||||||
./nixos/hardware-configuration.nix
|
./nixos/hardware-configuration.nix
|
||||||
|
./nixos/configuration.nix
|
||||||
./nixos/home.nix
|
./nixos/home.nix
|
||||||
./modules/desktop/xorg.nix
|
./modules/desktop/xorg.nix
|
||||||
./modules/desktop/i3.nix
|
./modules/desktop/i3.nix
|
||||||
|
./modules/hardware/mouse.nix
|
||||||
|
./modules/hardware/keyboard.nix
|
||||||
|
./modules/hardware/monitors.nix
|
||||||
|
./modules/hardware/audio.nix
|
||||||
./modules/system/timezone.nix
|
./modules/system/timezone.nix
|
||||||
./modules/system/doas.nix
|
./modules/system/doas.nix
|
||||||
./modules/system/user.nix
|
./modules/system/user.nix
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
{ ... }: {
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
services.xserver.windowManager = { i3 = { enable = true; }; };
|
services.xserver.windowManager = { i3 = { enable = true; }; };
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dmenu # Launcher
|
||||||
|
feh # Wallpaper
|
||||||
|
playerctl # Media control
|
||||||
|
polybarFull # Polybar + PulseAudio
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,53 +1,29 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, gui, ... }: {
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = gui;
|
||||||
|
|
||||||
# Enable touchpad support
|
# Enable touchpad support
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
|
|
||||||
# Disable mouse acceleration
|
|
||||||
libinput.mouse.accelProfile = "flat";
|
|
||||||
libinput.mouse.accelSpeed = "1.15";
|
|
||||||
|
|
||||||
# Keyboard responsiveness
|
|
||||||
autoRepeatDelay = 250;
|
|
||||||
autoRepeatInterval = 40;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
layout = "us";
|
|
||||||
xkbOptions = "eurosign:e,caps:swapescape";
|
|
||||||
|
|
||||||
# Login screen
|
# Login screen
|
||||||
displayManager = {
|
displayManager = {
|
||||||
lightdm = {
|
lightdm = {
|
||||||
enable = true;
|
enable = gui;
|
||||||
|
|
||||||
# Make the login screen dark
|
# Make the login screen dark
|
||||||
greeters.gtk.theme.name = "Adwaita-dark";
|
greeters.gtk.theme.name = "Adwaita-dark";
|
||||||
|
|
||||||
# Put the login screen on the left monitor
|
|
||||||
greeters.gtk.extraConfig = ''
|
|
||||||
active-monitor=0
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
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 \
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[
|
||||||
|
xclip # Clipboard
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -22,13 +22,6 @@
|
|||||||
networking.interfaces.enp0s31f6.useDHCP = true;
|
networking.interfaces.enp0s31f6.useDHCP = true;
|
||||||
networking.interfaces.wlp3s0.useDHCP = true;
|
networking.interfaces.wlp3s0.useDHCP = true;
|
||||||
|
|
||||||
# Mouse config
|
|
||||||
services.ratbagd.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = true;
|
|
||||||
|
|
||||||
# Install fonts
|
# Install fonts
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
font.package # Used for Vim and Terminal
|
font.package # Used for Vim and Terminal
|
||||||
@ -39,36 +32,7 @@
|
|||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ fish git vim wget curl ];
|
||||||
fish
|
|
||||||
git
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
xclip # Clipboard
|
|
||||||
pamixer # Audio control
|
|
||||||
dmenu # Launcher
|
|
||||||
feh # Wallpaper
|
|
||||||
playerctl # Media control
|
|
||||||
polybarFull # Polybar + PulseAudio
|
|
||||||
ddcutil # Monitor brightness control
|
|
||||||
|
|
||||||
# Mouse config
|
|
||||||
libratbag # Mouse adjustments
|
|
||||||
piper # Mouse adjustments GUI
|
|
||||||
];
|
|
||||||
|
|
||||||
# Reduce blue light at night
|
|
||||||
services.redshift = {
|
|
||||||
enable = true;
|
|
||||||
brightness = {
|
|
||||||
day = "1.0";
|
|
||||||
night = "1.0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Detect monitors (brightness)
|
|
||||||
hardware.i2c.enable = true;
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
|
Loading…
Reference in New Issue
Block a user