diff --git a/flake.lock b/flake.lock index cf2fb19..a8048d0 100644 --- a/flake.lock +++ b/flake.lock @@ -18,6 +18,42 @@ "type": "github" } }, + "nixlib": { + "locked": { + "lastModified": 1711241261, + "narHash": "sha256-knrTvpl81yGFHIpm1SsLDApe0thFkw1cl3ISAMPmP/0=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "b2a1eeef8c185f6bd27432b053ff09d773244cbc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixos-generators": { + "inputs": { + "nixlib": "nixlib", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1711626141, + "narHash": "sha256-0qV1pHeIyUZ18cp8ijQnMf7uV+Uk4+UqTCC6yGSGWvk=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "63194fceafbfe583a9eb7d16ab499adc0a6c0bc2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1706098335, @@ -37,6 +73,7 @@ "root": { "inputs": { "flake-utils": "flake-utils", + "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs" } }, diff --git a/flake.nix b/flake.nix index 9cfe9cd..4ec602a 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,13 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; flake-utils.url = "github:numtide/flake-utils"; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, nixos-generators }: let pkgsOverlays = [ (import ./overlays/kubernetes/default.nix) @@ -123,6 +127,16 @@ }; packages = { + + kexec = nixos-generators.nixosGenerate { + modules = [ + # you can include your own nixos configuration here, i.e. + # ./configuration.nix + ]; + format = "kexec_bundle"; + }; + + benchstat = pkgs.benchstat; cert-updater = pkgs.cert-updater; cloud-init = pkgs.cloud-init;