about summary refs log tree commit diff
path: root/ops/infra/nixos/adho-configuration.nix
blob: 11c5a97df59e3400a72ff3675b09006208ea9fef (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# Local configuration for 'adho' (Thinkpad T470s)
{ config, pkgs, ...}:

{
  boot.initrd.luks.devices.adho.device = "/dev/disk/by-uuid/722006b0-9654-4ea1-8703-e0cf9ac1905e";
  boot.kernelModules = [ "kvm-intel" ];

  services.xserver.libinput.enable = true;
  services.xserver.videoDrivers = [ "intel" ];
  programs.light.enable = true;

  # Office printer configuration
  services.printing.enable  = true;
  services.printing.drivers = [ pkgs.hplip ];
  services.avahi.enable     = true;
  services.avahi.nssmdns    = true;

  # Enable VirtualBox to update Beatstep Pro firmware:
  virtualisation.virtualbox.host.enable = true;
  virtualisation.virtualbox.host.enableExtensionPack = true;

  # Enable LXC/LXD for Nixini work
  virtualisation.lxd.enable = true;

  # Give me more entropy:
  services.haveged.enable = true;

  # Disable sandbox to let work-builds function:
  nix.useSandbox = false;

  # Yubikey related:
  services.pcscd.enable = true;
  environment.systemPackages = with pkgs; [
    cfssl
    libp11
    opensc
    yubico-piv-tool
  ];

  networking = {
    hostName = "adho";
    wireless.enable = true;
    wireless.userControlled.enable = true;

    wireless.networks = {
      # Welcome to roast club!
      "How do I computer?" = {
        psk = "washyourface";
      };

      # On the go!
      "Rumpetroll" = {
        psk = "fisk1234";
        # If this network exists, chances are that I want it:
        priority = 10;
      };

      # Public places in Oslo:
      "Abelone" = {
        psk = "speakeasy";
      };

      "Wurst" = {
        psk = "wurst2015";
      };

      "postkontoret" = {
        psk = "postkontoret";
      };

      # Eugene's apartment:
      "GET_5G_4FD250" = {
        psk = "62636342";
      };

      # FSCONS 2017
      "uioguest" = {};

      # Hackeriet!
      "hackeriet.no" = {
        psk = "hackeriet.no";
      };

      # Cafe Sara
      "Sara Nett" = {
        psk = "sarabar1989";
      };

      # The Dubliner
      "DubGjest" = {
        # of course
        psk = "Guinness";
      };

      "MAGNAT Guest" = {
        psk = "elmolino021";
      };

      "BrewDog" = {
        psk = "welovebeer";
      };

      # Dima's
      "What's a Bad Idea?" = {
        psk = "DQDxzrzIvy0YtDwH";
      };

      # Loke's
      "VMC28F76E" = {
        psk = "d2ftQnr6xppw";
      };

      "SafetyWiFi - Teknologihuset" = {
        psk = "tech4ever";
      };

      "Selvaag Pluss" = {
        psk = "detlilleekstra";
      };

      "Langler" = {
        psk = "Oslo2018";
      };

      # Pils & Programmering
      "BEKKguest" = {
        psk = "guest7890";
      };

      "Homan-Gjest" = {
        psk = "haveaniceday";
      };

      # Røverstaden
      "Roverstaden" = {
        psk = "r0verstaden2018";
      };

      "The Brew Dock" = {
        psk = "realbeer";
      };

      "econ-guest" = {
        psk = "Finance2010";
      };

      "KabelBox-2FD0" = {
        psk = "92433048597489095671";
      };

      "TheKasbah" = {
        psk = "couscous";
      };

      # Kitty's misspelled network.
      "How do I Computer?" = {
        psk = "herpderpponies";
      };

      # NixCon 2018
      "Coin Street Community Builders " = {
        psk = "3vents2016";
      };

      "KH2 Gjest" = {
        psk = "haenfindag";
      };

      # Forest & Brown
      "Forest Guest" = {
        psk = "437B99AC5B";
      };

      "Gatwick FREE Wi-Fi" = {};
      "mycloud" = {};
      "Norwegian Internet Access" = {};
      "NSB_INTERAKTIV" = {};
      "The Thief" = {};
      "espressohouse" = {};
      "Gotanet Open" = {};
      "wifi.flytoget.no" = {};
      "AIRPORT" = {};
      "ilcaffelovesyou" = {};
      "WIFIonICE" = {};
      "Lorry Gjest" = {};
      "Amundsengjest" = {};
      "Beer Palace Gjest" = {};
      "ibis" = {};
      "GoogleGuest" = {};
    };
  };

  hardware.bluetooth.enable = true;

  # Configure POSIX queue limits (for work)
  systemd.tmpfiles.rules = let mqueue = "/proc/sys/fs/mqueue"; in [
    "w ${mqueue}/msgsize_max - - - - ${toString (64 * 1024)}"
    "w ${mqueue}/msg_max     - - - - 50"
  ];
}