feat: install docker

This commit is contained in:
Tine 2024-03-09 18:47:56 +01:00
parent 72265b942d
commit 4187687b3f
Signed by: mentos1386
SSH key fingerprint: SHA256:MNtTsLbihYaWF8j1fkOHfkKNlnN1JQfxEU/rBU8nCGw
2 changed files with 26 additions and 8 deletions

View file

@ -25,10 +25,27 @@ if [ "$OS_RELEASE" = "fedora" ]; then
rpm-ostree install --idempotent --apply-live --allow-inactive -y \ rpm-ostree install --idempotent --apply-live --allow-inactive -y \
git git-lfs \ git git-lfs \
kitty zsh \ kitty zsh \
podman-docker \
gphoto2 v4l2loopback ffmpeg \ gphoto2 v4l2loopback ffmpeg \
ddcutil ddcutil
echo_header "==[host] Installing docker"
# Add Docker CE repository
cat <<EOF | sudo tee /etc/yum.repos.d/docker.repo
[docker-ce-stable]
name=Docker CE Stable - \$basearch
baseurl=https://download.docker.com/linux/fedora/\$releasever/\$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
EOF
rpm-ostree install --idempotent --apply-live --allow-inactive -y \
docker-ce docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin
sudo usermod -aG docker $USER
echo "== Docker installed, restart will be needed to take effect."
echo_header "==[host] Installing flatpaks" echo_header "==[host] Installing flatpaks"
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --user \ flatpak install -y --user \
@ -54,10 +71,14 @@ elif [ "$OS_RELEASE" = "ubuntu" ]; then
fi fi
echo_header "==[host] Installing Nix" echo_header "==[host] Installing Nix"
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install if ! nix --version; then
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
nix-channel --add https://nixos.org/channels/nixpkgs-unstable . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
nix-channel --update nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
else
echo "Already installed, skipping"
fi
echo_header "==[host] Installing Home Manager" echo_header "==[host] Installing Home Manager"
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager

View file

@ -41,9 +41,6 @@
direnv direnv
sqlfluff sqlfluff
# Docker
docker-compose
# Nodejs # Nodejs
nodejs_20 nodejs_20