diff --git a/nixos/maintainers/scripts/openstack/nova-image.nix b/nixos/maintainers/scripts/openstack/nova-image.nix index fa9cfb74bd6c..b6f3a5b15200 100644 --- a/nixos/maintainers/scripts/openstack/nova-image.nix +++ b/nixos/maintainers/scripts/openstack/nova-image.nix @@ -1,3 +1,5 @@ +# nix-build '' -A config.system.build.novaImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/openstack/nova-image.nix ]; }" + { config, lib, pkgs, ... }: with lib; diff --git a/nixos/modules/virtualisation/cloud-image.nix b/nixos/modules/virtualisation/cloud-image.nix deleted file mode 100644 index 0f0141abfb16..000000000000 --- a/nixos/modules/virtualisation/cloud-image.nix +++ /dev/null @@ -1,44 +0,0 @@ -# Usage: -# $ NIX_PATH=`pwd`:nixos-config=`pwd`/nixpkgs/nixos/modules/virtualisation/cloud-image.nix nix-build '' -A config.system.build.cloudImage - -{ config, lib, pkgs, ... }: - -with lib; - -{ - system.build.cloudImage = import ../../lib/make-disk-image.nix { - inherit pkgs lib config; - partitioned = true; - diskSize = 1 * 1024; - configFile = pkgs.writeText "configuration.nix" - '' - { config, lib, pkgs, ... }: - - with lib; - - { - imports = [ ]; - } - ''; - }; - - imports = [ ../profiles/qemu-guest.nix ]; - - fileSystems."/".device = "/dev/disk/by-label/nixos"; - - boot = { - kernelParams = [ "console=ttyS0" ]; - loader.grub.device = "/dev/vda"; - loader.timeout = 0; - }; - - networking.hostName = mkDefault ""; - - services.openssh = { - enable = true; - permitRootLogin = "without-password"; - passwordAuthentication = mkDefault false; - }; - - services.cloud-init.enable = true; -} diff --git a/nixos/modules/virtualisation/nova-config.nix b/nixos/modules/virtualisation/nova-config.nix index aac11ec8a178..c865cf451e40 100644 --- a/nixos/modules/virtualisation/nova-config.nix +++ b/nixos/modules/virtualisation/nova-config.nix @@ -22,8 +22,13 @@ with lib; boot.loader.timeout = 0; # Allow root logins - services.openssh.enable = true; - services.openssh.permitRootLogin = "prohibit-password"; + services.openssh = { + enable = true; + permitRootLogin = "prohibit-password"; + passwordAuthentication = mkDefault false; + }; + + services.cloud-init.enable = true; # Put /tmp and /var on /ephemeral0, which has a lot more space. # Unfortunately we can't do this with the `fileSystems' option