summaryrefslogtreecommitdiff
path: root/eligos/configuration.nix
blob: 4c12d9977f8cb4acb85e2f9dc54d8cba69cbca34 (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
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
# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ ../hardware-configuration.nix
      ../secrets.nix
      ../overlays.nix
      ../unfree.nix
      ../services/clamav.nix
      ../services/firewall.nix
      ../services/docker.nix
      ../services/dnsmasq.nix
      ../services/sound.nix
      ../services/x11.nix
      ../services/x11-laptop.nix
      ../services/x11-amdgpu.nix
      ../services/gnome.nix
      ../services/dbus.nix
      ../services/haveged.nix
      ../services/printing.nix
      ../services/sshd.nix
      ../system/ca.nix
      ../system/console.nix
      ../system/documentation.nix
      ../system/fonts.nix
      ../system/i18n.nix
      ../system/networking.nix
      ../system/packages.nix
      ../system/security.nix
      ../system/timezone.nix
      ../system/users.nix
      ../system/wireshark.nix
      ../system/yubikey-gpg.nix
      ../programs/mtr.nix
      ../system/nix.nix
      ./packages.nix
    ];

  networking.hostName = "eligos";

  # Use the GRUB 2 boot loader.
  boot.loader.systemd-boot = {
    enable = true;
    editor = false;
  };
  boot.loader.efi = {
    canTouchEfiVariables = false;
  };
  boot.loader.grub = {
    enable = true;
    copyKernels = true;
    efiInstallAsRemovable = true;
    efiSupport = true;
    fsIdentifier = "uuid";
    splashMode = "stretch";
    version = 2;
    device = "nodev";
    extraEntries = ''
      menuentry "Reboot" {
        reboot
      }
      menuentry "Poweroff" {
        halt
      }
    '';
  };

  boot.initrd.luks = {
    reusePassphrases = true;
    gpgSupport = true;
    devices = {
      cvg0 = {
        device = "/dev/disk/by-uuid/5cd9cc98-a22c-48f3-87ef-00a04f6d3500";
        gpgCard = {
          publicKey = ./public.asc;
          encryptedPass = ./luks-passphrase-cvg0.asc;
        };
      };
      cvg1 = {
        device = "/dev/disk/by-uuid/93479577-1b78-4b2c-b7c3-a1f905d19e54";
        fallbackToPassword = true;
        gpgCard = {
          publicKey = ./public.asc;
          encryptedPass = ./luks-passphrase-cvg1.asc;
        };
      };
      cvg2 = {
        device = "/dev/disk/by-uuid/4520c49c-12da-47ba-a9d1-1f53cd586cdd";
        fallbackToPassword = true;
        gpgCard = {
          publicKey = ./public.asc;
          encryptedPass = ./luks-passphrase-cvg2.asc;
        };
      };
    };
  };

  boot.blacklistedKernelModules = [
    "iptables"
  ];

  services.xserver.displayManager.gdm.wayland = false;

  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "19.03"; # Did you read the comment?

}