refactor: add zsync and Zen browser tasks, update default applications and configurations
Some checks failed
Nix Format Check / check-format (push) Failing after 1m6s
Some checks failed
Nix Format Check / check-format (push) Failing after 1m6s
This commit is contained in:
parent
a47b6ea2f2
commit
c8944e8ed6
@ -3,11 +3,10 @@ source $HOME/dotfiles/bin/helpers/functions.sh
|
|||||||
|
|
||||||
# Define associative array with app_name => command mapping
|
# Define associative array with app_name => command mapping
|
||||||
declare -A apps=(
|
declare -A apps=(
|
||||||
["spotify"]="flatpak run com.spotify.Client"
|
|
||||||
["vesktop"]="vesktop"
|
["vesktop"]="vesktop"
|
||||||
|
["bitwarden"]="bitwarden"
|
||||||
["ktailctl"]="flatpak run org.fkoehler.KTailctl"
|
["ktailctl"]="flatpak run org.fkoehler.KTailctl"
|
||||||
["1password"]="1password"
|
["ulauncher"]="ulauncher --no-window-shadow --hide-window"
|
||||||
["ulauncher"]="ulauncher-wrapped --no-window-shadow --hide-window"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# check if screen has any dead sessions
|
# check if screen has any dead sessions
|
||||||
|
@ -5,7 +5,9 @@ help() {
|
|||||||
printfe "%s\n" "green" "Usage: upgrade.sh [options]"
|
printfe "%s\n" "green" "Usage: upgrade.sh [options]"
|
||||||
printfe "%s\n" "green" "Options:"
|
printfe "%s\n" "green" "Options:"
|
||||||
printfe "%s\n" "green" " --ha, -H Upgrade Home Manager packages."
|
printfe "%s\n" "green" " --ha, -H Upgrade Home Manager packages."
|
||||||
printfe "%s\n" "green" " --nix, -X Upgrade NixOS packages."
|
printfe "%s\n" "green" " --ansible, -A Upgrade Ansible packages."
|
||||||
|
printfe "%s\n" "green" " --ansible-verbose Upgrade Ansible packages with verbose output. (-vvv)"
|
||||||
|
printfe "%s\n" "green" " --nix, -X Update Home Manager flake."
|
||||||
printfe "%s\n" "green" " --full-speed, -F Upgrade packages and use all available cores for compilation. (Default: 8 cores)"
|
printfe "%s\n" "green" " --full-speed, -F Upgrade packages and use all available cores for compilation. (Default: 8 cores)"
|
||||||
printfe "%s\n" "green" " --help, -h Display this help message."
|
printfe "%s\n" "green" " --help, -h Display this help message."
|
||||||
exit 0
|
exit 0
|
||||||
@ -16,6 +18,9 @@ while [[ "$#" -gt 0 ]]; do
|
|||||||
--ha|-H) RUN_HA=true ;;
|
--ha|-H) RUN_HA=true ;;
|
||||||
--nix|-X) RUN_NIX=true ;;
|
--nix|-X) RUN_NIX=true ;;
|
||||||
--ansible|-A) RUN_ANSIBLE=true ;;
|
--ansible|-A) RUN_ANSIBLE=true ;;
|
||||||
|
--ansible-verbose)
|
||||||
|
RUN_ANSIBLE=true
|
||||||
|
ANSIBLE_VERBOSE=true ;;
|
||||||
--full-speed|-F) FULL_SPEED=true ;;
|
--full-speed|-F) FULL_SPEED=true ;;
|
||||||
--help|-h) help ;;
|
--help|-h) help ;;
|
||||||
*) echo "Unknown parameter passed: $1";
|
*) echo "Unknown parameter passed: $1";
|
||||||
@ -76,10 +81,10 @@ if [[ "$RUN_ANSIBLE" == true ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printfe "%s\n" "cyan" "Running Ansible playbook..."
|
printfe "%s\n" "cyan" "Running Ansible playbook..."
|
||||||
cd $HOME/dotfiles/config/ansible && ansible-playbook -i $HOME/dotfiles/config/ansible/inventory.ini $HOME/dotfiles/config/ansible/main.yml --extra-vars "hostname=$HOSTNAME" --extra-vars "ansible_user=$USER" --limit $HOSTNAME --ask-become-pass
|
cd $HOME/dotfiles/config/ansible && ansible-playbook -i $HOME/dotfiles/config/ansible/inventory.ini $HOME/dotfiles/config/ansible/main.yml --extra-vars "hostname=$HOSTNAME" --extra-vars "ansible_user=$USER" --limit $HOSTNAME --ask-become-pass ${ANSIBLE_VERBOSE:+-vvv}
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
printfe "%s\n" "red" "Failed to upgrade Ansible packages."
|
printfe "%s\n" "red" "Failed to upgrade Ansible packages."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -36,3 +36,6 @@
|
|||||||
|
|
||||||
- name: Include pipx tasks
|
- name: Include pipx tasks
|
||||||
ansible.builtin.import_tasks: tasks/global/pipx.yml
|
ansible.builtin.import_tasks: tasks/global/pipx.yml
|
||||||
|
|
||||||
|
- name: Include zsync tasks
|
||||||
|
ansible.builtin.import_tasks: tasks/global/zsync.yml
|
||||||
|
38
config/ansible/tasks/global/zsync.yml
Normal file
38
config/ansible/tasks/global/zsync.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
- name: Check if zsync is installed
|
||||||
|
ansible.builtin.command: zsync -V
|
||||||
|
register: zsync_installed
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Install zsync from source
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: http://zsync.moria.org.uk/download/zsync-0.6.2.tar.bz2
|
||||||
|
dest: /tmp/zsync-0.6.2.tar.bz2
|
||||||
|
mode: '0644'
|
||||||
|
when: zsync_installed.rc != 0
|
||||||
|
|
||||||
|
- name: Extract zsync source
|
||||||
|
ansible.builtin.unarchive:
|
||||||
|
src: /tmp/zsync-0.6.2.tar.bz2
|
||||||
|
dest: /tmp
|
||||||
|
remote_src: false
|
||||||
|
creates: /tmp/zsync-0.6.2
|
||||||
|
when: zsync_installed.rc != 0
|
||||||
|
|
||||||
|
- name: Install zsync from source (./configure)
|
||||||
|
ansible.builtin.command: ./configure
|
||||||
|
args:
|
||||||
|
chdir: /tmp/zsync-0.6.2
|
||||||
|
when: zsync_installed.rc != 0
|
||||||
|
|
||||||
|
- name: Install zsync from source (make)
|
||||||
|
ansible.builtin.command: make
|
||||||
|
args:
|
||||||
|
chdir: /tmp/zsync-0.6.2
|
||||||
|
when: zsync_installed.rc != 0
|
||||||
|
|
||||||
|
- name: Install zsync from source (sudo make install)
|
||||||
|
ansible.builtin.command: make install
|
||||||
|
args:
|
||||||
|
chdir: /tmp/zsync-0.6.2
|
||||||
|
become: true
|
||||||
|
when: zsync_installed.rc != 0
|
@ -29,13 +29,10 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
desired_system_flatpaks:
|
desired_system_flatpaks:
|
||||||
- org.fkoehler.KTailctl
|
- org.fkoehler.KTailctl
|
||||||
- org.mozilla.Thunderbird
|
|
||||||
- com.spotify.Client
|
- com.spotify.Client
|
||||||
- org.gnome.Extensions
|
- org.gnome.Extensions
|
||||||
- com.endlessnetwork.aqueducts
|
|
||||||
- com.tomjwatson.Emote
|
- com.tomjwatson.Emote
|
||||||
- io.github.openhv.OpenHV
|
- io.github.openhv.OpenHV
|
||||||
- net.wz2100.wz2100
|
|
||||||
- com.github.k4zmu2a.spacecadetpinball
|
- com.github.k4zmu2a.spacecadetpinball
|
||||||
- com.usebottles.bottles
|
- com.usebottles.bottles
|
||||||
- io.github.shiftey.Desktop
|
- io.github.shiftey.Desktop
|
||||||
@ -51,10 +48,8 @@
|
|||||||
- info.beyondallreason.bar
|
- info.beyondallreason.bar
|
||||||
- io.gitlab.adhami3310.Impression
|
- io.gitlab.adhami3310.Impression
|
||||||
- org.prismlauncher.PrismLauncher
|
- org.prismlauncher.PrismLauncher
|
||||||
- com.logseq.Logseq
|
|
||||||
- io.ente.auth
|
- io.ente.auth
|
||||||
- org.signal.Signal
|
- org.signal.Signal
|
||||||
- com.mardojai.ForgeSparks
|
|
||||||
- io.github.fastrizwaan.WineZGUI
|
- io.github.fastrizwaan.WineZGUI
|
||||||
- net.davidotek.pupgui2
|
- net.davidotek.pupgui2
|
||||||
- tv.plex.PlexDesktop
|
- tv.plex.PlexDesktop
|
||||||
@ -73,7 +68,6 @@
|
|||||||
- io.bassi.Amberol
|
- io.bassi.Amberol
|
||||||
- org.gaphor.Gaphor
|
- org.gaphor.Gaphor
|
||||||
- io.github.seadve.Mousai
|
- io.github.seadve.Mousai
|
||||||
- app.zen_browser.zen
|
|
||||||
|
|
||||||
- name: Define system desired Flatpak remotes
|
- name: Define system desired Flatpak remotes
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
60
config/ansible/tasks/workstations/snaps.yml
Normal file
60
config/ansible/tasks/workstations/snaps.yml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
- name: Ensure snapd is installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: snapd
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Ensure snapd service is enabled and started
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: snapd
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Get list of installed Snaps
|
||||||
|
ansible.builtin.command: snap list
|
||||||
|
register: installed_snaps
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Define protected system snaps
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
system_snaps:
|
||||||
|
- snapd
|
||||||
|
- core
|
||||||
|
- core18
|
||||||
|
- core20
|
||||||
|
- core22
|
||||||
|
- bare
|
||||||
|
- gtk-common-themes
|
||||||
|
- gnome-3-28-1804
|
||||||
|
- gnome-3-34-1804
|
||||||
|
- gnome-3-38-2004
|
||||||
|
|
||||||
|
- name: Define desired Snaps
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
desired_snaps:
|
||||||
|
- name: bitwarden
|
||||||
|
classic: false
|
||||||
|
- name: bw
|
||||||
|
classic: false
|
||||||
|
|
||||||
|
- name: Install desired Snap packages
|
||||||
|
ansible.builtin.command: "snap install {{ item.name }} {{ '--classic' if item.classic else '' }}"
|
||||||
|
loop: "{{ desired_snaps }}"
|
||||||
|
become: true
|
||||||
|
register: snap_install
|
||||||
|
changed_when: "'already installed' not in snap_install.stderr"
|
||||||
|
failed_when:
|
||||||
|
- snap_install.rc != 0
|
||||||
|
- "'already installed' not in snap_install.stderr"
|
||||||
|
|
||||||
|
- name: Remove undesired Snap packages
|
||||||
|
ansible.builtin.command: "snap remove {{ item }}"
|
||||||
|
become: true
|
||||||
|
loop: "{{ installed_snaps.stdout_lines[1:] | map('split', ' ') | map('first') | difference(desired_snaps | map(attribute='name')) | difference(system_snaps) }}"
|
||||||
|
register: snap_remove
|
||||||
|
changed_when: snap_remove.rc == 0
|
||||||
|
failed_when:
|
||||||
|
- snap_remove.rc != 0
|
||||||
|
- "'not installed' not in snap_remove.stderr"
|
||||||
|
- "'cannot remove' not in snap_remove.stderr"
|
101
config/ansible/tasks/workstations/ulauncher.yml
Normal file
101
config/ansible/tasks/workstations/ulauncher.yml
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
- name: Ensure Ulauncher and dependencies are installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- ulauncher
|
||||||
|
- python3-pytz
|
||||||
|
- python3-tornado
|
||||||
|
- python3-docker
|
||||||
|
- python3-requests
|
||||||
|
- python3-pint
|
||||||
|
- python3-simpleeval
|
||||||
|
- python3-parsedatetime
|
||||||
|
- python3-fuzzywuzzy
|
||||||
|
# - python3-thefuzz
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Ensure Ulauncher config directory exists
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "~/.config/ulauncher"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Configure Ulauncher settings
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: "{{ ulauncher_settings | to_json }}"
|
||||||
|
dest: "~/.config/ulauncher/settings.json"
|
||||||
|
mode: '0644'
|
||||||
|
vars:
|
||||||
|
ulauncher_settings:
|
||||||
|
blacklisted-desktop-dirs: "/usr/share/locale:/usr/share/app-install:/usr/share/kservices5:/usr/share/fk5:/usr/share/kservicetypes5:/usr/share/applications/screensavers:/usr/share/kde4:/usr/share/mimelnk"
|
||||||
|
clear-previous-query: true
|
||||||
|
disable-desktop-filters: false
|
||||||
|
grab-mouse-pointer: false
|
||||||
|
hotkey-show-app: "<Control>Space"
|
||||||
|
render-on-screen: "mouse-pointer-monitor"
|
||||||
|
show-indicator-icon: true
|
||||||
|
show-recent-apps: "4"
|
||||||
|
terminal-command: "ptyxis"
|
||||||
|
theme-name: "dark"
|
||||||
|
|
||||||
|
- name: Configure Ulauncher shortcuts
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: "{{ ulauncher_shortcuts | to_json }}"
|
||||||
|
dest: "~/.config/ulauncher/shortcuts.json"
|
||||||
|
mode: '0644'
|
||||||
|
vars:
|
||||||
|
ulauncher_shortcuts:
|
||||||
|
"0bab9d26-5464-4501-bc95-9995d8fa1405":
|
||||||
|
id: "0bab9d26-5464-4501-bc95-9995d8fa1405"
|
||||||
|
name: "Google Search"
|
||||||
|
keyword: "g"
|
||||||
|
cmd: "https://google.com/search?q=%s"
|
||||||
|
icon: "/usr/share/ulauncher/media/google-search-icon.png"
|
||||||
|
is_default_search: true
|
||||||
|
run_without_argument: false
|
||||||
|
added: 0
|
||||||
|
"d72834d1-5d81-4f5d-a9f6-386b12110f56":
|
||||||
|
id: "d72834d1-5d81-4f5d-a9f6-386b12110f56"
|
||||||
|
name: "Stack Overflow"
|
||||||
|
keyword: "so"
|
||||||
|
cmd: "https://stackoverflow.com/search?q=%s"
|
||||||
|
icon: "/usr/share/ulauncher/media/stackoverflow-icon.svg"
|
||||||
|
is_default_search: true
|
||||||
|
run_without_argument: false
|
||||||
|
added: 0
|
||||||
|
"4dfcffeb-879c-49b2-83bb-c16254a7ce75":
|
||||||
|
id: "4dfcffeb-879c-49b2-83bb-c16254a7ce75"
|
||||||
|
name: "GoLink"
|
||||||
|
keyword: "go"
|
||||||
|
cmd: "http://go/%s"
|
||||||
|
icon: null
|
||||||
|
is_default_search: false
|
||||||
|
run_without_argument: false
|
||||||
|
added: 0
|
||||||
|
"40d1ed32-8fd3-4bf8-92f5-cbaa7cd607a1":
|
||||||
|
id: "40d1ed32-8fd3-4bf8-92f5-cbaa7cd607a1"
|
||||||
|
name: "NixOS"
|
||||||
|
keyword: "nix"
|
||||||
|
cmd: "https://search.nixos.org/packages?query=%s"
|
||||||
|
icon: null
|
||||||
|
is_default_search: false
|
||||||
|
run_without_argument: false
|
||||||
|
added: 0
|
||||||
|
"40d1ed32-8fd3-4ff4-92f6-fbaa7cd607a1":
|
||||||
|
id: "42d1ed42-8dd3-2bf8-92f5-cbaa7cd607a1"
|
||||||
|
name: "Flathub"
|
||||||
|
keyword: "flat"
|
||||||
|
cmd: "https://flathub.org/apps/search?q=%s"
|
||||||
|
icon: null
|
||||||
|
is_default_search: false
|
||||||
|
run_without_argument: false
|
||||||
|
added: 0
|
||||||
|
"43d1ed32-8fd3-fbf8-94f5-cffa7cd607a1":
|
||||||
|
id: "40d1ed32-8fd3-4bf8-92f5-cbaa7cd607a1"
|
||||||
|
name: "GitHub"
|
||||||
|
keyword: "gh"
|
||||||
|
cmd: "https://github.com/search?q=%s"
|
||||||
|
icon: null
|
||||||
|
is_default_search: false
|
||||||
|
run_without_argument: false
|
||||||
|
added: 0
|
@ -4,6 +4,9 @@
|
|||||||
- name: Include flatpaks tasks
|
- name: Include flatpaks tasks
|
||||||
ansible.builtin.import_tasks: tasks/workstations/flatpaks.yml
|
ansible.builtin.import_tasks: tasks/workstations/flatpaks.yml
|
||||||
|
|
||||||
|
- name: Include snaps tasks
|
||||||
|
ansible.builtin.import_tasks: tasks/workstations/snaps.yml
|
||||||
|
|
||||||
- name: Include VSCode tasks
|
- name: Include VSCode tasks
|
||||||
ansible.builtin.import_tasks: tasks/workstations/vscode.yml
|
ansible.builtin.import_tasks: tasks/workstations/vscode.yml
|
||||||
become: true
|
become: true
|
||||||
@ -12,30 +15,16 @@
|
|||||||
ansible.builtin.import_tasks: tasks/workstations/brave.yml
|
ansible.builtin.import_tasks: tasks/workstations/brave.yml
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Include Zen browser tasks
|
||||||
|
ansible.builtin.import_tasks: tasks/workstations/zen-browser.yml
|
||||||
|
|
||||||
|
- name: Include Ulauncher tasks
|
||||||
|
ansible.builtin.import_tasks: tasks/workstations/ulauncher.yml
|
||||||
|
|
||||||
- name: Include 1Password tasks
|
- name: Include 1Password tasks
|
||||||
ansible.builtin.import_tasks: tasks/workstations/1password.yml
|
ansible.builtin.import_tasks: tasks/workstations/1password.yml
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Check if distro is Fedora (Workstation)
|
|
||||||
ansible.builtin.command: cat /etc/os-release
|
|
||||||
register: os_release
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
|
|
||||||
- name: Ensure desktop environment is installed
|
|
||||||
# dnf install switchdesk switchdesk-gui
|
|
||||||
# and
|
|
||||||
# dnf install @deepin-desktop-environment
|
|
||||||
# are required for Deepin Desktop Environment
|
|
||||||
ansible.builtin.package:
|
|
||||||
name:
|
|
||||||
- switchdesk
|
|
||||||
- switchdesk-gui
|
|
||||||
- "@deepin-desktop-environment"
|
|
||||||
state: present
|
|
||||||
when: os_release.stdout.find('Fedora Linux') != -1
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Ensure common packages are installed
|
- name: Ensure common packages are installed
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
|
14
config/ansible/tasks/workstations/zen-browser.yml
Normal file
14
config/ansible/tasks/workstations/zen-browser.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
- name: Check if Zen browser is installed
|
||||||
|
stat:
|
||||||
|
path: ~/.local/share/AppImage/ZenBrowser.AppImage
|
||||||
|
register: zen_browser_installed
|
||||||
|
|
||||||
|
- name: Install Zen browser
|
||||||
|
ansible.builtin.command: >
|
||||||
|
echo "1" | bash <(curl https://updates.zen-browser.app/appimage.sh)
|
||||||
|
when: not zen_browser_installed.stat.exists
|
||||||
|
|
||||||
|
- name: Update Zen browser
|
||||||
|
ansible.builtin.command: >
|
||||||
|
echo "3" | bash <(curl https://updates.zen-browser.app/appimage.sh)
|
||||||
|
when: zen_browser_installed.stat.exists
|
12
config/home-manager/flake.lock
generated
12
config/home-manager/flake.lock
generated
@ -23,11 +23,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740743217,
|
"lastModified": 1740865531,
|
||||||
"narHash": "sha256-brsCRzLqimpyhORma84c3W2xPbIidZlIc3JGIuQVSNI=",
|
"narHash": "sha256-h00vGIh/jxcGl8aWdfnVRD74KuLpyY3mZgMFMy7iKIc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b27ba4eb322d9d2bf2dc9ada9fd59442f50c8d7c",
|
"rev": "5ef6c425980847c78a80d759abc476e941a9bf42",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -39,11 +39,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740695751,
|
"lastModified": 1740828860,
|
||||||
"narHash": "sha256-D+R+kFxy1KsheiIzkkx/6L63wEHBYX21OIwlFV8JvDs=",
|
"narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6313551cd05425cd5b3e63fe47dbc324eabb15e4",
|
"rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -4,6 +4,7 @@ let
|
|||||||
files = builtins.removeAttrs (builtins.readDir ./.) [
|
files = builtins.removeAttrs (builtins.readDir ./.) [
|
||||||
"default.nix"
|
"default.nix"
|
||||||
"brave-search-engines.sh"
|
"brave-search-engines.sh"
|
||||||
|
"ulauncher.nix" # Disabled, since we switched to ansible for this
|
||||||
];
|
];
|
||||||
|
|
||||||
# Import all other .nix files as modules
|
# Import all other .nix files as modules
|
||||||
|
@ -1,163 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
# Initial configuration files
|
|
||||||
settingsJson = builtins.toJSON {
|
|
||||||
blacklisted-desktop-dirs = "/usr/share/locale:/usr/share/app-install:/usr/share/kservices5:/usr/share/fk5:/usr/share/kservicetypes5:/usr/share/applications/screensavers:/usr/share/kde4:/usr/share/mimelnk";
|
|
||||||
clear-previous-query = true;
|
|
||||||
disable-desktop-filters = false;
|
|
||||||
grab-mouse-pointer = false;
|
|
||||||
hotkey-show-app = "<Control>Space";
|
|
||||||
render-on-screen = "mouse-pointer-monitor";
|
|
||||||
show-indicator-icon = true;
|
|
||||||
show-recent-apps = "4";
|
|
||||||
terminal-command = "ptyxis";
|
|
||||||
theme-name = "dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
shortcutsJson = builtins.toJSON {
|
|
||||||
"0bab9d26-5464-4501-bc95-9995d8fa1405" = {
|
|
||||||
"id" = "0bab9d26-5464-4501-bc95-9995d8fa1405";
|
|
||||||
"name" = "Google Search";
|
|
||||||
"keyword" = "g";
|
|
||||||
"cmd" = "https://google.com/search?q=%s";
|
|
||||||
"icon" =
|
|
||||||
"/nix/store/ifh4wl3j3cv7f6b5rdzqcnhw5sa27pg9-ulauncher-5.15.7/share/ulauncher/media/google-search-icon.png";
|
|
||||||
"is_default_search" = true;
|
|
||||||
"run_without_argument" = false;
|
|
||||||
"added" = 0;
|
|
||||||
};
|
|
||||||
"d72834d1-5d81-4f5d-a9f6-386b12110f56" = {
|
|
||||||
"id" = "d72834d1-5d81-4f5d-a9f6-386b12110f56";
|
|
||||||
"name" = "Stack Overflow";
|
|
||||||
"keyword" = "so";
|
|
||||||
"cmd" = "https://stackoverflow.com/search?q=%s";
|
|
||||||
"icon" =
|
|
||||||
"/nix/store/ifh4wl3j3cv7f6b5rdzqcnhw5sa27pg9-ulauncher-5.15.7/share/ulauncher/media/stackoverflow-icon.svg";
|
|
||||||
"is_default_search" = true;
|
|
||||||
"run_without_argument" = false;
|
|
||||||
"added" = 0;
|
|
||||||
};
|
|
||||||
"4dfcffeb-879c-49b2-83bb-c16254a7ce75" = {
|
|
||||||
"id" = "4dfcffeb-879c-49b2-83bb-c16254a7ce75";
|
|
||||||
"name" = "GoLink";
|
|
||||||
"keyword" = "go";
|
|
||||||
"cmd" = "http://go/%s";
|
|
||||||
"icon" = null;
|
|
||||||
"is_default_search" = false;
|
|
||||||
"run_without_argument" = false;
|
|
||||||
"added" = 0;
|
|
||||||
};
|
|
||||||
"40d1ed32-8fd3-4bf8-92f5-cbaa7cd607a1" = {
|
|
||||||
"id" = "40d1ed32-8fd3-4bf8-92f5-cbaa7cd607a1";
|
|
||||||
"name" = "NixOS";
|
|
||||||
"keyword" = "nix";
|
|
||||||
"cmd" = "https://search.nixos.org/packages?query=%s";
|
|
||||||
"icon" = null;
|
|
||||||
"is_default_search" = false;
|
|
||||||
"run_without_argument" = false;
|
|
||||||
"added" = 0;
|
|
||||||
};
|
|
||||||
"40d1ed32-8fd3-4ff4-92f6-fbaa7cd607a1" = {
|
|
||||||
"id" = "42d1ed42-8dd3-2bf8-92f5-cbaa7cd607a1";
|
|
||||||
"name" = "Flathub";
|
|
||||||
"keyword" = "flat";
|
|
||||||
"cmd" = "https://flathub.org/apps/search?q=%s";
|
|
||||||
"icon" = null;
|
|
||||||
"is_default_search" = false;
|
|
||||||
"run_without_argument" = false;
|
|
||||||
"added" = 0;
|
|
||||||
};
|
|
||||||
"43d1ed32-8fd3-fbf8-94f5-cffa7cd607a1" = {
|
|
||||||
"id" = "40d1ed32-8fd3-4bf8-92f5-cbaa7cd607a1";
|
|
||||||
"name" = "GitHub";
|
|
||||||
"keyword" = "gh";
|
|
||||||
"cmd" = "https://github.com/search?q=%s";
|
|
||||||
"icon" = null;
|
|
||||||
"is_default_search" = false;
|
|
||||||
"run_without_argument" = false;
|
|
||||||
"added" = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create a Python environment with all required packages
|
|
||||||
pythonWithPackages = pkgs.python3.withPackages (
|
|
||||||
ps: with ps; [
|
|
||||||
pytz
|
|
||||||
thefuzz
|
|
||||||
tornado
|
|
||||||
docker
|
|
||||||
requests
|
|
||||||
pint
|
|
||||||
simpleeval
|
|
||||||
parsedatetime
|
|
||||||
fuzzywuzzy
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
# Desktop file content with GDK_BACKEND=x11
|
|
||||||
desktopEntry = ''
|
|
||||||
[Desktop Entry]
|
|
||||||
Name=Ulauncher
|
|
||||||
Comment=Application launcher for Linux
|
|
||||||
Categories=GNOME;Utility;
|
|
||||||
Exec=env GDK_BACKEND=x11 ${config.home.homeDirectory}/.local/bin/ulauncher-wrapped
|
|
||||||
Icon=ulauncher
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
# Extensions
|
|
||||||
# https://github.com/friday/ulauncher-gnome-settings
|
|
||||||
# https://ext.ulauncher.io/-/github-ulauncher-ulauncher-emoji
|
|
||||||
# https://ext.ulauncher.io/-/github-tchar-ulauncher-albert-calculate-anything
|
|
||||||
# https://ext.ulauncher.io/-/github-isacikgoz-ukill
|
|
||||||
# https://ext.ulauncher.io/-/github-iboyperson-ulauncher-system
|
|
||||||
# https://github.com/IgorVaryvoda/ulauncher-perplexity
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: { ulauncher = prev.ulauncher.override { python3 = pythonWithPackages; }; })
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
ulauncher
|
|
||||||
pythonWithPackages # Make Python environment available system-wide
|
|
||||||
];
|
|
||||||
|
|
||||||
# Create a wrapper script to set PYTHONPATH and GDK_BACKEND=x11
|
|
||||||
home.file.".local/bin/ulauncher-wrapped" = {
|
|
||||||
executable = true;
|
|
||||||
text = ''
|
|
||||||
#!${pkgs.bash}/bin/bash
|
|
||||||
export GDK_BACKEND=x11
|
|
||||||
export PYTHONPATH="${pythonWithPackages}/${pythonWithPackages.sitePackages}:$PYTHONPATH"
|
|
||||||
exec ${pkgs.ulauncher}/bin/ulauncher "$@"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Update both desktop files
|
|
||||||
xdg.configFile."autostart/ulauncher.desktop".text = desktopEntry;
|
|
||||||
xdg.dataFile."applications/ulauncher.desktop".text = desktopEntry;
|
|
||||||
|
|
||||||
# Enable autostart for Ulauncher
|
|
||||||
xdg.configFile."autostart/ulauncher.desktop".source =
|
|
||||||
"${pkgs.ulauncher}/share/applications/ulauncher.desktop";
|
|
||||||
|
|
||||||
# Overwrite ulauncher settings and shortcuts
|
|
||||||
home.activation.ulauncher-config = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
||||||
config_dir="$HOME/.config/ulauncher"
|
|
||||||
mkdir -p "$config_dir"
|
|
||||||
|
|
||||||
rm -f "$config_dir/settings.json"
|
|
||||||
echo '${settingsJson}' > "$config_dir/settings.json"
|
|
||||||
rm -f "$config_dir/shortcuts.json"
|
|
||||||
echo '${shortcutsJson}' > "$config_dir/shortcuts.json"
|
|
||||||
'';
|
|
||||||
}
|
|
@ -51,11 +51,12 @@
|
|||||||
# add more by listing them with `dconf read /org/gnome/shell/favorite-apps | sed "s/,//g; s/'/\"/g"` then copy pasting the output here
|
# add more by listing them with `dconf read /org/gnome/shell/favorite-apps | sed "s/,//g; s/'/\"/g"` then copy pasting the output here
|
||||||
"org/gnome/shell" = {
|
"org/gnome/shell" = {
|
||||||
favorite-apps = [
|
favorite-apps = [
|
||||||
"app.zen_browser.zen.desktop"
|
"ZenBrowser.desktop"
|
||||||
|
"org.gnome.Nautilus.desktop"
|
||||||
"com.spotify.Client.desktop"
|
"com.spotify.Client.desktop"
|
||||||
|
"vesktop.desktop"
|
||||||
"FFPWA-01JN0Y8Z6KR644ZG4CV0QAYPRF.desktop"
|
"FFPWA-01JN0Y8Z6KR644ZG4CV0QAYPRF.desktop"
|
||||||
"FFPWA-01JN0YCBNR29VRW8GN5YBZSQ7W.desktop"
|
"FFPWA-01JN0YCBNR29VRW8GN5YBZSQ7W.desktop"
|
||||||
"vesktop.desktop"
|
|
||||||
"FFPWA-01JN13AEFTM76WVC6TSBYC5AXN.desktop"
|
"FFPWA-01JN13AEFTM76WVC6TSBYC5AXN.desktop"
|
||||||
"code.desktop"
|
"code.desktop"
|
||||||
"org.gnome.Ptyxis.desktop"
|
"org.gnome.Ptyxis.desktop"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
# Brave Browser
|
# Brave Browser
|
||||||
"application/xhtml+xml" = [ "app.zen_browser.zen.desktop" ];
|
"application/xhtml+xml" = [ "ZenBrowser.desktop" ];
|
||||||
"text/html" = [ "app.zen_browser.zen.desktop" ];
|
"text/html" = [ "ZenBrowser.desktop" ];
|
||||||
"x-scheme-handler/http" = [ "app.zen_browser.zen.desktop" ];
|
"x-scheme-handler/http" = [ "ZenBrowser.desktop" ];
|
||||||
"x-scheme-handler/https" = [ "app.zen_browser.zen.desktop" ];
|
"x-scheme-handler/https" = [ "ZenBrowser.desktop" ];
|
||||||
|
|
||||||
# Geary
|
# Geary
|
||||||
"x-scheme-handler/mailto" = [ "org.gnome.Geary.desktop" ];
|
"x-scheme-handler/mailto" = [ "org.gnome.Geary.desktop" ];
|
||||||
|
@ -190,9 +190,21 @@
|
|||||||
{
|
{
|
||||||
"id": "Landscape Laptop",
|
"id": "Landscape Laptop",
|
||||||
"tiles": [
|
"tiles": [
|
||||||
{ "x": 0, "y": 0, "width": 0.33, "height": 0.5, "groups": [1, 2] },
|
{ "x": 0, "y": 0, "width": 0.5, "height": 0.5, "groups": [1, 2] },
|
||||||
{ "x": 0.33, "y": 0, "width": 0.67, "height": 1, "groups": [1] },
|
{
|
||||||
{ "x": 0, "y": 0.5, "width": 0.33, "height": 0.5, "groups": [2, 1] }
|
"x": 0.5,
|
||||||
|
"y": 0,
|
||||||
|
"width": 0.5,
|
||||||
|
"height": 1,
|
||||||
|
"groups": [1]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 0,
|
||||||
|
"y": 0.5,
|
||||||
|
"width": 0.5,
|
||||||
|
"height": 0.5,
|
||||||
|
"groups": [2, 1]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -62,5 +62,7 @@
|
|||||||
"go.toolsManagement.autoUpdate": true,
|
"go.toolsManagement.autoUpdate": true,
|
||||||
"redhat.telemetry.enabled": false,
|
"redhat.telemetry.enabled": false,
|
||||||
"makefile.configureOnOpen": false,
|
"makefile.configureOnOpen": false,
|
||||||
"workbench.colorTheme": "Default Light+"
|
"workbench.colorTheme": "Default Light+",
|
||||||
|
"geminicodeassist.project": "",
|
||||||
|
"cloudcode.duetAI.project": ""
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user