diff options
author | Ryan Mulligan <ryan@ryantm.com> | 2019-02-24 08:28:42 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-24 08:28:42 -0800 |
commit | d14f102334e2d91ce94c29be79ce57989c88206c (patch) | |
tree | d3d999399e17777481756a24fb981eae3a30154c /nixos/modules/virtualisation | |
parent | 1a50038ed707c59e41630b996a8a48a1a11f6540 (diff) | |
parent | 15f98b7192f7f0cde166d0b0a400cffefa5399ff (diff) | |
download | nixlib-d14f102334e2d91ce94c29be79ce57989c88206c.tar nixlib-d14f102334e2d91ce94c29be79ce57989c88206c.tar.gz nixlib-d14f102334e2d91ce94c29be79ce57989c88206c.tar.bz2 nixlib-d14f102334e2d91ce94c29be79ce57989c88206c.tar.lz nixlib-d14f102334e2d91ce94c29be79ce57989c88206c.tar.xz nixlib-d14f102334e2d91ce94c29be79ce57989c88206c.tar.zst nixlib-d14f102334e2d91ce94c29be79ce57989c88206c.zip |
Merge pull request #44573 from vincentbernat/feature/cloudstack
nixos/cloudstack-image: initial import
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/cloudstack-config.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/cloudstack-config.nix b/nixos/modules/virtualisation/cloudstack-config.nix new file mode 100644 index 000000000000..81c545676277 --- /dev/null +++ b/nixos/modules/virtualisation/cloudstack-config.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: + +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"] + ''; + }; +} |