summaryrefslogtreecommitdiffstats
path: root/systems/ne/base.nix
blob: 758dbf6139ac60cfba6fac81e4ca9ed1e6ef8759 (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
{ config, lib, modulesPath, pkgs, ... }: {
  imports = [
    (modulesPath + "/profiles/qemu-guest.nix")
  ];

  boot.initrd.availableKernelModules = [
    "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"
  ];

  boot.kernel.sysctl = {
    "net.ipv6.conf.all.use_tempaddr" = 0;
  };

  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  environment.systemPackages = [
    pkgs.git
    pkgs.rsync
  ];

  fileSystems = {
    "/boot" = {
      device = "/dev/vda1";
      fsType = "vfat";
      options = [
        "dmask=0077"
        "fmask=0077"
        "nodev"
        "noexec"
        "nosuid"
      ];
    };
    "/" = {
      device = "/dev/vda2";
      fsType = "btrfs";
      options = [
        "defaults"
        "noatime"
        "commit=120" # default: 30 [seconds]
        "compress=zstd" # default: lzo
        "ssd" # because /sys/block/vda/queue/rotational is 1...
      ];
    };
  };

  systemd.repart.enable = true;
  systemd.repart.partitions."10-root".Type = "root";
  systemd.services.systemd-growfs-root.wantedBy = [ "multi-user.target" ];

  documentation.info.enable = false;
  documentation.man.enable = false;
  documentation.nixos.enable = false;

  i18n.defaultLocale = "en_US.UTF-8";
  i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];

  services.ntp.enable = false;
  services.openssh.enable = true;
  services.udisks2.enable = false;

  users.mutableUsers = false;
  users.users.root.openssh.authorizedKeys.keys = lib.mkDefault [
    config.krebs.users.tv.pubkey
  ];

  system.stateVersion = "25.05";
}