--- /dev/null
+import pathlib
+import platform
+import textwrap
+
+
+def is_ubuntu_2204():
+ return platform.freedesktop_os_release().get("VERSION_CODENAME") == "jammy"
+
+
+def setup_bash():
+ if is_ubuntu_2204():
+ # clone the handy ~/.bashrc.d from Fedora
+ bash_aliases = pathlib.Path.home() / ".bash_aliases"
+ bash_aliases.write_text(textwrap.dedent("""
+ # User specific aliases and functions
+ if [ -d ~/.bashrc.d ]; then
+ for rc in ~/.bashrc.d/*; do
+ if [ -f "$rc" ]; then
+ . "$rc"
+ fi
+ done
+ fi
+ unset rc
+ """.lstrip()))
nextcloud_setup = 'p7s.nextcloud:setup_nextcloud'
soju_setup = 'p7s.soju:setup_soju'
bitlbee_setup = 'p7s.bitlbee:setup_bitlbee'
+setup_bash = 'p7s.bash:setup_bash'
setup_emacs = 'p7s.emacs:setup_emacs'
setup_ubpkg = 'p7s.ubpkg:setup_ubpkg'
update_zfs = 'p7s.zfs:update_zfs'