2019-06-16 20:59:06 +01:00
|
|
|
{ lib, pkgs, ... }:
|
2018-08-05 19:38:34 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../profiles/qemu-guest.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-label/nixos";
|
|
|
|
autoResize = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.growPartition = true;
|
|
|
|
boot.kernelParams = [ "console=tty0" ];
|
|
|
|
boot.loader.grub.device = "/dev/vda";
|
|
|
|
boot.loader.timeout = 0;
|
|
|
|
|
|
|
|
# Allow root logins
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
permitRootLogin = "prohibit-password";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Cloud-init configuration.
|
|
|
|
services.cloud-init.enable = true;
|
|
|
|
# Wget is needed for setting password. This is of little use as
|
|
|
|
# root password login is disabled above.
|
|
|
|
environment.systemPackages = [ pkgs.wget ];
|
|
|
|
# Only enable CloudStack datasource for faster boot speed.
|
|
|
|
environment.etc."cloud/cloud.cfg.d/99_cloudstack.cfg".text = ''
|
|
|
|
datasource:
|
|
|
|
CloudStack: {}
|
|
|
|
None: {}
|
|
|
|
datasource_list: ["CloudStack"]
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|