diff --git a/blend b/blend index 3d20d54..a5f8ecb 100755 --- a/blend +++ b/blend @@ -27,6 +27,7 @@ import getpass import pexpect import argparse import subprocess +import yaml __version = '2.0.0' @@ -93,14 +94,14 @@ def podman_it_remover(cmd: list): # END -distro_map = { - 'arch-linux': 'quay.io/toolbx/arch-toolbox:latest', - 'debian': 'quay.io/toolbx-images/debian-toolbox:testing', - 'fedora-42': 'quay.io/fedora/fedora-toolbox:42', - 'centos': 'quay.io/toolbx-images/centos-toolbox:latest', - 'ubuntu-22.04': 'quay.io/toolbx/ubuntu-toolbox:22.04', - 'ubuntu-24.04': 'quay.io/toolbx/ubuntu-toolbox:24.04', -} +distro_map = yaml.safe_load(open('/usr/share/blend/images.yaml')) +if os.path.exists(f'/etc/blend/images.yaml'): + distro_map += yaml.safe_load( + open(f'{os.getenv('XDG_CONFIG_HOME')}/blend/images.yaml')) + +if os.path.exists(f'{os.getenv('XDG_CONFIG_HOME')}/blend/images.yaml'): + distro_map += yaml.safe_load( + open(f'{os.getenv('XDG_CONFIG_HOME')}/blend/images.yaml')) default_distro = 'arch-linux' diff --git a/images.example.yaml b/images.example.yaml new file mode 100644 index 0000000..1927866 --- /dev/null +++ b/images.example.yaml @@ -0,0 +1,3 @@ +# Here you can put custom images to be used for blend +# for example: +# opensuse: quay.io/exampleauthor/opensuse:15 diff --git a/images.yaml b/images.yaml new file mode 100644 index 0000000..84a9f79 --- /dev/null +++ b/images.yaml @@ -0,0 +1,6 @@ +arch-linux: quay.io/toolbx/arch-toolbox:latest +debian: quay.io/toolbx-images/debian-toolbox:testing +fedora-42: quay.io/fedora/fedora-toolbox:42 +centos: quay.io/toolbx-images/centos-toolbox:latest +ubuntu-22.04: quay.io/toolbx/ubuntu-toolbox:22.04 +ubuntu-24.04: quay.io/toolbx/ubuntu-toolbox:24.04