~cyplo/dotfiles

ref: 0f34b9d1bf61e8be3e61351814603e01c8bf42cd dotfiles/nixos/common-hardware.nix -rw-r--r-- 1.5 KiB
0f34b9d1 — Cyryl Płotnicki upgrade rust-analyzer 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ config, pkgs, lib, ... }:
{
  boot.kernelModules = [ "fuse" ];
  services.smartd.enable = true;

  sound.enable = true;

  networking.networkmanager.enable = true;

  hardware.enableAllFirmware = true;
  hardware.enableRedistributableFirmware = true;
  hardware.cpu.intel.updateMicrocode = true;
  hardware.pulseaudio = {
    enable = true;
    package = pkgs.pulseaudioFull;
    support32Bit = true;
    extraModules = [ pkgs.pulseaudio-modules-bt ];
    daemon.config = {
      nice-level= -15;
      realtime-scheduling = "yes";
    };
  };

  hardware.bluetooth = {
    enable = true;
    package = pkgs.bluezFull;
    config = {
      General = { Enable = "Source,Sink,Media,Socket"; };
    };
  };

  services.blueman.enable = true;

  services.printing = {
    enable = true;
    drivers = with pkgs; [ epson-escpr samsung-unified-linux-driver splix ];
  };

  hardware.printers.ensurePrinters = [{
    description = "Epson XP-540 via brix";
    name = "epson_xp540_via_brix";
    deviceUri = "ipp://brix.local:631/printers/epson_xp540";
    model = "epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
    ppdOptions = { PageSize = "A4"; Duplex = "DuplexNoTumble"; };
  }];

  hardware.sane = {
    enable = true;
    netConf = ''
      10.0.0.232
      brix.local
      brix.vpn
    '';
    snapshot = true;
    extraBackends = with pkgs; [ sane-airscan utsushi ];
  };

  powerManagement.enable = (lib.mkForce true);
  powerManagement.cpuFreqGovernor = (lib.mkForce null);
  powerManagement.powertop.enable = true;
}