Created
November 12, 2022 07:31
-
-
Save djacu/9cd2f6982146c197e6e0cacdbeb3aee4 to your computer and use it in GitHub Desktop.
testing bootloader option in nixos virtualisation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "testing bootloader option in nixos virtualisation"; | |
| inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | |
| inputs.flake-utils.url = "github:numtide/flake-utils"; | |
| inputs.nixos-generators.url = "github:nix-community/nixos-generators"; | |
| inputs.nixos-generators.inputs.nixpkgs.follows = "nixpkgs"; | |
| outputs = { | |
| self, | |
| nixpkgs, | |
| flake-utils, | |
| nixos-generators, | |
| }: | |
| flake-utils.lib.eachSystem [flake-utils.lib.system.x86_64-linux] ( | |
| system: let | |
| pkgs = import nixpkgs { | |
| inherit system; | |
| }; | |
| test-vm = nixos-generators.nixosGenerate { | |
| inherit system; | |
| format = "vm"; | |
| modules = | |
| [ | |
| "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" | |
| ({...}: { | |
| config.virtualisation.graphics = false; | |
| config.virtualisation.useBootLoader = true; | |
| }) | |
| ]; | |
| }; | |
| in { | |
| packages = { | |
| inherit test-vm; | |
| }; | |
| } | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment