about summary refs log tree commit diff
path: root/machines/mmrnmhrm.nix
blob: 7f966c022c53e1a016a52506dc4e089d94c67f80 (plain) (blame)
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
62
63
64
65
66
67
{ pkgs, ... }:

with pkgs.lib;
with import ../lib;

{
  imports = singleton ../common-workstation.nix;

  nix.maxJobs = 2;

  boot = let
    linuxVuizvui = pkgs.buildLinux {
      inherit (pkgs.kernelSourceVuizvui) version src;

      kernelPatches = singleton pkgs.vuizvuiKernelPatches.bfqsched;
      configfile = generateKConf (import ./mmrnmhrm-kconf.nix);
      allowImportFromDerivation = true;
    };
  in rec {
    kernelPackages = pkgs.recurseIntoAttrs
      (pkgs.linuxPackagesFor linuxVuizvui kernelPackages);

    loader.grub.devices = map (i: "/dev/disk/by-id/${i}") [
      "ata-WDC_WD10EZEX-00BN5A0_WD-WCC3F5756955"
      "ata-WDC_WD10EZEX-00BN5A0_WD-WCC3F5790537"
    ];
  };

  networking.hostName = "mmrnmhrm";

  fileSystems = {
    "/" = {
      label = "root";
      fsType = "btrfs";
      options = concatStringsSep "," [
        "autodefrag"
        "space_cache"
        "compress=lzo"
        "noatime"
      ];
    };
  };

  swapDevices = [
    { label = "swap1"; }
    { label = "swap2"; }
  ];

  services.synergy.server.enable = true;
  services.synergy.server.configFile = ../cfgfiles/synergy.conf;

  systemd.services."synergy-server".serviceConfig.CPUSchedulingPolicy = "rr";
  systemd.services."synergy-server".serviceConfig.CPUSchedulingPriority = 50;

  services.xserver.videoDrivers = [ "nouveau" ];
  services.xserver.xrandrHeads = [ "DVI-I-1" "VGA-1" ];

  vuizvui.i3.workspaces."1" = {
    label = "XMPP";
    assign = singleton { class = "^(?:Tkabber|Gajim)\$"; };
  };

  vuizvui.i3.workspaces."3" = {
    label = "Chromium";
    assign = singleton { class = "^Chromium(?:-browser)?\$"; };
  };
}