dotfiles/os/desktop/default.nix

76 lines
2.4 KiB
Nix
Raw Normal View History

2023-11-22 14:05:48 +01:00
{ pkgs, lib, config, ... }:
2023-10-22 22:27:58 +02:00
{
2023-11-22 14:05:48 +01:00
config = lib.mkIf config.frogeye.desktop.xorg {
boot.kernelModules = [ "i2c-dev" ]; # Allows using ddcutil
security.rtkit.enable = true; # Recommended for pipewire
2023-12-16 17:07:44 +01:00
services = {
blueman.enable = true;
2024-06-01 21:32:11 +02:00
displayManager.defaultSession = "none+i3";
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
2024-07-02 18:34:22 +02:00
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";
2024-07-30 20:24:44 +02:00
"dither.noise" = 4;
2024-07-02 18:34:22 +02:00
};
}
];
};
};
# Video
2023-12-16 17:07:44 +01:00
xserver = {
enable = true;
windowManager.i3.enable = true;
2023-10-29 00:49:22 +02:00
2023-12-16 17:07:44 +01:00
# Keyboard layout
2024-06-01 21:32:11 +02:00
xkb = {
extraLayouts.qwerty-fr = {
description = "QWERTY-fr";
languages = [ "fr" ];
symbolsFile = "${pkgs.stdenv.mkDerivation {
name = "qwerty-fr-keypad";
2024-10-06 22:07:49 +02:00
src = pkgs.fetchFromGitHub {
owner = "qwerty-fr";
repo = "qwerty-fr";
2024-06-01 21:32:11 +02:00
rev = "3a4d13089e8ef016aa20baf6b2bf3ea53de674b8";
2024-10-06 22:07:49 +02:00
sha256 = "sha256-wn5n6jJVDrQWJze8xYF2nEY8a7mHI3hVO4xsT4LMo9c=";
2024-06-01 21:32:11 +02:00
};
patches = [ ./qwerty-fr-keypad.diff ];
# TODO This doesn't seem to be applied... it's the whole point of the derivation :(
installPhase = ''
runHook preInstall
mkdir -p $out/linux
cp $src/linux/us_qwerty-fr $out/linux
runHook postInstall
'';
}}/linux/us_qwerty-fr";
};
2024-06-01 21:32:11 +02:00
layout = "qwerty-fr";
2023-12-16 17:07:44 +01:00
};
2023-11-22 14:05:48 +01:00
};
# Disco
};
2023-10-22 22:27:58 +02:00
2023-12-16 17:07:44 +01:00
# Enable sound & bluetooth
hardware.bluetooth.enable = true;
2024-01-26 00:23:52 +01:00
# So we can use gnome3 pinentry flavour
services.dbus.packages = [ pkgs.gcr ];
2023-11-22 14:05:48 +01:00
};
imports = [
./autorandr.nix
];
2023-10-22 22:27:58 +02:00
}