build gcp image
This commit is contained in:
commit
47dd9a1137
5 files changed
+172
No files matched your search
@@ -0,0 +1,36 @@
|
||||
{
|
||||
description = "Tool to build NixOS for GCP. ";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, nixos-generators }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
gcp = nixos-generators.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
|
||||
modules = [ ./gcp-configuration.nix ];
|
||||
format = "gce";
|
||||
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
lib = nixpkgs.legacyPackages.x86_64-linux.lib;
|
||||
};
|
||||
in {
|
||||
|
||||
packages.gcp = gcp;
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [ pkgs.google-cloud-sdk ];
|
||||
shellHook = ''
|
||||
export PROJECT_ID="all-dressed-programming"
|
||||
export BUCKET_NAME="nautilus-plus"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user