90 lines
2.1 KiB
Nix
90 lines
2.1 KiB
Nix
# Baseline configuration for all desktop-class systems (including
|
|
# laptops).
|
|
|
|
{ ... }: {
|
|
imports = [
|
|
./desktop-packages.nix
|
|
./ghostty.nix
|
|
];
|
|
|
|
services.xserver = {
|
|
displayManager = {
|
|
gdm = {
|
|
enable = true;
|
|
wayland = false;
|
|
};
|
|
};
|
|
enable = true;
|
|
windowManager = {
|
|
# stumpwm is still on 24.05 / v2.4.10; but NixOS
|
|
# is using v2.5.4.
|
|
#stumpwm.enable = true;
|
|
i3.enable = true;
|
|
};
|
|
xkb = {
|
|
layout = "us";
|
|
options = "ctrl:swapcaps,compose:ralt";
|
|
};
|
|
};
|
|
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
|
services.libinput = {
|
|
enable = true;
|
|
mouse.naturalScrolling = true;
|
|
touchpad.naturalScrolling = true;
|
|
};
|
|
|
|
console.useXkbConfig = true;
|
|
|
|
# Enable CUPS to print documents.
|
|
services.printing.enable = true;
|
|
|
|
# Enable sound with pipewire.
|
|
services.pulseaudio.enable = false;
|
|
security.rtkit.enable = true;
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
|
|
# Enable Bluetooth.
|
|
hardware.bluetooth = {
|
|
enable = true;
|
|
powerOnBoot = true;
|
|
settings = {
|
|
General = {
|
|
# Shows battery charge of connected devices on supported
|
|
# Bluetooth adapters. Defaults to 'false'.
|
|
Experimental = true;
|
|
# When enabled other devices can connect faster to us, however
|
|
# the tradeoff is increased power consumption. Defaults to
|
|
# 'false'.
|
|
FastConnectable = true;
|
|
};
|
|
Policy = {
|
|
# Enable all controllers when they are found. This includes
|
|
# adapters present on start as well as adapters that are plugged
|
|
# in later on. Defaults to 'true'.
|
|
AutoEnable = true;
|
|
};
|
|
};
|
|
};
|
|
services.blueman.enable = true;
|
|
|
|
|
|
services.udev.extraRules = ''
|
|
ACTION=="add", SUBSYSTEM=="backlight", GROUP="video", MODE="0660"
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
|
'';
|
|
|
|
services.avahi = {
|
|
enable = true;
|
|
publish = {
|
|
enable = true;
|
|
};
|
|
};
|
|
}
|