summaryrefslogtreecommitdiff
path: root/installer/default.nix
blob: 9043d59bdb3a1e88fb57fec346ebc912078eb9e0 (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
{ flake, config, pkgs, ... }: {
  imports = with flake.nixosModules.systemProfiles; [
    default-locale zfs networkmanager openssh
  ];

  config = {
    hardware.cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware;

    networking = {
      firewall.enable = false;
      nftables = {
        enable = true;
        rulesetFile = ./ruleset.nft;
      };
    };

    services.openssh = {
      enable = true;
      staticHostKeys = false;
    };

    services.qemuGuest.enable = true;

    services.resolved = {
      llmnr = "false";
    };

    environment.systemPackages = with pkgs; [
      nvme-cli iotop pciutils bottom

      cudatoolkit
    ];

    zramSwap.enable = true;

    users.defaultUserShell = pkgs.zsh;
    programs = {
      mosh.enable = true;
      tmux.enable = true;
      zsh.enable = true;
    };

    # nvidia
    services.xserver.videoDrivers = [ "nvidia" ];
    systemd.services.nvidia-control-devices = {
      wantedBy = [ "multi-user.target" ];
      serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11.bin}/bin/nvidia-smi";
    };
    nixpkgs.config.allowUnfree = true;

    system.stateVersion = config.system.nixos.release; # No state in installer
  };
}