summaryrefslogtreecommitdiffstats
path: root/example/configuration.nix
blob: 5e57f590ba3f6b080b26377e8749ae03456cece0 (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
{ modulesPath, ... }: {
	imports = [
		(modulesPath + "/profiles/qemu-guest.nix")
	];

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

  networking.hostName = throw "insert yout hostname here";

  boot.kernelParams = [
    "console=ttyS0"
    "console=tty1"
    "nvme.shutdown_timeout=10"
    "libiscsi.debug_libiscsi_eh=1"
    "net.ifnames=0"
  ];

  boot.initrd.kernelModules = [
    "nvme"
  ];
  boot.kernelModules = [
    "kvm-amd"
  ];
  
  networking.useDHCP = false;
  networking.interfaces.eth0.useDHCP = true;

  fileSystems."/" = {
    device = "/dev/disk/by-label/root";
    fsType = "ext4";
  };
  fileSystems."/boot" = {
    device = "/dev/disk/by-label/boot";
    fsType = "vfat";
  };
  swapDevices = [{
    device = "/dev/disk/by-label/swap";
  }];

  services.openssh.enable = true;

  users.users.root.openssh.authorizedKeys.keys = [
    (throw "insert your ssh key here")
  ];

  system.stateVersion = "23.05";
}