forked from mirrors/nixpkgs
azure-image: provide configuration.nix which allows nixos-rebuild to build a working generation and add helpful comments
This commit is contained in:
parent
ba7b5ad530
commit
18d43d74f6
12
nixos/modules/virtualisation/azure-config-user.nix
Normal file
12
nixos/modules/virtualisation/azure-config-user.nix
Normal file
|
@ -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" ];
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue