mirror of
https://codeberg.org/Mo8it/server_dotfiles.git
synced 2024-09-19 19:01:16 +00:00
Add podman-default-create
This commit is contained in:
parent
3f2da37952
commit
d7538473c8
1 changed files with 17 additions and 0 deletions
|
@ -1,6 +1,23 @@
|
||||||
# Environment variables
|
# Environment variables
|
||||||
set -p PATH "$HOME/.cargo/bin"
|
set -p PATH "$HOME/.cargo/bin"
|
||||||
|
|
||||||
|
# Non interactive functions
|
||||||
|
function podman-default-create -w podman
|
||||||
|
podman create \
|
||||||
|
--name $argv[1] \
|
||||||
|
--detach \
|
||||||
|
--pull always \
|
||||||
|
--label "io.containers.autoupdate=registry" \
|
||||||
|
$argv[2..]
|
||||||
|
|
||||||
|
set -l old_pwd (pwd)
|
||||||
|
cd ~/.config/systemd/user
|
||||||
|
podman generate systemd --new --files --name $argv[1]
|
||||||
|
cd $old_pwd
|
||||||
|
|
||||||
|
systemctl --user enable --now container-$argv[1]
|
||||||
|
end
|
||||||
|
|
||||||
if status is-interactive
|
if status is-interactive
|
||||||
# Interactive environment variables
|
# Interactive environment variables
|
||||||
set -x EDITOR /usr/bin/nvim
|
set -x EDITOR /usr/bin/nvim
|
||||||
|
|
Loading…
Reference in a new issue