summaryrefslogtreecommitdiffstats
path: root/systems/alnus/config.nix
blob: f8dd0b8834287dbddeaddce04f5c19b8851ad2c8 (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{ config, lib, pkgs, ... }: {
  imports = [
    ../../configs/hw/x220.nix
    ../../configs/exim-retiolum.nix
    ../../configs/retiolum.nix
  ];

  boot = {
    initrd = {
      availableKernelModules = [ "ahci" ];
      luks.devices.luksroot.device = "/dev/sda2";
    };
  };

  environment.systemPackages = [
    pkgs.firefox
    pkgs.networkmanagerapplet
    (pkgs.pidgin.override {
      plugins = [ pkgs.pidgin-otr ];
    })
  ];

  fileSystems = {
    "/boot" = {
      device = "/dev/sda1";
    };
    "/" = {
      device = "/dev/mapper/main-root";
      fsType = "ext4";
      options = [ "defaults" "noatime" ];
    };
    "/home" = {
      device = "/dev/mapper/main-home";
      fsType = "ext4";
      options = [ "defaults" "noatime" ];
    };
  };

  hardware = {
    opengl.driSupport32Bit = true;
    pulseaudio.enable = true;
  };

  i18n.defaultLocale = "de_DE.UTF-8";

  krebs.build = {
    host = config.krebs.hosts.alnus;
    user = lib.mkForce config.krebs.users.dv;
  };

  networking.networkmanager.enable = true;

  services.earlyoom.enable = true;
  services.earlyoom.freeMemThreshold = 5;
  systemd.services.earlyoom.environment.EARLYOOM_ARGS = toString [
    "--prefer '^(Web Content|Privileged Cont)$'" # firefox tabs
  ];

  services.xserver = {
    enable = true;
    layout = "de";
    xkbOptions = "eurosign:e";

    libinput.enable = false;
    synaptics = {
      enable = true;
      twoFingerScroll = true;
    };
  };
  services.xserver.desktopManager.plasma5.enable = true;
  services.xserver.displayManager.autoLogin.enable = true;
  services.xserver.displayManager.autoLogin.user = "dv";

  system.stateVersion = "22.05";

  users.users.dv = {
    inherit (config.krebs.users.dv) home uid;
    isNormalUser = true;
    extraGroups = [
      "audio"
      "video"
      "networkmanager"
    ];
  };
}