diff --git a/NOTES.md b/NOTES.md deleted file mode 100644 index 9773d5c6..00000000 --- a/NOTES.md +++ /dev/null @@ -1,35 +0,0 @@ -### Git Town - -This could be used to replace our custom commands. -already aliased to `gt` with autocomplete. - -Not sure about our `g_commit_and_push` func yet. - -### git-filter-repo - -A python package to rewrite git history. - -### trash-cli - -Might be interesting: - -https://github.com/devops-works/binenv/blob/6d907ddcc0e52557343b2965690da4efbaeacec2/DISTRIBUTIONS.md - -needed for python (sigh...): `sudo apt-get install build-essential libssl-dev libffi-dev python-dev` - -TODO: check whether http deb packages are installed before executing. -TODO: check if we can reduce python dependencies -TODO: add error handling for ansible not installed - -### Quick notes on Ubuntu Asahi install - -After installation: - -1. Connect to the internet -2. Create a new user with `sudo adduser ` and follow the prompts. This will be the main user -3. Add this user to sudo with `sudo usermod -aG sudo ` -4. Run `sudo apt update` -5. Run `sudo apt upgrade` -6. Reboot system -7. Log in as the newly created user -8. System should now be ready for Chezmoi... diff --git a/README.md b/README.md index 7cf20253..ad4a6942 100644 --- a/README.md +++ b/README.md @@ -26,22 +26,27 @@ sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --verbose tmeijn" 1. In a terminal, execute: ```bash - sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --verbose --exclude scripts tmeijn" + sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --exclude scripts tmeijn" ``` -1. Close the terminal and open a new terminal and execute: +1. **Close the current terminal** +1. Open a new terminal and execute: ```bash - sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --verbose tmeijn" + export ANSIBLE_PASSWORD="" + ``` + + ```bash + sh -c "$(wget -qO- get.chezmoi.io) -- init --apply tmeijn" ``` **note:** this might crash during installation. In that case open a new terminal and keep running `chezmoi apply`. -1. After reboot, unlock Bitwarden using `rbw unlock` +1. After reboot, open a terminal and unlock Bitwarden using our `reco` alias 1. Login to [`Atuin`](https://atuin.sh/): ```bash - atuin login -u zero-mass92 -p $(rbw get "Atuin Sync") -k "$(rbw get "Atuin Sync" -f Key)" + atuin login -u zero-mass92 -p $(rbw get "Atuin Sync") -k "$(rbw get "Atuin Sync" -f Key) && atuin sync" ``` 1. Navigate to the chezmoi dir by executing `chezmoi cd` @@ -71,7 +76,7 @@ In a terminal, get the Firefox Account Password by running: rbw get "Firefox Account" | pbcopy ``` -Open Firefox and open the top-right menu to enable sync. +Open a **new** Firefox window and open the top-right menu to enable sync. You will be required to login, use your email and the password you just copied to your clipboard. After logging in, all the Add-ons will be synced to the machine. @@ -97,23 +102,23 @@ In the left sidebar, down left, login using your GitHub account. Everything shou Open `Settings -> Online Accounts`. Click the Microsoft 365 account and add the following ID as tenant ID: `8ef61e06-9fd5-49af-9b63-6983aede4213`. [Source](https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1382). Note that this should no longer be needed once we run Gnome 47, which has this pre-configured. -NOTE: this does not work correctly with syncing back so we started using rclone. Document this before pushing this readme again. summary steps: - -https://itsfoss.com/use-onedrive-linux-rclone/ Followed this guide. +Configure `rclone` by creating a Onedrive. This must have `onedrive` as the name to automatically mount on startup! ## Speedrun record ๐Ÿƒ I try and re-install my system about every month while measuring how long it takes to set back up again. Since this is on Ubuntu Asahi, I measure this from the point the OS is installed and a new user with my name has been set up. -Current record: **20:38:32** (- ~12min), set at 28-01-2024. +Current record: **20:38:32** (- ~12 minutes), set at 28-01-2024. + +See [RUN_RECORDS.md](./RUN_RECORDS.md) for historical runs and more. ## Tools Used ๐Ÿงฐ Everything is managed by [`chezmoi`](https://www.chezmoi.io/). The `run_once_` Bash scripts install all the tools we depend upon and actually manage the machine, namely: -- **Aqua**: [`aqua`](https://aquaproj.github.io/) is our entrypoint and actually installs Mise and a lot of other single-binary, zero dependency tools. +- **Aqua**: [`aqua`](https://aquaproj.github.io/) is our entrypoint and actually installs a lot of single-binary, zero dependency tools. - **Mise**: [`mise`](https://mise.jdx.dev/) manages our more involved tools like Python, Node, Go, Rust, etc. See the [`config.toml`](chezmoi/dot_config/mise/config.toml) for all dependencies managed. - **Ansible**: [Ansible](https://www.ansible.com/) manages our installed Applications using Flatpak, APT and sometimes a plain `.deb` file. See the [Ansible Playbook](ansible/setup.yaml) for more detailed information. diff --git a/RUN_RECORDS.md b/RUN_RECORDS.md new file mode 100644 index 00000000..dd883f0d --- /dev/null +++ b/RUN_RECORDS.md @@ -0,0 +1,31 @@ +# Run Records + +## Template + +```plain +## + +Completion time: `` + +### Remarks + +### Possible improvements + +``` + +## 10-01-2025 + +Completion time: `27:05:25` + +### Remarks + +Actually went really smooth this time. Flatpaks and cargo installs take a really long time, but that was still 10 minutes or so. The reboot in the VM takes a really long time so certainly lost time there. Then there is the extension installation which just takes a bit of time and keeps shifting focus of the tab. Signing in to vscode opens LibreOffice Writer (WTF?!). Extension installation finally now is a good experience. + +### Possible improvements + +- ~~Open instructions in new window so it does not lose focus when settings up addons~~ +- ~~Shorten reboot time~~ +- ~~Preset `ANSIBLE_PASSWORD`~~ +- ~~See if `gext` has a way to disable confirmation~~: not possible, see [issue](https://github.com/essembeh/gnome-extensions-cli/issues/13#issuecomment-1529160849) +- ~~Add instruction to explicitly sync Atuin~~ +- ~~Check logins of the sites and maybe have priorities?~~: cleaned up logins, can't have priorities. diff --git a/chezmoi/.chezmoi.toml.tmpl b/chezmoi/.chezmoi.toml.tmpl index f8426640..4d0bac95 100644 --- a/chezmoi/.chezmoi.toml.tmpl +++ b/chezmoi/.chezmoi.toml.tmpl @@ -4,5 +4,9 @@ args = [ "-c", "cp {{ "{{ .Target }}" }} {{ "{{ .Target }}" }}.base && code --new-window --wait --merge {{ "{{ .Destination }}" }} {{ "{{ .Target }}" }} {{ "{{ .Target }}" }}.base {{ "{{ .Source }}" }}", ] + +# This need to detect if we are interactive or in a script. +{{ if lookPath "diffnav" }} [diff] pager = "diffnav" +{{ end }} diff --git a/chezmoi/.chezmoiscripts/run_once_after_21_install-mise.sh b/chezmoi/.chezmoiscripts/run_once_after_21_install-mise.sh new file mode 100644 index 00000000..f24551ca --- /dev/null +++ b/chezmoi/.chezmoiscripts/run_once_after_21_install-mise.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +echo "" +echo "===============================================================" +echo "" +echo "Installing Mise" +echo "" +echo "===============================================================" +echo "" + +wget -qO- https://mise.run/ | sh diff --git a/chezmoi/.chezmoiscripts/run_once_after_22_install-core-dependencies.sh.tmpl b/chezmoi/.chezmoiscripts/run_once_after_22_install-core-dependencies.sh.tmpl new file mode 100644 index 00000000..99413ba0 --- /dev/null +++ b/chezmoi/.chezmoiscripts/run_once_after_22_install-core-dependencies.sh.tmpl @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +echo "" +echo "===============================================================" +echo "" +echo "Installing core dependencies with Ansible" +echo "" +echo "===============================================================" +echo "" + +# ansible/tasks/install_core_packages.yaml hash: {{ include "ansible/tasks/install_core_packages.yaml" | sha256sum }} + +sudo apt-get update + +echo "Installing dependencies for building Python..." +sudo apt-get install -qq -y make build-essential libssl-dev zlib1g-dev \ + libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ + libncurses-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev + +echo "Installing Git as Mise needs that as dependency" +sudo apt install git -y + + +mise install python +mise install pipx +mise install pipx:ansible[pipx_args="--include-deps"] + +echo "Initializing mise..." +eval "$(mise env -s bash)" + +ansible-playbook -v {{ joinPath .chezmoi.sourceDir "ansible/setup.yaml" | quote }} --tags core-packages diff --git a/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh b/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh index 1f17af38..aeae07b2 100644 --- a/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh +++ b/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh @@ -8,15 +8,4 @@ echo "" echo "===============================================================" echo "" -echo "Installing Git as Mise needs that as dependency" -sudo apt install git -y - -wget -qO- https://mise.run/ | sh - -echo "Installing dependencies for building Python..." -sudo apt-get update -sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \ - libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ - libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev - mise install --yes diff --git a/chezmoi/.chezmoiscripts/run_once_after_40_install-ansible.sh.tmpl b/chezmoi/.chezmoiscripts/run_once_after_40_install-ansible.sh.tmpl index 5e124e6d..10ed853b 100644 --- a/chezmoi/.chezmoiscripts/run_once_after_40_install-ansible.sh.tmpl +++ b/chezmoi/.chezmoiscripts/run_once_after_40_install-ansible.sh.tmpl @@ -14,9 +14,6 @@ echo "" echo "Initializing mise..." eval "$(mise env -s bash)" -# pipx does not automatically install the dependencies and therefore we cannot install it with mise. -pipx install --include-deps ansible - if [[ -v ANSIBLE_PASSWORD ]]; then echo "ANSIBLE_PASSWORD set, becoming with value" echo "debug: $ANSIBLE_PASSWORD" diff --git a/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl b/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl index 23fc1f2c..e94014eb 100644 --- a/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl +++ b/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl @@ -11,6 +11,9 @@ echo "" echo "===============================================================" echo "" -cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | xargs -I {} gext install {} +echo "Initializing mise..." +eval "$(mise env -s bash)" + +gext -D install $(cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | tr '\n' ' ') dconf load / < {{ joinPath .chezmoi.sourceDir "dconf.ini" | quote }} diff --git a/chezmoi/.chezmoiscripts/run_once_after_99_reboot.sh b/chezmoi/.chezmoiscripts/run_once_after_99_reboot.sh index 1403e2d0..41e39cd3 100644 --- a/chezmoi/.chezmoiscripts/run_once_after_99_reboot.sh +++ b/chezmoi/.chezmoiscripts/run_once_after_99_reboot.sh @@ -20,9 +20,9 @@ perform_reboot() { reboot } -echo "Rebooting in 30 seconds. Type 'x' and press Enter to cancel the reboot." +echo "Rebooting in 10 seconds. Type 'x' and press Enter to cancel the reboot." -for i in {30..1}; do +for i in {10..1}; do echo -ne "\rRebooting in $i seconds... " # Check for user input in the background diff --git a/chezmoi/.chezmoiscripts/run_onchange_10_run_ansible.sh.tmpl b/chezmoi/.chezmoiscripts/run_onchange_10_run_ansible.sh.tmpl index f23de14b..5e65d0a0 100644 --- a/chezmoi/.chezmoiscripts/run_onchange_10_run_ansible.sh.tmpl +++ b/chezmoi/.chezmoiscripts/run_onchange_10_run_ansible.sh.tmpl @@ -11,4 +11,3 @@ if command -v ansible-playbook &> /dev/null; then ansible-playbook -v {{ joinPath .chezmoi.sourceDir "ansible/setup.yaml" | quote }} --ask-become-pass fi fi - diff --git a/chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl b/chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl index 0fe65230..fc4ef24d 100644 --- a/chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl +++ b/chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl @@ -11,6 +11,5 @@ echo "" # dconf.ini hash: {{ include "installed-extensions.txt" | sha256sum }} if command -v gext &> /dev/null; then - cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | xargs -I {} gext install {} + gext -D install $(cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | tr '\n' ' ') fi - diff --git a/chezmoi/ansible/setup.yaml b/chezmoi/ansible/setup.yaml index abea5a97..eef2dbe3 100644 --- a/chezmoi/ansible/setup.yaml +++ b/chezmoi/ansible/setup.yaml @@ -28,6 +28,13 @@ vscode_deb_url: https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-arm64 when: ansible_architecture == 'aarch64' + - name: Install core packages + include_tasks: + file: tasks/install_core_packages.yaml + apply: + tags: [core-packages] + tags: [core-packages] + - name: Install packages ansible.builtin.apt: pkg: @@ -42,6 +49,7 @@ - gtk2-engines-murrine - jc - kitty # Our terminal! + - lshw - nala - network-manager-l2tp - network-manager-l2tp-gnome @@ -83,14 +91,10 @@ community.general.flatpak: name: - org.videolan.VLC - - org.gnome.meld - io.podman_desktop.PodmanDesktop - - org.flameshot.Flameshot - io.dbeaver.DBeaverCommunity - io.github.seadve.Kooha - - com.axosoft.GitKraken - md.obsidian.Obsidian - - app.getclipboard.Clipboard - dev.vencord.Vesktop - com.moonlight_stream.Moonlight state: present @@ -175,22 +179,21 @@ - name: "[BLOCK] Add repo, install and configure Incus" block: - name: Add Incus's official GPG key - ansible.builtin.apt_key: + ansible.builtin.get_url: url: https://pkgs.zabbly.com/key.asc - keyring: /etc/apt/keyrings/zabbly.asc - state: present - - name: Add Incus repository - ansible.builtin.apt_repository: - repo: >- - Enabled: yes + dest: /etc/apt/keyrings/zabbly.asc + # NOTE: hardcoded to noble as Incus does not do non-LTS releases + - name: Add Incus repository file + ansible.builtin.copy: + dest: "/etc/apt/sources.list.d/incus.sources" + content: | Types: deb URIs: https://pkgs.zabbly.com/incus/stable Suites: noble Components: main Architectures: {{ arch_mapping[ansible_architecture] | default(ansible_architecture) }} Signed-By: /etc/apt/keyrings/zabbly.asc - filename: incus - state: present + mode: '0644' - name: Install Incus and related packages ansible.builtin.apt: pkg: @@ -207,50 +210,6 @@ groups: incus-admin append: true - # === NOTE: This is currently not working on Ubuntu Asahi - # - name: "[BLOCK] Add repo, install and configure Firefox" - # block: - # - name: Add Firefox's official GPG key - # ansible.builtin.apt_key: - # url: https://packages.mozilla.org/apt/repo-signing-key.gpg - # keyring: /etc/apt/keyrings/packages.mozilla.org.gpg - # state: absent - # - name: Add Firefox repository - # ansible.builtin.apt_repository: - # repo: >- - # deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.gpg] - # https://packages.mozilla.org/apt mozilla main - # filename: mozilla - # state: absent - # - name: Install Firefox - # ansible.builtin.apt: - # pkg: - # - firefox - # state: absent - # update_cache: true - - # === NOTE: This is currently not working on Ubuntu Asahi - # - name: "[BLOCK] Add repo, install and configure Progressive Web Apps for Firefox" - # block: - # - name: ==== Add firefoxpwa's official GPG key - # ansible.builtin.apt_key: - # url: https://packagecloud.io/filips/FirefoxPWA/gpgkey - # keyring: /usr/share/keyrings/firefoxpwa-keyring.gpg - # state: absent - # - name: Add firefoxpwa repository - # ansible.builtin.apt_repository: - # repo: >- - # deb [signed-by=/usr/share/keyrings/firefoxpwa-keyring.gpg] - # https://packagecloud.io/filips/FirefoxPWA/any any main - # filename: firefoxpwa - # state: absent - # - name: Install Progressive Web Apps for Firefox - # ansible.builtin.apt: - # pkg: - # - firefoxpwa - # state: absent - # update_cache: true - # NOTE: this should be absolutely last as afterwards restart is needed. - name: Install Pop Shell if not present become: false diff --git a/chezmoi/ansible/tasks/install_core_packages.yaml b/chezmoi/ansible/tasks/install_core_packages.yaml new file mode 100644 index 00000000..badbc7df --- /dev/null +++ b/chezmoi/ansible/tasks/install_core_packages.yaml @@ -0,0 +1,46 @@ +- name: Ensure git PPA + ansible.builtin.apt_repository: + repo: 'ppa:git-core/ppa' + state: present + +- name: Update apt cache + ansible.builtin.apt: + update_cache: true + +- name: Install git + ansible.builtin.apt: + pkg: + - git + state: latest + +- name: Install Python dependencies + ansible.builtin.apt: + pkg: + - make + - build-essential + - libssl-dev + - zlib1g-dev + - libbz2-dev + - libreadline-dev + - libsqlite3-dev + - wget + - curl + - llvm + - libncurses-dev + - xz-utils + - tk-dev + - libxml2-dev + - libxmlsec1-dev + - libffi-dev + - liblzma-dev + +- name: Install cmake for Onefetch + ansible.builtin.apt: + pkg: + - cmake + +- name: Install dependencies for gnome-extensions-cli + ansible.builtin.apt: + pkg: + - libcairo2-dev + - libgirepository1.0-dev diff --git a/chezmoi/dconf.ini b/chezmoi/dconf.ini index 449e7d3b..4e39def5 100644 --- a/chezmoi/dconf.ini +++ b/chezmoi/dconf.ini @@ -9,8 +9,8 @@ width=1254 [apps/update-manager] first-run=false -launch-count=254 -launch-time=int64 1733411714 +launch-count=255 +launch-time=int64 1736494138 show-details=true window-height=574 window-width=534 @@ -26,7 +26,7 @@ window-width=1254 show-percentage=true [com/ubuntu/update-notifier] -release-check-time=uint32 1732806634 +release-check-time=uint32 1736449767 [desktop/ibus/general] preload-engines=['xkb:us::eng'] @@ -36,7 +36,7 @@ version='1.5.22' favorites=['๐ŸŽค', '๐Ÿ›ก', '๐Ÿ”“', '๐Ÿ—', 'โš’๏ธ', '๐Ÿ•ต๏ธ', '๐Ÿ—ƒ๏ธ', '๐Ÿ‘ฅ', '๐Ÿ“Š', '๐Ÿ”‘', '๐Ÿก', '๐Ÿงก', 'โ›”', 'โš ๏ธ'] [org/gnome/Characters] -recent-characters=['๐Ÿ‘‹๐Ÿพ', '๐Ÿคฎ', '๐ŸŽ๏ธ', '๐Ÿšฉ', '๐Ÿ‘ด๐Ÿป', '๐Ÿธ', 'โœŒ', 'โœ๐Ÿพ', '๐Ÿ—๏ธ', '๐Ÿ”‘', '๐Ÿ—ƒ๏ธ', '๐Ÿ”“', '๐Ÿ’ก', '๐Ÿ”’'] +recent-characters=['๐Ÿ“ฎ', '๐Ÿ‘‹๐Ÿพ', '๐Ÿคฎ', '๐ŸŽ๏ธ', '๐Ÿšฉ', '๐Ÿ‘ด๐Ÿป', '๐Ÿธ', 'โœŒ', 'โœ๐Ÿพ', '๐Ÿ—๏ธ', '๐Ÿ”‘', '๐Ÿ—ƒ๏ธ', '๐Ÿ”“', '๐Ÿ’ก', '๐Ÿ”’'] [org/gnome/Extensions] window-height=1360 @@ -96,7 +96,7 @@ panel-id='world' size=(870, 690) [org/gnome/control-center] -last-panel='power' +last-panel='bluetooth' window-state=(1254, 1360, false) [org/gnome/deja-dup] @@ -146,8 +146,8 @@ translate=true [org/gnome/desktop/background] color-shading-type='solid' picture-options='zoom' -picture-uri='file:///home/tmeijn/snap/firefox/common/Firefox_wallpaper.png' -picture-uri-dark='file:///home/tmeijn/snap/firefox/common/Firefox_wallpaper.png' +picture-uri='file:///home/tmeijn/.local/share/backgrounds/Firefox_wallpaper.png' +picture-uri-dark='file:///home/tmeijn/.local/share/backgrounds/Firefox_wallpaper.png' primary-color='#000000000000' secondary-color='#000000000000' @@ -419,7 +419,7 @@ report-technical-problems=true [org/gnome/desktop/screensaver] color-shading-type='solid' picture-options='zoom' -picture-uri='file:///home/tmeijn/.local/share/backgrounds/2024-01-18-12-23-01-galaxy.jpeg' +picture-uri='file:///home/tmeijn/.local/share/backgrounds/Firefox_wallpaper.png' primary-color='#000000000000' secondary-color='#000000000000' @@ -509,7 +509,7 @@ sort-type='ascending' [org/gnome/file-roller/ui] sidebar-width=200 -window-height=1360 +window-height=674 window-width=1254 [org/gnome/gedit/plugins] @@ -608,7 +608,7 @@ search-view='list-view' show-image-thumbnails='always' [org/gnome/nautilus/window-state] -initial-size=(2560, 1400) +initial-size=(1254, 1360) maximized=false sidebar-width=210 @@ -713,6 +713,7 @@ night-light-temperature=uint32 2700 custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/'] email=['e'] home=['f'] +mic-mute=@as [] rotate-video-lock-static=@as [] screensaver=['Escape'] terminal=['t'] @@ -785,7 +786,7 @@ sigma=18 [org/gnome/shell/extensions/clipboard-indicator] history-size=120 -move-item-first=true +move-item-first=false [org/gnome/shell/extensions/coverflowalttab] switcher-background-color=(0.93333333333333335, 0.93333333333333335, 0.92549019607843142) @@ -846,6 +847,7 @@ panel-lengths='{"0":80,"1":80}' panel-positions='{"0":"BOTTOM","1":"BOTTOM"}' panel-sizes='{"0":40,"1":40}' primary-monitor=1 +scroll-panel-action='NOTHING' show-appmenu=false show-apps-icon-file='' show-favorites=true @@ -1108,6 +1110,7 @@ switch-to-application-2=@as [] switch-to-application-3=@as [] toggle-message-tray=['v'] toggle-overview=@as [] +toggle-quick-settings=@as [] [org/gnome/shell/overrides] edge-tiling=false @@ -1130,8 +1133,8 @@ save-format='application/pdf' selected-device='escl:http://192.168.178.19:8080' [org/gnome/software] -check-timestamp=int64 1733911295 -flatpak-purge-timestamp=int64 1733896832 +check-timestamp=int64 1736762828 +flatpak-purge-timestamp=int64 1736759166 install-timestamp=int64 1680257960 packagekit-historical-updates-timestamp=uint64 1680257960 update-notification-timestamp=int64 1705750277 @@ -1140,16 +1143,18 @@ update-notification-timestamp=int64 1705750277 enabled=true [org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9] -background-color='rgb(0,43,54)' +background-color='rgb(255,255,255)' bold-is-bright=true custom-command='kitty' -font='Fira Code 12' -foreground-color='rgb(131,148,150)' +font='Ubuntu Mono 14' +foreground-color='rgb(0,0,0)' login-shell=true +palette=['rgb(0,0,0)', 'rgb(205,0,0)', 'rgb(0,205,0)', 'rgb(205,205,0)', 'rgb(0,0,238)', 'rgb(205,0,205)', 'rgb(0,205,205)', 'rgb(229,229,229)', 'rgb(127,127,127)', 'rgb(255,0,0)', 'rgb(0,255,0)', 'rgb(255,255,0)', 'rgb(92,92,255)', 'rgb(255,0,255)', 'rgb(0,255,255)', 'rgb(255,255,255)'] preserve-working-directory='always' use-custom-command=false use-system-font=false -use-theme-colors=false +use-theme-colors=true +use-theme-transparency=true [org/gnome/tweaks] show-extensions-notice=false diff --git a/chezmoi/dot_config/ghorg/reclone.yaml b/chezmoi/dot_config/ghorg/reclone.yaml index aad76c29..193ef7c6 100644 --- a/chezmoi/dot_config/ghorg/reclone.yaml +++ b/chezmoi/dot_config/ghorg/reclone.yaml @@ -7,6 +7,11 @@ # cmd: "ghorg clone command here" # description: "Optional description that will be printed to stdout when running `ghorg reclone --list`" +personal: + cmd: "ghorg clone tmeijn --clone-type=user" + description: "Clones my personal account projects." + el-capitano: cmd: "ghorg clone el-capitano" description: "Clones our personal group, El Capitano." + diff --git a/chezmoi/dot_config/mise/config.toml b/chezmoi/dot_config/mise/config.toml index 84af5130..c318a178 100644 --- a/chezmoi/dot_config/mise/config.toml +++ b/chezmoi/dot_config/mise/config.toml @@ -8,6 +8,7 @@ node = "23.6.0" python = "3.13.1" pre-commit = "latest" protoc = "latest" +rclone = "1.69.0" rust = "1.83.0" slsa-verifier = "2.6.0" terraform-docs = "latest" @@ -18,11 +19,11 @@ tflint = "latest" # Python Packages - Managed by uv # ################################### pipx = "latest" -"pipx:ansible" = "latest" +"pipx:ansible" = { version = "11.1.0", pipx_args = "--include-deps" } "pipx:ansible-lint" = "latest" "pipx:aws-gate" = "latest" -"pipx:gnome-extensions-cli" = "0.10.4" -"pipx:harlequin" = { version = "latest", extras = "postgres", uvx_args = "--python 3.12" } # Python 3.13 not yet supported: https://github.com/tconbeer/harlequin/issues/697 +"pipx:gnome-extensions-cli" = { version = "0.10.4", pipx_args = "--preinstall pycairo --preinstall PyGObject" } +"pipx:harlequin" = { version = "latest", extras = "postgres", pipx_args = "--python 3.12" } # Python 3.13 not yet supported: https://github.com/tconbeer/harlequin/issues/697 "pipx:pgcli" = "latest" "pipx:readmeai" = "latest" "pipx:spiel" = "0.5.1" @@ -33,21 +34,17 @@ pipx = "latest" # Cargo Packages # ################## "cargo:ag" = "latest" -"cargo:bandwhich" = "latest" -"cargo:crates-tui" = "latest" "cargo:gitnr" = "latest" "cargo:fioncat/otree" = "HEAD" "cargo:fish-shell/fish-shell" = "rev:4.0b1" "cargo:hwatch" = "latest" "cargo:mergiraf" = "0.4.0" -"cargo:oha" = "latest" "cargo:onefetch" = "latest" "cargo:pik" = "latest" "cargo:racum/uuinfo" = "HEAD" "cargo:rbw" = "1.13.1" "cargo:ripgrep_all" = "latest" "cargo:serie" = "latest" -"cargo:tfocus" = "0.1.3" "cargo:zeitfetch" = "latest" ############### @@ -57,25 +54,28 @@ pipx = "latest" "go:github.com/chip/pathos" = "latest" "go:github.com/umlx5h/gtrash" = "latest" "go:github.com/walles/moar" = "latest" -"go:google.golang.org/grpc/cmd/protoc-gen-go-grpc" = "1.5" -"go:google.golang.org/protobuf/cmd/protoc-gen-go" = "1.36" ################ # NPM Packages # ################ -"npm:gitlab-ci-local" = "latest" +#"npm:gitlab-ci-local" = "latest" # Disable for now as it does not install correctly on first boot. ################ # UBI Packages # ################ "ubi:aws-cloudformation/rain" = "1.20.2" +"ubi:imsnif/bandwhich" = "latest" "ubi:darkhz/bluetuith" = "latest" "ubi:eugene-babichenko/fixit" = "0.9.0" "ubi:gdubicki/ets" = "0.3.0" "ubi:joschi/dive" = "0.13.1" [settings] -pipx_uvx = true +# Issues I'd like to see implemented/fixed before enabling uvx: +# https://github.com/astral-sh/uv/issues/6314 +# https://github.com/astral-sh/uv/pull/7592 +# https://github.com/astral-sh/uv/issues/4466 +pipx_uvx = false # uv does not yet support --system-site-packages flag, which we need for gnome-extensions-cli pin = true experimental = true diff --git a/chezmoi/dot_config/systemd/user/rclone.service b/chezmoi/dot_config/systemd/user/rclone.service new file mode 100644 index 00000000..48d2d357 --- /dev/null +++ b/chezmoi/dot_config/systemd/user/rclone.service @@ -0,0 +1,21 @@ +[Unit] +Description=rclone: Remote FUSE filesystem for cloud storage config onedrive +Documentation=man:rclone(1) +After=network-online.target +Wants=network-online.target + +[Service] +Type=notify +ExecStartPre=-/usr/bin/mkdir -p %h/mnt/onedrive +ExecStart= \ + %h/.local/share/mise/shims/rclone mount \ + --config=%h/.config/rclone/rclone.conf \ + --vfs-cache-mode writes \ + --vfs-cache-max-size 100M \ + --log-level INFO \ + --log-file /tmp/rclone-onedrive.log \ + onedrive: %h/mnt/onedrive +ExecStop=/bin/fusermount -u %h/mnt/onedrive + +[Install] +WantedBy=default.target diff --git a/chezmoi/private_dot_local/private_share/backgrounds/2025-01-09-15-43-30-black_hole.png b/chezmoi/private_dot_local/private_share/backgrounds/2025-01-09-15-43-30-black_hole.png new file mode 100644 index 00000000..bf8249e9 Binary files /dev/null and b/chezmoi/private_dot_local/private_share/backgrounds/2025-01-09-15-43-30-black_hole.png differ diff --git a/chezmoi/private_dot_local/private_share/backgrounds/Firefox_wallpaper.png b/chezmoi/private_dot_local/private_share/backgrounds/Firefox_wallpaper.png new file mode 100644 index 00000000..8a9f9e77 Binary files /dev/null and b/chezmoi/private_dot_local/private_share/backgrounds/Firefox_wallpaper.png differ diff --git a/create_arm64_vm.sh b/create_arm64_vm.sh index 4fb83d4e..b5a4e903 100644 --- a/create_arm64_vm.sh +++ b/create_arm64_vm.sh @@ -1,10 +1,119 @@ #!/usr/bin/env bash -incus launch images:ubuntu/24.04 v1 --vm -c limits.cpu=4 -c limits.memory=4GiB +# Set strict error handling +set -euo pipefail -incus exec ubuntu-vm3 bash +# Configuration variables +VM_NAME="arm64-vm" +CPU_LIMIT=8 +MEMORY="16GiB" +IMAGE="images:ubuntu/oracular" +DISK_SIZE="50GiB" +NEW_USER="tmeijn" +NEW_USER_PASSWORD="test" -# adduser tmeijn +# Function to log messages +log() { + echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1" +} -apt update && apt upgrade -apt install ubuntu-desktop +# Function to check if VM exists +check_vm_exists() { + incus info "$VM_NAME" > /dev/null 2>&1 +} + +# Function to delete VM if it exists +delete_existing_vm() { + if check_vm_exists; then + log "Deleting existing VM: $VM_NAME" + incus delete "$VM_NAME" --force || { + log "Error: Failed to delete VM" + exit 1 + } + fi +} + +# Function to create and configure VM +create_vm() { + log "Creating new VM: $VM_NAME" + incus create "$IMAGE" "$VM_NAME" --vm \ + -c "limits.cpu=$CPU_LIMIT" \ + -c "limits.memory=$MEMORY" || { + log "Error: Failed to create VM" + exit 1 + } + incus config device override "$VM_NAME" root "size=${DISK_SIZE}" || { + log "Error: Failed to set disk size for VM" + exit 1 + } + incus start "$VM_NAME" || { + log "Error: Failed to start VM" + exit 1 + } +} + +# Function to install desktop environment +install_desktop() { + log "Updating system packages" + incus exec "$VM_NAME" -- bash -c "apt update && apt upgrade -y" || { + log "Error: Failed to update packages" + exit 1 + } + + log "Installing Ubuntu desktop" + incus exec "$VM_NAME" -- bash -c "DEBIAN_FRONTEND=noninteractive apt install -y ubuntu-desktop" || { + log "Error: Failed to install desktop environment" + exit 1 + } +} + +# Function to setup user +setup_user() { + log "Setting up new user: $NEW_USER" + incus exec "$VM_NAME" -- bash -c "useradd -m -G sudo -s /bin/bash -c 'Tyrone Meijn' $NEW_USER && echo '$NEW_USER:$NEW_USER_PASSWORD' | chpasswd" || { + log "Error: Failed to create user or set password" + exit 1 + } +} + +# Function to reboot VM +reboot_vm() { + log "Rebooting VM" + incus restart "$VM_NAME" || { + log "Error: Failed to reboot VM" + exit 1 + } +} + +# Function to create snapshot of VM +create_snapshot() { + log "Creating snapshot of VM" + incus snapshot create "$VM_NAME" initial-state || { + log "Error: Failed to create snapshot" + exit 1 + } +} + +# Main execution +main() { + log "Starting VM creation process" + + delete_existing_vm + create_vm + + # Wait for VM to be ready + sleep 10 + + install_desktop + + setup_user + + reboot_vm + + create_snapshot + + log "VM setup completed successfully" +} + +# Execute main function +main diff --git a/gen_ssh_key_and_add_to_scms.sh b/gen_ssh_key_and_add_to_scms.sh index 7079aae5..6caee68d 100644 --- a/gen_ssh_key_and_add_to_scms.sh +++ b/gen_ssh_key_and_add_to_scms.sh @@ -8,7 +8,7 @@ if [ -z ${GITLAB_TOKEN+x} ] &> /dev/null; then echo "GITLAB_TOKEN not set!" && e if [ -z ${GITHUB_TOKEN+x} ] &> /dev/null; then echo "GITHUB_TOKEN not set!" && exit 1; fi _user_full_name="$(getent passwd | grep "^$(whoami)" | cut -d":" -f5 | cut -d"," -f1)" -_ssh_key_title="${_user_full_name}'s $(lshw -json | jq -r .product), serial $(lshw -json | jq -r .serial) (Auto-added by Chezmoi)" +_ssh_key_title="${_user_full_name}'s $(lshw -json | jq -r .product) (Auto-added by Chezmoi on $(date "+%d-%m-%Y"))" echo "$_ssh_key_title" echo ""