Merge pull request #1 from mrVanDalo/better-config

config.nix is an optional argument now
This commit is contained in:
Lassulus 2018-05-17 22:51:42 +02:00 committed by GitHub
commit e63b226c07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 5 deletions

View File

@ -5,6 +5,10 @@ for example:
```
bin/make-iso
```
or
```
bin/make-iso config.nix
```
it echoes the path to a iso image, which you then can flash onto an usb-stick or mount & boot in a virtual machine.

View File

@ -1,3 +1,4 @@
#!/bin/sh
ISO_DIR=$(nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=lib/iso.nix -I nixcfg=config.nix)
CONFIG=${1:-config.nix}
ISO_DIR=$( nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=lib/iso.nix -I nixcfg=${CONFIG} )
echo $ISO_DIR/iso/nixos.iso

View File

@ -1,3 +1,4 @@
#!/bin/sh
OPENSTACK_DIR=$(nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.novaImage -I nixos-config=lib/openstack.nix -I nixcfg=config.nix)
CONFIG=${1:-config.nix}
OPENSTACK_DIR=$( nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.novaImage -I nixos-config=lib/openstack.nix -I nixcfg=${CONFIG} )
echo $OPENSTACK_DIR/*.qcow2

View File

@ -1,3 +1,4 @@
#!/bin/sh
VBOX_DIR=$(nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.virtualBoxOVA -I nixos-config=lib/virtualbox.nix -I nixcfg=config.nix)
CONFIG=${1:-config.nix}
VBOX_DIR=$( nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.virtualBoxOVA -I nixos-config=lib/virtualbox.nix -I nixcfg=${CONFIG} )
echo $VBOX_DIR/*.ova

View File

@ -1,3 +1,4 @@
#!/bin/sh
VM=$(nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.vm -I nixos-config=lib/vm.nix -I nixcfg=config.nix)
$($VM/bin/run-nixos-vm)
CONFIG=${1:-config.nix}
VM=$( nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.vm -I nixos-config=lib/vm.nix -I nixcfg=${CONFIG} )
$(${VM}/bin/run-nixos-vm)