72 lines
2.2 KiB
Nix
72 lines
2.2 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
config = lib.mkIf config.frogeye.desktop.xorg {
|
|
boot.kernelModules = [ "i2c-dev" ]; # Allows using ddcutil
|
|
programs.sway.enable = true;
|
|
security.rtkit.enable = true; # Recommended for pipewire
|
|
services = {
|
|
blueman.enable = true;
|
|
greetd = {
|
|
enable = true;
|
|
settings = rec {
|
|
# Automatically log in as myself.
|
|
# Because everything is encrypted and I'm the only user, this is fine.
|
|
initial_session = {
|
|
command = "${lib.getExe config.programs.sway.package} --unsupported-gpu";
|
|
# --unsupported-gpu is for curacao (DisplayLink)
|
|
user = "geoffrey";
|
|
};
|
|
default_session = initial_session;
|
|
};
|
|
};
|
|
udev.packages = with pkgs; [ ddcutil ]; # TODO Doesn't seem to help
|
|
pipewire = {
|
|
enable = true;
|
|
alsa = {
|
|
enable = true;
|
|
support32Bit = true;
|
|
};
|
|
pulse.enable = true; # Required for a lot of apps, probably
|
|
wireplumber.extraConfig = {
|
|
# Using mains-powered speakers
|
|
# https://wiki.archlinux.org/title/PipeWire#Noticeable_audio_delay_or_audible_pop/crack_when_starting_playback
|
|
preventGetTogetherDuoFromShuttingDown."monitor.bluez.rules" = [
|
|
{
|
|
matches = [ { "node.name" = "~bluez_output.41_42_D2_B5_13_72.*"; } ];
|
|
actions.update-props = {
|
|
"session.suspend-timeout-seconds" = 0;
|
|
"dither.method" = "wannamaker3";
|
|
"dither.noise" = 4;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
# Keyboard layout
|
|
xserver.xkb.extraLayouts.us_qwerty-fr = {
|
|
description = "QWERTY-fr";
|
|
languages = [
|
|
"fre"
|
|
"eng"
|
|
];
|
|
symbolsFile = "${
|
|
pkgs.qwerty-fr.overrideAttrs (old: {
|
|
patches = (old.patches or [ ]) ++ [ ./qwerty-fr-keypad.diff ];
|
|
# TODO Does this work?
|
|
})
|
|
}/share/X11/xkb/symbols/us_qwerty-fr";
|
|
};
|
|
};
|
|
|
|
# Enable sound & bluetooth
|
|
hardware.bluetooth.enable = true;
|
|
|
|
# So we can use gnome3 pinentry flavour
|
|
services.dbus.packages = [ pkgs.gcr ];
|
|
};
|
|
}
|