diff --git a/etc/apt/keyrings/docker-archive-keyring.gpg b/etc/apt/keyrings/docker-archive-keyring.gpg new file mode 100644 index 0000000..e5dc8cf Binary files /dev/null and b/etc/apt/keyrings/docker-archive-keyring.gpg differ diff --git a/etc/apt/keyrings/microsoft-archive-keyring.gpg b/etc/apt/keyrings/microsoft-archive-keyring.gpg new file mode 100644 index 0000000..0cffae0 Binary files /dev/null and b/etc/apt/keyrings/microsoft-archive-keyring.gpg differ diff --git a/etc/apt/keyrings/slack-archive-keyring.gpg b/etc/apt/keyrings/slack-archive-keyring.gpg new file mode 100644 index 0000000..b6788cf Binary files /dev/null and b/etc/apt/keyrings/slack-archive-keyring.gpg differ diff --git a/etc/apt/keyrings/tailscale-archive-keyring.gpg b/etc/apt/keyrings/tailscale-archive-keyring.gpg new file mode 100644 index 0000000..603538d Binary files /dev/null and b/etc/apt/keyrings/tailscale-archive-keyring.gpg differ diff --git a/etc/apt/sources.list.d/code.list b/etc/apt/sources.list.d/code.list new file mode 100644 index 0000000..2f02a00 --- /dev/null +++ b/etc/apt/sources.list.d/code.list @@ -0,0 +1 @@ +deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] http://packages.microsoft.com/repos/code stable main diff --git a/etc/apt/sources.list.d/docker-ce.list b/etc/apt/sources.list.d/docker-ce.list new file mode 100644 index 0000000..2d056e4 --- /dev/null +++ b/etc/apt/sources.list.d/docker-ce.list @@ -0,0 +1 @@ +deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable diff --git a/etc/apt/sources.list.d/docker-compose-plugin.list b/etc/apt/sources.list.d/docker-compose-plugin.list new file mode 100644 index 0000000..a004ed2 --- /dev/null +++ b/etc/apt/sources.list.d/docker-compose-plugin.list @@ -0,0 +1 @@ +# docker-ce.list diff --git a/etc/apt/sources.list.d/microsoft-edge-stable.list b/etc/apt/sources.list.d/microsoft-edge-stable.list new file mode 100644 index 0000000..166c2bb --- /dev/null +++ b/etc/apt/sources.list.d/microsoft-edge-stable.list @@ -0,0 +1 @@ +deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/edge stable main diff --git a/etc/apt/sources.list.d/slack-desktop.list b/etc/apt/sources.list.d/slack-desktop.list new file mode 100644 index 0000000..8563798 --- /dev/null +++ b/etc/apt/sources.list.d/slack-desktop.list @@ -0,0 +1 @@ +deb [signed-by=/usr/share/keyrings/slack-archive-keyring.gpg] https://packagecloud.io/slacktechnologies/slack/debian/ jessie main diff --git a/etc/apt/sources.list.d/tailscale.list b/etc/apt/sources.list.d/tailscale.list new file mode 100644 index 0000000..95dcf82 --- /dev/null +++ b/etc/apt/sources.list.d/tailscale.list @@ -0,0 +1 @@ +deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/ubuntu jammy main diff --git a/install b/install index e0efebd..cf71eea 100755 --- a/install +++ b/install @@ -2,7 +2,7 @@ set -euo pipefail cd -- "$(dirname -- "$0")" -function main() { +function install_dotfiles() { local home local dotfile home=$(eval echo ~"${SUDO_USER:-$(id -un)}") @@ -17,4 +17,23 @@ function main() { done } -main +function install_apt_packages() { + local packages + local package + packages=() + for package in etc/apt/sources.list.d/*.list; do + package=${package##*/} + package=${package%.list} + packages+=("$package") + done + + rsync -rv etc/apt/keyrings/ /usr/share/keyrings/ + rsync -rv etc/apt/sources.list.d/ /etc/apt/sources.list.d/ + apt update + apt install -y "${packages[@]}" +} + +install_dotfiles +(($(id -u) == 0)) \ + && [[ -d /etc/apt/sources.list.d ]] \ + && install_apt_packages