Skip to content

Commit a6e1330

Browse files
committed
Updated test VM to reduce build time
This change also removes GNOME Circle apps from the test VM.
1 parent c52646b commit a6e1330

File tree

3 files changed

+56
-14
lines changed

3 files changed

+56
-14
lines changed

flake.lock

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,50 @@
11
{ description = "Tiled, scrollable window management for GNOME Shell";
22

3-
inputs."nixpkgs".url = github:NixOS/nixpkgs/gnome;
3+
inputs."nixpkgs".url = github:NixOS/nixpkgs;
4+
inputs."nixpkgs-gnome".url = github:NixOS/nixpkgs/gnome;
45

5-
outputs = { self, nixpkgs, flake-utils, ... }:
6+
outputs = { self, nixpkgs, nixpkgs-gnome, flake-utils, ... }:
67
flake-utils.lib.eachDefaultSystem
78
(system:
8-
let pkgs = import nixpkgs { inherit system; };
9+
let hostPkgs = import nixpkgs { inherit system; };
910
in
10-
{ packages.default = pkgs.callPackage ./default.nix {};
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-
};
11+
{ packages.default = hostPkgs.callPackage ./default.nix {};
12+
13+
# This allows us to build Qemu for the host system thus avoiding
14+
# double emulation.
15+
packages.vm = let hostConfig = self.nixosConfigurations.testbox;
16+
localConfig = hostConfig.extendModules {
17+
modules = [
18+
({ modulesPath, ... }: {
19+
imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" ];
20+
virtualisation.host.pkgs = hostPkgs;
21+
})
22+
];
1623
};
17-
in localConfig.system.build.vm;
24+
in localConfig.config.system.build.vm;
1825
}) // {
1926
nixosConfigurations."testbox" =
2027
let system = "x86_64-linux";
28+
pkgs-gnome = import nixpkgs-gnome { inherit system; };
2129
in nixpkgs.lib.nixosSystem {
2230
inherit system;
2331
modules = [
2432
./vm.nix
2533
{ nixpkgs.overlays = [
34+
# Introduce PaperWM into our extensions
2635
(s: super: { paperwm = self.packages.${system}.default; })
36+
37+
# Pull GNOME-specific packages from GNOME staging
38+
(s: super: {
39+
gnome = pkgs-gnome.gnome;
40+
gnome-desktop = pkgs-gnome.gnome-desktop;
41+
gnome-shell = pkgs-gnome.gnome-shell;
42+
gnome-session = pkgs-gnome.gnome-session;
43+
gnome-control-center = pkgs-gnome.gnome-control-center;
44+
gnome-settings-daemon = pkgs-gnome.gnome-settings-daemon;
45+
mutter = pkgs-gnome.mutter;
46+
gdm = pkgs-gnome.gdm;
47+
})
2748
];
2849
}
2950
];

vm.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@
2727
{ enabled-extensions = [ "[email protected]" ];
2828
};
2929
};
30+
#NOTE: You can add more dconf settings to test with here!
3031
}
3132
];
3233
};
3334

35+
### Remove unnecessary dependencies
36+
#NOTE: This drops many GTK4 apps, re-enable if needed for testing.
37+
services.gnome.core-utilities.enable = false;
38+
3439
### Set default user
3540
users.users."user" =
3641
{ isNormalUser = true;

0 commit comments

Comments
 (0)