Skip to content

Commit 3d782a4

Browse files
committed
Working VM for PaperWM
1 parent 4394c12 commit 3d782a4

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ [email protected]
88
node_modules/
99
package.json
1010
package-lock.json
11+
12+
# generated disk image for test VM
13+
nixos.qcow2

flake.nix

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,25 @@
88
let pkgs = import nixpkgs { inherit system; };
99
in
1010
{ packages.default = pkgs.callPackage ./default.nix {};
11-
packages.vm = self.nixosConfigurations.testbox.config.system.build.vm;
12-
11+
packages.vm = let hostConfig = self.nixosConfigurations.testbox.config;
12+
localConfig = hostConfig // {
13+
virtualisation = hostConfig.virtualisation // {
14+
host.pkgs = pkgs; # Use host system's Qemu
15+
};
16+
};
17+
in localConfig.system.build.vm;
18+
}) // {
1319
nixosConfigurations."testbox" =
14-
nixpkgs.lib.nixosSystem {
20+
let system = "x86_64-linux";
21+
in nixpkgs.lib.nixosSystem {
1522
inherit system;
1623
modules = [
1724
./vm.nix
1825
{ nixpkgs.overlays = [
19-
(self: super: { paperwm = self.packages.${system}.default; })
26+
(s: super: { paperwm = self.packages.${system}.default; })
2027
];
2128
}
2229
];
2330
};
24-
});
31+
};
2532
}

vm.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
{ enable = true;
1414
user = "user";
1515
};
16+
displayManager.gdm.enable = true;
1617
desktopManager.gnome.enable = true;
1718
};
1819

0 commit comments

Comments
 (0)