From edc1949f242ccce7bbf827dfa0a8567cc7f01193 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt <aaronhoneycutt@protonmail.com> Date: Mon, 8 Jan 2024 15:19:04 +0000 Subject: [PATCH] Fix VM flake to work with disko --- systems/flake.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/systems/flake.nix b/systems/flake.nix index f88658f..be8814d 100644 --- a/systems/flake.nix +++ b/systems/flake.nix @@ -3,9 +3,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; + disko = { + url = github:nix-community/disko; + inputs.nixpkgs.follows = "nixpkgs"; + } }; - outputs = { self, nixpkgs, ... }@inputs: { + outputs = { self, nixpkgs, disko, ... }@inputs: { nixosConfigurations = { "vm" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -13,6 +17,11 @@ # Import the configuration.nix we used before, so that the old configuration file can still take effect. # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here # ./configuration.nix + disko.nixosModules.disko + ./disko-config.nix + { + _module.args.disks = [ "/dev/vda" ]; + } ./hardware-configuration.nix ({config, pkgs, ...}: {