aboutsummaryrefslogtreecommitdiff
path: root/roots/tempest.nix
blob: 40a6aa9156871865d8f5a55c550b046519b6aa47 (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
/* TOP LEVEL DEVICE CONFIGURATION FOR
 * 
 *    tempest (AMD workstation)
 *
 * This file only contains settings that are specific to this one
 * device (hardware and things outside of nix, like partitions).
 *
 * This file is part of LIBKOOKIE, a collection of nix expressions.
 * LIBKOOKIE is licensed under the GPL-3.0 (or later) -- see LICENSE
 */

{ lib, config, pkgs, ... }:

{
  nixpkgs.config.allowUnfree = true;

  imports = [
    ../modules/nix
    ../modules/nix/home-manager.nix
    
    ../modules/base
    ../modules/docker
    ../modules/workstation
    ../modules/workstation/hardware/yubikey
    ../modules/workstation/hardware/xkblayout
  ];
  
  # Use the GRUB 2 boot loader.
  boot.loader.grub = {
    enable = true;
    device = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_S2RBNB0J340787H";
    enableCryptodisk = true;
    zfsSupport = true;
    version = 2;
  };

  hardware.cpu.amd.updateMicrocode = true;
  hardware.enableRedistributableFirmware = true;

  boot.initrd.availableKernelModules =
    [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
  boot.initrd.kernelModules = [ "dm-snapshot" ];
  boot.kernelModules = [ "kvm-amd" ];
  boot.extraModulePackages = [];

  services.zfs.autoSnapshot.enable = true;
  
  fileSystems."/" = {
    device = "zroot";
    fsType = "zfs";

    encrypted = {
      enable = true;
      label = "lvm";
      blkDev = "/dev/disk/by-uuid/e01e1473-ea51-4ec7-a5a9-44d673396644";
    };
  };

  fileSystems."/boot" = {
    device = "/dev/disk/by-uuid/0583b1a0-88c1-4e1c-855e-2df948272cbf";
    fsType = "ext4";
  };

  swapDevices = [];
  nix.maxJobs = 16;
  
  ## From Mass Effect: Andromeda
  networking.hostName = "tempest";
  networking.hostId = "01fd342c";
  networking.firewall.allowedTCPPorts = [ 9000 ];
  
  networking.useDHCP = false;
  networking.interfaces.enp7s0.useDHCP = true;

  # Select internationalisation properties.
  i18n.defaultLocale = "en_GB.UTF-8";

  # Set your time zone.
  time.timeZone = "Europe/Berlin";

  programs.sway.enable = true;
  programs.mtr.enable = true;
  programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  services.openssh.enable = true;

  # users.users.spacekookie.hashedPassword = "$6$rounds=1000000$22ypycQ2AlCCv8iC$RrzyAbCX3D518nCgfR3MTqZhfK.GAclme7EQlKTlqH4oV1YvGd/aHdTfe59iMpf/J18tqEO2aSXsevTVQz2yW.";
  users.users.spacekookie.hashedPassword = "$6$rounds=1000000$IncTbazL/YhUV5$brzwb3Xa0cmmazpxJGPPo93wfs6jAomL1NYJ7Amw3WSyTjXGXGbedIMmm06nkeCnJfJzoZ.Jd47q88ot3USZi/";
  system.stateVersion = "19.09";
}