Skip to content

Commit

Permalink
add build_outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
MayNiklas committed Dec 9, 2023
1 parent a148560 commit 3473dcd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,30 @@
s3uploader = pkgs.s3uploader;
update-input = pkgs.update-input;
vs-fix = pkgs.vs-fix;

# nix run .#build_outputs
build_outputs =
let
all_outputs = (pkgs.writeShellScriptBin "all_outputs" ''
# NixOS systems
echo ${self.nixosConfigurations.aida.config.system.build.toplevel}
echo ${self.nixosConfigurations.daisy.config.system.build.toplevel}
echo ${self.nixosConfigurations.deke.config.system.build.toplevel}
echo ${self.nixosConfigurations.kora.config.system.build.toplevel}
echo ${self.nixosConfigurations.simmons.config.system.build.toplevel}
echo ${self.nixosConfigurations.snowflake.config.system.build.toplevel}
echo ${self.nixosConfigurations.the-bus.config.system.build.toplevel}
echo ${self.nixosConfigurations.the-hub.config.system.build.toplevel}
'');
in
pkgs.writeShellScriptBin "build_outputs" ''
# makes sure we don't garbage collect the build outputs
${pkgs.nix}/bin/nix build --print-out-paths ${all_outputs} --out-link ~/.keep-nix-outputs
# push outputs to attic
${inputs.attic.packages.${pkgs.system}.attic}/bin/attic push lounge-rocks:nix-cache ${all_outputs}
'';

};

# Allow custom packages to be run using `nix run`
Expand All @@ -270,3 +294,8 @@
};
});
}





0 comments on commit 3473dcd

Please sign in to comment.