From 275270cef717e429f9bda30acd5e7b254ffb7b55 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:35:42 -0500 Subject: [PATCH 1/2] Remove ollama service from Linux machines None of my Linux machines have GPUs capable of accelerating LLMs. Give up on having a service auto-enable ollama. --- homes/linux-desktop.nix | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/homes/linux-desktop.nix b/homes/linux-desktop.nix index 32b4900..75de35d 100644 --- a/homes/linux-desktop.nix +++ b/homes/linux-desktop.nix @@ -36,19 +36,6 @@ in { }; systemd.user = { services = { - ollama = { - Unit = { - Description = "Ollama local LLM service"; - After = [ "network.target" ]; - }; - Service = { - Type = "simple"; - ExecStart = "${pkgs.ollama}/bin/ollama serve"; - Restart = "always"; - }; - Install = { WantedBy = [ "default.target" ]; }; - }; - freetube-sync = { Unit = { Description = "Sync FreeTube settings with Nextcloud"; From 20e578a779f7553f5c27f3fcf1cd1ea9cc0ffc25 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 14 Jul 2025 20:56:45 -0500 Subject: [PATCH 2/2] add ansible playbooks for managing dnf packages --- inventory.yaml | 12 ++++++ playbook.yaml | 22 +++++++++++ playbooks/amd64.yaml | 42 +++++++++++++++++++++ playbooks/asahi.yaml | 20 ++++++++++ playbooks/desktop.yaml | 84 ++++++++++++++++++++++++++++++++++++++++++ playbooks/fedora.yaml | 45 ++++++++++++++++++++++ 6 files changed, 225 insertions(+) create mode 100644 inventory.yaml create mode 100644 playbook.yaml create mode 100644 playbooks/amd64.yaml create mode 100644 playbooks/asahi.yaml create mode 100644 playbooks/desktop.yaml create mode 100644 playbooks/fedora.yaml diff --git a/inventory.yaml b/inventory.yaml new file mode 100644 index 0000000..23211d9 --- /dev/null +++ b/inventory.yaml @@ -0,0 +1,12 @@ +--- +all: + hosts: + localhost: + ansible_connection: local + children: + workstations: + hosts: + harmony: + ansible_connection: local + odyssey: + ansible_connection: local \ No newline at end of file diff --git a/playbook.yaml b/playbook.yaml new file mode 100644 index 0000000..d8fc2dc --- /dev/null +++ b/playbook.yaml @@ -0,0 +1,22 @@ +--- +- name: Configure harmony + hosts: harmony + become: true + tasks: + - name: Include arch-specific tasks + ansible.builtin.include_tasks: playbooks/asahi.yaml + - name: Include Linux tasks + ansible.builtin.include_tasks: playbooks/fedora.yaml + - name: Include desktop tasks + ansible.builtin.include_tasks: playbooks/desktop.yaml + +- name: Configure odyssey + hosts: odyssey + become: true + tasks: + - name: Include arch-specific tasks + ansible.builtin.include_tasks: playbooks/amd64.yaml + - name: Include Linux tasks + ansible.builtin.include_tasks: playbooks/fedora.yaml + - name: Include desktop tasks + ansible.builtin.include_tasks: playbooks/desktop.yaml diff --git a/playbooks/amd64.yaml b/playbooks/amd64.yaml new file mode 100644 index 0000000..e595d5a --- /dev/null +++ b/playbooks/amd64.yaml @@ -0,0 +1,42 @@ +--- +# Playbook for x86-64 specific systems + +### ================ ### +### Package installs ### +### ================ ### + +### Repositories ### +- name: Install RPM Fusion free repository + ansible.builtin.dnf: + name: "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_major_version }}.noarch.rpm" + state: present + disable_gpg_check: false +- name: Install RPM Fusion nonfree repository + ansible.builtin.dnf: + name: "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_distribution_major_version }}.noarch.rpm" + state: present + disable_gpg_check: false +- name: Install RPM Fusion free-tainted repository + ansible.builtin.dnf: + name: rpmfusion-free-release-tainted + state: present +- name: Install Zotero COPR repository + community.general.copr: + name: "mozes/zotero7" + +### Packages ### +- name: Install x86-specific packages + ansible.builtin.dnf: + name: + - libdvdcss + - mkvtoolnix + - mpv + - x264 + - x264-libs + state: present + +- name: Install VeraCrypt + ansible.builtin.dnf: + name: https://launchpad.net/veracrypt/trunk/1.26.20/+download/veracrypt-1.26.20-Fedora-40-x86_64.rpm + state: present + disable_gpg_check: true diff --git a/playbooks/asahi.yaml b/playbooks/asahi.yaml new file mode 100644 index 0000000..f781650 --- /dev/null +++ b/playbooks/asahi.yaml @@ -0,0 +1,20 @@ +--- +# Asahi Linux playbook - to be run on all Asahi Linux hosts + +### ================ ### +### Package installs ### +### ================ ### + +### Repositories ### +- name: Install Zotero COPR repository + community.general.copr: + name: "@isaksamsten/Zotero" +- name: Install VeraCrypt COPR repository + community.general.copr: + name: "@architektapx/veracrypt" + +### Packages ### +- name: Install aarch64-specific packages + ansible.builtin.dnf: + name: + - veracrypt diff --git a/playbooks/desktop.yaml b/playbooks/desktop.yaml new file mode 100644 index 0000000..e2e3bd6 --- /dev/null +++ b/playbooks/desktop.yaml @@ -0,0 +1,84 @@ +--- +# Desktop environment playbook - common to all desktop Fedora hosts + +### ================ ### +### Package installs ### +### ================ ### + +### Repositories ### + +# Add Terra - the source of the Zed editor +- name: Determine if Terra is installed + ansible.builtin.stat: + path: /etc/yum.repos.d/terra.repo + register: terra_installed +- name: Install Terra repository + ansible.builtin.shell: | + dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release + when: not terra_installed.stat.exists + register: terra_install + changed_when: terra_install.rc == 0 +- name: Determine Terra repository priority + ansible.builtin.shell: + cmd: set -o pipefail && dnf --dump-repo-config=terra | grep 'priority = 100' || echo "false" + executable: /bin/bash + register: terra_check + changed_when: false +- name: Set Terra repository priority to low + ansible.builtin.shell: dnf config-manager setopt terra\*.priority=100 + when: "'false' in terra_check.stdout" + register: terra_priority + changed_when: terra_priority.rc != 0 + +# Add FirefoxPWA repository +- name: Install FirefoxPWA repository + ansible.builtin.yum_repository: + name: firefoxpwa + description: FirefoxPWA repository + baseurl: https://packagecloud.io/filips/FirefoxPWA/fedora/$releasever/$basearch + gpgcheck: true + gpgkey: https://packagecloud.io/filips/FirefoxPWA/gpgkey + enabled: true + +# Add RStudio copr repository +- name: Install RStudio copr repository + community.general.copr: + name: "iucar/rstudio" + +### Packages ### + +# Install common desktop environment packages +- name: Install common desktop environment packages + ansible.builtin.dnf: + name: + - chromium + - firefoxpwa + - inkscape + - kate + - kdenlive + - kdiff3 + - krita + - musescore + - nextcloud-client + - nextcloud-client-dolphin + - obs-studio + - qownnotes + - qt + - rssguard + - rstudio-desktop + - steam + - thunderbird + - vlc + - vorta + - yakuake + - zed + - zotero + - R + state: present + +# noarch url packages +- name: Install Microsoft Core Fonts + ansible.builtin.dnf: + name: https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm + state: present + disable_gpg_check: true diff --git a/playbooks/fedora.yaml b/playbooks/fedora.yaml new file mode 100644 index 0000000..95bb12f --- /dev/null +++ b/playbooks/fedora.yaml @@ -0,0 +1,45 @@ +--- +# Ansible playbook common to all Fedora systems + +### Package installs ### +# Repositories + +# Tailscale +- name: Install Tailscale repo + ansible.builtin.yum_repository: + name: tailscale-stable + description: Tailscale stable repo + baseurl: https://pkgs.tailscale.com/stable/fedora/$basearch + enabled: true + gpgcheck: true + gpgkey: https://pkgs.tailscale.com/stable/fedora/repo.gpg + +### dnf packages +- name: Install common Linux packages + ansible.builtin.dnf: + name: + - tailscale + - zsh + state: present + +### ======================= ### +### Install determinate nix ### +### ======================= ### +- name: Determine if Nix is installed + ansible.builtin.shell: | + /nix/var/nix/profiles/default/bin/nix --version + register: nix_check + ignore_errors: true + changed_when: false +- name: Download Determinate Nix installer + ansible.builtin.get_url: + url: https://install.determinate.systems/nix + dest: /tmp/nix-installer + mode: 755 + when: nix_check.rc != 0 +- name: Install Nix via Determinate Nix installer + ansible.builtin.shell: | + sh /tmp/nix-installer install linux --verbose --no-confirm + when: nix_check.rc != 0 + register: nix_install + changed_when: nix_install.rc == 0