nixos-config/machines/trek.nix
Christoph Heiss 5ec9fa569d
system: Simplify Wi-Fi setup
The NetworkManager setup was duplicated anyway in system/desktop.nix,
and then just install `iw` unconditionally on all desktop.

It's a small package, and basically every desktop today got Wi-Fi
anyway.

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-10-26 20:46:37 +02:00

91 lines
2.5 KiB
Nix

{ pkgs, ... }:
let
nixosHardwareCommit = "a6aa8174fa61e55bd7e62d35464d3092aefe0421";
nixosHardware = fetchTarball
"https://github.com/NixOS/nixos-hardware/archive/${nixosHardwareCommit}.zip";
in {
imports = [
"${nixosHardware}/framework/12th-gen-intel"
../system/bluetooth.nix
../system/desktop.nix
../system/laptop.nix
../system/printing.nix
../system/ucode-intel.nix
];
system.stateVersion = "23.05";
boot.initrd.luks.devices."cryptlvm".device =
"/dev/disk/by-uuid/f2901f09-5100-47ad-939b-6aa6ee5b0519";
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" "i915" ];
boot.kernelParams = [ "i915.force_probe=46a6" ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/ec22a0d8-2ae0-4266-b67d-a30bf6957b91";
fsType = "btrfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/1182-30BA";
fsType = "vfat";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/1eb8c5aa-c833-4513-9f0b-54e29986deb6";
fsType = "btrfs";
};
console.keyMap = "dvorak";
powerManagement.cpuFreqGovernor = "powersave";
home-manager.users.christoph = {
imports = [ ../secrets/home-manager/tu-vienna.nix ];
my = {
applications.personal.enable = true;
emails.personal.enable = true;
};
wayland.windowManager.sway.config = {
gaps.outer = 1;
input."type:touchpad" = {
dwt = "enabled";
tap = "enabled";
natural_scroll = "enabled";
};
input."type:keyboard".xkb_layout = "us(dvorak)";
output."*".scale = "1.5";
};
# Disable microphone boost, just distorts the audio _really_ bad
systemd.user.services.disable-broken-microphone-boost = {
Unit = {
Description = "Disable broken microphone boost";
After = [
"pipewire-pulse.service"
"pipewwire.service"
"wireplumber.service"
];
Wants = [
"pipewire-pulse.service"
"pipewwire.service"
"wireplumber.service"
];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = ''
${pkgs.bash}/bin/bash -c "sleep 10 \
&& ${pkgs.alsa-utils}/bin/amixer -c 0 sset 'Mic Boost' 0 \
&& ${pkgs.alsa-utils}/bin/amixer -c 0 sset 'Internal Mic Boost' 0 \
"'';
};
Install.WantedBy = [ "graphical-session.target" ];
};
};
}