2024-08-31 17:48:38 +00:00
|
|
|
{
|
2024-09-01 08:10:21 +00:00
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
modulesPath,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
"${toString modulesPath}/profiles/qemu-guest.nix"
|
|
|
|
];
|
|
|
|
|
2024-08-31 17:48:38 +00:00
|
|
|
system.stateVersion = "24.05";
|
|
|
|
|
2024-09-01 08:10:21 +00:00
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-label/nixos";
|
|
|
|
autoResize = true;
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/boot" = {
|
|
|
|
device = "/dev/disk/by-label/ESP";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.growPartition = true;
|
|
|
|
boot.kernelParams = [ "console=ttyS0" ];
|
2024-08-31 17:48:38 +00:00
|
|
|
boot.loader.systemd-boot.enable = true;
|
2024-09-01 08:10:21 +00:00
|
|
|
boot.loader.timeout = 0;
|
|
|
|
|
2024-08-31 17:48:38 +00:00
|
|
|
services.qemuGuest.enable = true;
|
|
|
|
|
|
|
|
services.cloud-init = {
|
|
|
|
enable = true;
|
|
|
|
network.enable = true;
|
|
|
|
settings = lib.mkOptionDefault {
|
|
|
|
datasource = {
|
|
|
|
NoCloud = { };
|
|
|
|
ConfigDrive = { };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Needed due to cloud-init.network.enable = true
|
|
|
|
networking.useNetworkd = true;
|
|
|
|
|
|
|
|
# Create default user
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
nix.settings.trusted-users = [ "nixos" ];
|
|
|
|
users.users.nixos = {
|
|
|
|
isNormalUser = true;
|
|
|
|
password = "hunter2";
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nix.settings.experimental-features = [
|
|
|
|
"nix-command"
|
|
|
|
"flakes"
|
|
|
|
];
|
|
|
|
environment.systemPackages = [ pkgs.nginx ];
|
|
|
|
}
|