aboutsummaryrefslogtreecommitdiff
path: root/nixos/configurations/ridcully.nix
blob: 66daf1beef8d1d147e5d5b8a13b49137b39e7a1d (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
{
  lib,
  pkgs,
  ...
}: let
  inherit (lib) mkDefault;
in {
  nixpkgs.hostPlatform.system = "x86_64-linux";
  deploy.enable = true;

  cynerd = {
    desktop.enable = true;
    develop = true;
    gaming = true;
    openvpn = {
      elektroline = true;
    };
  };

  boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage"];
  boot.kernelModules = ["kvm-amd"];

  hardware.cpu.amd.updateMicrocode = true;
  services.hardware.openrgb.motherboard = "amd";

  cynerd.autounlock = {
    "encroot" = "/dev/disk/by-uuid/bc7d2ba4-6e04-4c49-b40c-3aecd1a86c71";
    "enchdd" = "/dev/disk/by-uuid/7fee3cda-efa0-47cd-8832-fdead9a7e6db";
  };
  fileSystems = {
    "/" = {
      device = "/dev/mapper/encroot";
      fsType = "btrfs";
      options = ["compress=lzo" "subvol=@nix"];
    };
    "/home" = {
      device = "/dev/mapper/encroot";
      fsType = "btrfs";
      options = ["compress=lzo" "subvol=@home"];
    };
    "/boot" = {
      device = "/dev/disk/by-uuid/6DAD-3819";
      fsType = "vfat";
    };

    "/home2" = {
      device = "/dev/mapper/enchdd";
      fsType = "btrfs";
      options = ["compress=lzo" "subvol=@home"];
    };
  };
  services.btrfs.autoScrub = {
    enable = true;
    fileSystems = ["/" "/home2"];
  };

  #networking.vlans."enp6s0.adm" = {
  #id = 2;
  #interface = "enp6s0";
  #};

  environment.systemPackages = [
    pkgs.nvtopPackages.amd
  ];

  services.syncthing = {
    enable = true;
    user = mkDefault "cynerd";
    group = mkDefault "cynerd";
    openDefaultPorts = true;

    overrideDevices = false;
    overrideFolders = false;

    dataDir = "/home/cynerd";
    configDir = "/home/cynerd/.config/syncthing";
  };

  # Force nix to use less jobs
  nix.settings.max-jobs = 8;
}