1{ lib, pkgs, ... }:
2
3with lib;
4
5{
6 imports = [
7 ../profiles/qemu-guest.nix
8 ];
9
10 config = {
11 fileSystems."/" = {
12 device = "/dev/disk/by-label/nixos";
13 autoResize = true;
14 };
15
16 boot.growPartition = true;
17 boot.kernelParams = [ "console=tty0" ];
18 boot.loader.grub.device = "/dev/vda";
19 boot.loader.timeout = 0;
20
21 # Allow root logins
22 services.openssh = {
23 enable = true;
24 settings.PermitRootLogin = "prohibit-password";
25 };
26
27 # Cloud-init configuration.
28 services.cloud-init.enable = true;
29 # Wget is needed for setting password. This is of little use as
30 # root password login is disabled above.
31 environment.systemPackages = [ pkgs.wget ];
32 # Only enable CloudStack datasource for faster boot speed.
33 environment.etc."cloud/cloud.cfg.d/99_cloudstack.cfg".text = ''
34 datasource:
35 CloudStack: {}
36 None: {}
37 datasource_list: ["CloudStack"]
38 '';
39 };
40}