From babd958410bdc4a4a7d31c28eba99e3673c89e5f Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sun, 1 Jul 2018 06:56:16 +0000 Subject: [PATCH] Add local (and untracked by git) settings --- .gitignore | 1 + README.md | 2 ++ appvm.sh | 4 ++++ nix/base.nix | 1 + 4 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 62114ff..9307d77 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ qemu/bin/* !qemu/bin/.keep share/* !share/.keep +nix/local.nix diff --git a/README.md b/README.md index 4467391..2153197 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ Autodetection is a bash-spaghetti, so you need to check results. BTW it's just a $ $HOME/appvm/appvm.sh build chromium +You can customize local settings in `nix/local.nix`. + ## Run application $ appvm.chromium diff --git a/appvm.sh b/appvm.sh index 659ba9e..4c7bc0e 100755 --- a/appvm.sh +++ b/appvm.sh @@ -3,6 +3,10 @@ APPVM_PATH=$(dirname $(realpath $0)) cd ${APPVM_PATH} +if [ ! -f nix/local.nix ]; then + echo -e "{\n}" >> nix/local.nix +fi + if [[ "$1" == "build" && "$2" != "" ]]; then rm qemu/qcow/${2}.qcow2 NIX_PATH=$NIX_PATH:. nix-build '' -A config.system.build.vm -I nixos-config=nix/${2}.nix || exit 1 diff --git a/nix/base.nix b/nix/base.nix index 88de5d8..fee8f6a 100644 --- a/nix/base.nix +++ b/nix/base.nix @@ -1,6 +1,7 @@ { imports = [ + ]; system.nixos.stateVersion = "18.03";