From 5f8b85ff66c1fb5a7773d3e6006848af487aef35 Mon Sep 17 00:00:00 2001 From: winston Date: Sun, 28 Apr 2024 22:08:04 +0200 Subject: [PATCH] feat: turn off podman on WSL --- machines/common/shared/podman.nix | 19 +++++++++++++++++-- machines/common/wsl/default.nix | 15 +++++++++------ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/machines/common/shared/podman.nix b/machines/common/shared/podman.nix index 9186f0c..96e41bf 100644 --- a/machines/common/shared/podman.nix +++ b/machines/common/shared/podman.nix @@ -1,5 +1,12 @@ -{pkgs, ...}: { - environment = { +{ + lib, + pkgs, + ... +}: let + inherit (lib) mkIf; + inherit (pkgs.stdenv) isDarwin isLinux; +in { + environment = mkIf isDarwin { systemPackages = with pkgs; [ podman podman-compose @@ -8,4 +15,12 @@ ]; pathsToLink = ["/share/qemu"]; }; + + virtualisation.podman = mkIf isLinux { + enable = true; + extraPackages = with pkgs; [ + podman-compose + podman-tui + ]; + }; } diff --git a/machines/common/wsl/default.nix b/machines/common/wsl/default.nix index d6341ac..5d492bd 100644 --- a/machines/common/wsl/default.nix +++ b/machines/common/wsl/default.nix @@ -2,16 +2,19 @@ lib, pkgs, ... -}: { +}: let + inherit (lib) mkForce; +in { services = { - kanata.enable = lib.mkForce false; - dnsmasq.enable = lib.mkForce false; - mullvad-vpn.enable = lib.mkForce false; - stubby.enable = lib.mkForce false; + kanata.enable = mkForce false; + dnsmasq.enable = mkForce false; + mullvad-vpn.enable = mkForce false; + stubby.enable = mkForce false; }; + virtualisation.podman.enable = mkForce false; system = { - build.installBootLoader = lib.mkForce "${pkgs.coreutils}/bin/true"; + build.installBootLoader = mkForce "${pkgs.coreutils}/bin/true"; stateVersion = "23.11"; }; }