Skip to content

Commit

Permalink
change build output folder
Browse files Browse the repository at this point in the history
  • Loading branch information
zbioe committed Aug 9, 2022
1 parent ceead15 commit e46671f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions devShell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ let
inherit (builtins) readFile;
inherit (writers) writeBash;
build = writeScriptBin "build" ''
nix build .#$*
env=$1
image=$2
nix build --out-link "./env/$env/$image" .#$image
# add image to cache
git add -Nf ./env/$env/$image
'';
build-qcow = writeScriptBin "build-qcow" ''
build qcow
# add image to cache
git add -Nf ./result
build local qcow
'';
build-gce = writeScriptBin "build-gce" ''
build gcp gce
'';
apply = writeScriptBin "apply" ''
# defaults to local
Expand Down Expand Up @@ -64,6 +69,7 @@ in mkShell {
# custom
build
build-qcow
build-gce
minikube
apply
apply-local
Expand Down
2 changes: 1 addition & 1 deletion env/local/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
};
};
volumes = {
nixos = { source = ../../result/nixos.qcow2; };
nixos = { source = qcow/nixos.qcow2; };
c1v1 = { source = "nixos"; };
c1v2 = { source = "nixos"; };
c1v3 = { source = "nixos"; };
Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
qcow = nixos-generators.nixosGenerate {
inherit pkgs;
modules = [
# minimal libvirt qcow
# minimal libvirt
./generators/minimal-libvirt.nix
];
format = "qcow";
Expand All @@ -52,7 +52,7 @@
gce = nixos-generators.nixosGenerate {
inherit pkgs;
modules = [
# minimal libvirt qcow
# minimal gcp
./generators/minimal-gcp.nix
];
format = "gce";
Expand Down

0 comments on commit e46671f

Please sign in to comment.