From 8946868fd63cdae2a82e00c5f8d56f22b549b870 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 23 Jan 2025 21:18:57 -0500 Subject: [PATCH] Do not install qemu on neelix. --- nix/configuration/flake.lock | 2 +- nix/configuration/hosts/odo/default.nix | 1 + nix/configuration/roles/qemu/default.nix | 21 ++++++++++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/nix/configuration/flake.lock b/nix/configuration/flake.lock index 2aa1c0f..e07ea6e 100644 --- a/nix/configuration/flake.lock +++ b/nix/configuration/flake.lock @@ -327,7 +327,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-5DWw7GnwVZ98HUp/UUJcyUmmy9Bh/mcQB8MQQ0t3ZRo=", + "narHash": "sha256-H2OXIXbpDg2ngo92lzPLYc61QM6M/d5UyHGUCSRztzA=", "path": "flakes/zsh-histdb", "type": "path" }, diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index 21253e8..8ff7fe9 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -48,4 +48,5 @@ me.media.enable = true; me.python.enable = true; me.sway.enable = true; + me.qemu.enable = true; } diff --git a/nix/configuration/roles/qemu/default.nix b/nix/configuration/roles/qemu/default.nix index 2ec04a7..c59e907 100644 --- a/nix/configuration/roles/qemu/default.nix +++ b/nix/configuration/roles/qemu/default.nix @@ -8,7 +8,22 @@ { imports = [ ]; - environment.systemPackages = with pkgs; [ - qemu - ]; + options.me = { + qemu.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install qemu."; + }; + }; + + config = lib.mkIf config.me.qemu.enable ( + lib.mkMerge [ + { + environment.systemPackages = with pkgs; [ + qemu + ]; + } + ] + ); }