mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-20 06:31:27 +01:00
- WA-017: keyd(1) documents `control = layer(control)` etc. as the default modifier bindings, so a keyd bump will never keep right-hand modifiers distinct; the passthrough is intentional config. Say so in peripherals.nix and drop the row. - WA-026: installOnHost + restarting microvm@<guest> is the fallback microvm.nix's own deploy.rebuild uses; only the in-place sshSwitch is broken, so the removal condition is now about that. - WA-023: locked versions are 2.35.3 (latest) and 2.34.9 (stable). Assisted-by: Claude Code (claude-opus-5-5)
84 lines
3.0 KiB
Nix
84 lines
3.0 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
#============================= Audio(PipeWire) =======================
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
# $ nix search wget
|
|
environment.systemPackages = with pkgs; [
|
|
pulseaudio # provides `pactl`, which is required by some apps(e.g. sonic-pi)
|
|
];
|
|
|
|
# PipeWire is a new low-level multimedia framework.
|
|
# It aims to offer capture and playback for both audio and video with minimal latency.
|
|
# It support for PulseAudio-, JACK-, ALSA- and GStreamer-based applications.
|
|
# PipeWire has a great bluetooth support, it can be a good alternative to PulseAudio.
|
|
# https://nixos.wiki/wiki/PipeWire
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
wireplumber.enable = true;
|
|
};
|
|
# rtkit is optional but recommended
|
|
security.rtkit.enable = true;
|
|
# Disable pulseaudio, it conflicts with pipewire too.
|
|
services.pulseaudio.enable = false;
|
|
|
|
#============================= Bluetooth =============================
|
|
|
|
# Pairing UI lives in Noctalia's bluetooth widget / control-center tab, which
|
|
# registers its own org.bluez pairing agent, so no blueman applet is needed.
|
|
# or you can use cli:
|
|
# $ bluetoothctl
|
|
# [bluetooth] # power on
|
|
# [bluetooth] # agent on
|
|
# [bluetooth] # default-agent
|
|
# [bluetooth] # scan on
|
|
# ...put device in pairing mode and wait [hex-address] to appear here...
|
|
# [bluetooth] # pair [hex-address]
|
|
# [bluetooth] # connect [hex-address]
|
|
# Bluetooth devices automatically connect with bluetoothctl as well:
|
|
# [bluetooth] # trust [hex-address]
|
|
hardware.bluetooth.enable = true;
|
|
|
|
#================================= Misc =================================
|
|
|
|
services = {
|
|
printing.enable = true; # Enable CUPS to print documents.
|
|
geoclue2.enable = true; # Enable geolocation services.
|
|
|
|
udev.packages = with pkgs; [
|
|
gnome-settings-daemon
|
|
# platformio # udev rules for platformio
|
|
# openocd # platformio needs these udev rules for rootless USB access
|
|
# openfpgaloader
|
|
];
|
|
|
|
# A key remapping daemon for linux.
|
|
# https://github.com/rvaiya/keyd
|
|
keyd = {
|
|
enable = true;
|
|
keyboards.default.settings = {
|
|
main = {
|
|
# overloads the capslock key to function as both escape (when tapped) and control (when held)
|
|
capslock = "overload(control, esc)";
|
|
esc = "capslock";
|
|
|
|
# keyd binds both sides of a modifier to one layer by design (keyd(1):
|
|
# `control = layer(control)`), so right-hand modifiers come out as
|
|
# their left counterparts; pin them to their own keycodes. Vinput's
|
|
# MenuKey is right Ctrl and Rime's right Shift switches CN/EN.
|
|
rightcontrol = "rightcontrol";
|
|
rightshift = "rightshift";
|
|
rightmeta = "rightmeta";
|
|
|
|
# Right Alt is AltGr, the third-level shift on many European layouts
|
|
# (e.g. `AltGr+2` is `@` in Spanish); keyd forwards it as-is.
|
|
rightalt = "layer(altgr)";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|