-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvm.nix
More file actions
44 lines (41 loc) · 1.17 KB
/
vm.nix
File metadata and controls
44 lines (41 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# enables `nix run .#vm`. it is very useful to have a VM
# you can edit your config and launch the VM to test stuff
# instead of having to reboot each time.
{ inputs, den, ... }:
{
den.aspects.temujin.includes = [ ];
perSystem =
{ pkgs, ... }:
{
packages.temujinVm = pkgs.writeShellApplication {
name = "temujinVm";
text =
let
host = inputs.self.nixosConfigurations.temujin.config;
in
''
${host.system.build.vm}/bin/run-${host.networking.hostName}-vm "$@"
'';
};
packages.subutaiVm = pkgs.writeShellApplication {
name = "subutaiVm";
text =
let
host = inputs.self.nixosConfigurations.subutai.config;
in
''
${host.system.build.vm}/bin/run-${host.networking.hostName}-vm "$@"
'';
};
packages.chagataiVm = pkgs.writeShellApplication {
name = "chagataiVm";
text =
let
host = inputs.self.nixosConfigurations.chagatai.config;
in
''
${host.system.build.vm}/bin/run-${host.networking.hostName}-vm "$@"
'';
};
};
}