summaryrefslogtreecommitdiff
path: root/daeva/configuration.nix
blob: d3e12073ddaa2a113ac7938e66e8e770c30fa1ce (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
# 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
    ../overlays.nix
    ../packages/base.nix
    ../packages/desktop.nix
    ../programs/mtr.nix
    ../secrets.nix
    ../services/clamav.nix
    ../services/dbus.nix
    ../services/dnsmasq.nix
    ../services/firewall.nix
    ../services/kde.nix
    ../services/haveged.nix
    ../services/logind.nix
    ../services/podman.nix
    ../services/printing.nix
    ../services/sound.nix
    ../services/x11-intel.nix
    ../services/x11-laptop.nix
    ../services/x11.nix
    ../services/upower.nix
    ../system/bluetooth.nix
    ../system/ca.nix
    ../system/console.nix
    ../system/documentation.nix
    ../system/fonts.nix
    ../system/i18n.nix
    ../system/intel.nix
    ../system/networking.nix
    ../system/nix.nix
    ../system/opengl.nix
    ../system/security.nix
    ../system/timezone.nix
    ../system/users.nix
    ../system/wireshark.nix
    ../system/yubikey-gpg.nix
    ../unfree.nix
    ];

  # 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.kernelPackages = pkgs.linuxPackages_latest;

  boot.initrd.luks = {
    gpgSupport = true;
    devices = {
      luks-9e4050f4-5dce-4a64-88e8-61b82dd1d98b = {
        device = "/dev/disk/by-uuid/9e4050f4-5dce-4a64-88e8-61b82dd1d98b";
        gpgCard = {
          publicKey = ./public.asc;
          encryptedPass = ./luks-passphrase.asc;
        };
      };
    };
  };
  boot.blacklistedKernelModules = [
    "iptables"
  ];

  networking.hostName = "daeva";

  nix.maxJobs = 4;
  # Only keep a week instead of 2
  nix.gc.options = "--delete-older-than 7d";

  # 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 = "20.09"; # Did you read the comment?

}