From 39ccbe09763871dea7488eca47385a4466b5a0ac Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 18 Oct 2023 09:17:33 +0800 Subject: [PATCH] profiles/dev: use Distrobox Nix module --- modules/nixos/profiles/dev.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/nixos/profiles/dev.nix b/modules/nixos/profiles/dev.nix index 60fc89a0..b99a8f68 100644 --- a/modules/nixos/profiles/dev.nix +++ b/modules/nixos/profiles/dev.nix @@ -142,11 +142,22 @@ in { # !!! Please add your user to the "libvirtd" group. (lib.mkIf cfg.virtualization.enable { environment.systemPackages = with pkgs; [ - distrobox # I heard you like Linux... dive # Dive into container images. virt-manager # An interface for those who are lazy to read a reference manual and create a 1000-line configuration per machine. ]; + programs.distrobox = { + enable = true; + settings = { + container_additional_volumes = [ + "/nix/store:/nix/store:r" + "/etc/profiles/per-user:/etc/profiles/per-user:r" + ]; + container_image_default = "registry.opensuse.org/opensuse/distrobox-packaging:latest"; + container_command = "sh -norc"; + }; + }; + # Podman with Docker compatibility which is not 100% but still better # than nothing. virtualisation.podman = {