{ description = "NixOS Base Image"; inputs = { # nixpkgs repo for system packages nixpkgs.url = "github:nixos/nixpkgs"; # nixos-generators lets us produce a "proxmox"-formatted image nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, nixos-generators,... }: { packages.x86_64-linux = { base = nixos-generators.nixosGenerate { system = "x86_64-linux"; modules = [ { # Pin nixpkgs to the flake input, so that the packages installed # come from the flake inputs.nixpkgs.url. nix.registry.nixpkgs.flake = nixpkgs; # set disk size to to 20G # virtualisation.diskSize = 20 * 1024; } ./configuration.nix ]; format = "proxmox"; # outputs a .vma.zst suitable for qmrestore }; }; }; }