Skip to content

Commit

Permalink
Working VM for PaperWM
Browse files Browse the repository at this point in the history
  • Loading branch information
Thesola10 committed Jan 8, 2025
1 parent 4394c12 commit 0460d4e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@
let pkgs = import nixpkgs { inherit system; };
in
{ packages.default = pkgs.callPackage ./default.nix {};
packages.vm = self.nixosConfigurations.testbox.config.system.build.vm;

packages.vm = let hostConfig = self.nixosConfigurations.testbox.config;
localConfig = hostConfig // {
virtualisation = hostConfig.virtualisation // {
host.pkgs = pkgs; # Use host system's Qemu
};
};
in localConfig.system.build.vm;
}) // {
nixosConfigurations."testbox" =
nixpkgs.lib.nixosSystem {
let system = "x86_64-linux";
in nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./vm.nix
{ nixpkgs.overlays = [
(self: super: { paperwm = self.packages.${system}.default; })
(s: super: { paperwm = self.packages.${system}.default; })
];
}
];
};
});
};
}

0 comments on commit 0460d4e

Please sign in to comment.