Mercurial > code > home > repos > infra
diff packages.py @ 114:7e280bf26dba
package lists big update, pulling from /var/log/apt on a few hosts
author | drewp@bigasterisk.com |
---|---|
date | Sat, 29 Oct 2022 21:34:50 -0700 |
parents | 0381ed592b5c |
children | fe3ae7c95e65 |
line wrap: on
line diff
--- a/packages.py Sat Aug 20 22:35:31 2022 -0700 +++ b/packages.py Sat Oct 29 21:34:50 2022 -0700 @@ -1,12 +1,13 @@ from pyinfra import host from pyinfra.facts.server import LinuxDistribution from pyinfra.operations import apt, files, server +import package_lists is_pi = host.get_fact(LinuxDistribution)['name'] in ['Debian', 'Raspbian GNU/Linux'] def kitty(): - vers = '0.25.2' # see https://github.com/kovidgoyal/kitty/releases + vers = '0.26.4' # see https://github.com/kovidgoyal/kitty/releases home = '/home/drewp' local = f"{home}/.local/kitty" dl = f'/tmp/kitty-{vers}-x86_64.txz' @@ -23,7 +24,7 @@ server.shell([ # https://github.com/pnpm/pnpm/releases # but also https://pnpm.io/installation#compatibility - "npm install -g pnpm@6.32.22", + "npm install -g pnpm@6.35.0", ]) @@ -39,7 +40,7 @@ # 'apt upgrade'? apt.packages( update=False, # see system.py - packages=['dirmngr', 'gnupg2', 'apt-utils', 'aptitude']) + packages=package_lists.pi_setup) apt.key(src='https://ftp-master.debian.org/keys/archive-key-8.asc') apt.key(src='https://ftp-master.debian.org/keys/archive-key-8-security.asc') @@ -55,33 +56,17 @@ if not is_pi: apt.key(keyserver='keyserver.ubuntu.com', keyid='8B48AD6246925553') + +if host.name in ['pipe','prime'] or is_pi: + apt.packages(packages=['mandb'], present=False) + if host.name == 'pipe': - apt.packages(packages=['mandb', 'apt-listchanges'], present=False) + apt.packages(packages=['apt-listchanges'], present=False) files.template(src='templates/odroid_sources.list.j2', dest='/etc/apt/sources.list', rel='focal') - apt.packages(packages=[ - 'python3-iptables', - 'podman-docker', - ]) elif is_pi: pi_sources() -apt.packages(packages=[ - 'build-essential', - 'dstat', - 'ifstat', - 'iptables', - 'iproute2', # needed for wireguard - 'kitty-terminfo', - 'mosquitto-clients', - 'ncdu', - 'rsync', - 'xosview', - 'zsh', - "atool", - "udns-utils", - "wireguard-tools", -]) - +apt.packages(packages=package_lists.setup) if not is_pi: if host.name != 'prime': apt.key(src='https://dl.google.com/linux/linux_signing_key.pub') @@ -93,31 +78,7 @@ apt.key(keyserver='keyserver.ubuntu.com', keyid='F24AEA9FB05498B7') apt.repo(src="deb [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam") - apt.packages(packages=[ - 'debian-goodies', - 'ethtool', - 'htop', - 'iotop', - 'keychain', - 'lpr', - 'lua5.3', - 'mercurial', - 'mtr-tiny', - 'net-tools', - 'nodejs', - 'npm', - 'oping', - 'python3-invoke', - 'python3-pip', - 'python3-virtualenv', - 'speedtest-cli', - 'sysstat', - 'tcpdump', - ]) - if host.name in ['dash', 'slash', 'bang']: - apt.packages(packages=[ - 'podman-docker', - ]) + apt.packages(packages=package_lists.non_pi) if host.name != 'pipe': apt.packages(packages=[ 'reptyr', @@ -126,23 +87,20 @@ kitty() pnpm() +proper_locate() +apt.packages(packages=package_lists.general) +apt.packages(packages=package_lists.debug) -proper_locate() if host.name == "bang": - apt.packages(packages=[ - 'dnsmasq', - 'iptables', - 'ntpdate', - 'openntpd', - 'zfs-auto-snapshot', - 'zfs-zed', - 'zfsutils-linux', - ]) + apt.packages(packages=package_lists.for_bang) + +if host.name == "pipe": + apt.packages(packages=package_lists.for_pipe) if host.name == 'plus': - apt.packages(packages=[ - 'network-manager', - 'brightnessctl', - 'xserver-xorg-input-synaptics', - ]) + apt.packages(packages=package_lists.laptop) + +desktop_env = host.name in ['dash', 'slash', 'plus'] +if desktop_env: + apt.packages(packages=package_lists.xorg + package_lists.desktop)