52 lines
1.5 KiB
Nix
52 lines
1.5 KiB
Nix
{lib, ...}:
|
|
|
|
with lib;
|
|
{
|
|
imports = [ (toString ../base) ];
|
|
|
|
config = {
|
|
deployment.targetUser = "root";
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-label/nixos";
|
|
fsType = "ext4";
|
|
autoResize = true;
|
|
};
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-label/ESP";
|
|
fsType = "vfat";
|
|
};
|
|
swapDevices = [
|
|
{device = "/swap"; size = 1024;} # make sure we always have enough memory to rebuild nixos.
|
|
];
|
|
|
|
# boot.initrd.network.enable = true;
|
|
# networking.useDHCP = true;
|
|
|
|
networking.useNetworkd = mkForce true;
|
|
networking.networkmanager.enable = false;
|
|
#networking.interfaces.ens18.useDHCP = false;
|
|
#networking.bridges.br0.interfaces = [ "ens18" ];
|
|
#networking.interfaces.br0.useDHCP = lib.mkDefault true;
|
|
|
|
# hardware.cpu.amd.updateMicrocode = lib.config.hardware.enableRedistributableFirmware;
|
|
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
|
|
boot.initrd.kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ];
|
|
|
|
boot.growPartition = true;
|
|
boot.kernelParams = [ "console=ttyS0" ];
|
|
boot.loader.grub.device = "/dev/vda";
|
|
boot.loader.timeout = mkDefault 3;
|
|
boot.consoleLogLevel = 3;
|
|
boot.initrd.verbose = true;
|
|
|
|
services.getty.autologinUser = "root";
|
|
|
|
services.sshd.enable = true;
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
|
|
services.qemuGuest.enable = true;
|
|
|
|
cascade.bridge-interface = "ens18";
|
|
};
|
|
}
|