-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathflake.nix
32 lines (30 loc) · 1.07 KB
/
flake.nix
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
{ description = "Tiled, scrollable window management for GNOME Shell";
inputs."nixpkgs".url = github:NixOS/nixpkgs;
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = import nixpkgs { inherit system; };
in
{ packages.default = pkgs.callPackage ./default.nix {};
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" =
let system = "x86_64-linux";
in nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./vm.nix
{ nixpkgs.overlays = [
(s: super: { paperwm = self.packages.${system}.default; })
];
}
];
};
};
}