From 18d43d74f6d3a538bacc6c49d844a2e439cf6cba Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Thu, 3 Mar 2016 03:58:51 +0200 Subject: [PATCH] azure-image: provide configuration.nix which allows nixos-rebuild to build a working generation and add helpful comments --- nixos/modules/virtualisation/azure-config-user.nix | 12 ++++++++++++ nixos/modules/virtualisation/azure-image.nix | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/virtualisation/azure-config-user.nix diff --git a/nixos/modules/virtualisation/azure-config-user.nix b/nixos/modules/virtualisation/azure-config-user.nix new file mode 100644 index 000000000000..de1b3857923f --- /dev/null +++ b/nixos/modules/virtualisation/azure-config-user.nix @@ -0,0 +1,12 @@ +{ config, pkgs, modulesPath, ... }: + +{ + # To build the configuration or use nix-env, you need to run + # either nixos-rebuild --upgrade or nix-channel --update + # to fetch the nixos channel. + + # This configures everything but bootstrap services, + # which only need to be run once and have already finished + # if you are able to see this comment. + imports = [ "${modulesPath}/virtualisation/azure-common.nix" ]; +} diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix index f0a739bc95d1..79d1f7d7cc43 100644 --- a/nixos/modules/virtualisation/azure-image.nix +++ b/nixos/modules/virtualisation/azure-image.nix @@ -78,7 +78,7 @@ in echo Install a configuration.nix. mkdir -p /mnt/etc/nixos /mnt/boot/grub - cp ${./azure-config.nix} /mnt/etc/nixos/configuration.nix + cp ${./azure-config-user.nix} /mnt/etc/nixos/configuration.nix echo Generate the GRUB menu. ln -s vda /dev/sda