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 3d782a4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ paperwm@paperwm.github.com.zip
node_modules/
package.json
package-lock.json

# generated disk image for test VM
nixos.qcow2
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; })
];
}
];
};
});
};
}
1 change: 1 addition & 0 deletions vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{ enable = true;
user = "user";
};
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};

Expand Down

0 comments on commit 3d782a4

Please sign in to comment.