Compare commits
1 Commits
cf041f9747
...
flatpak
| Author | SHA1 | Date | |
|---|---|---|---|
| 652d32b175 |
@@ -223,7 +223,7 @@ if ($recursive) {
|
||||
# Ensure the repository has the correct owner
|
||||
$userName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||
$idRef = [System.Security.Principal.NTAccount]::new($userName)
|
||||
Get-Item -Force $dest | foreach { `
|
||||
Get-Item $dest | foreach { `
|
||||
$_ ; $_ | Get-ChildItem -Force -Recurse `
|
||||
} | foreach { `
|
||||
$acl = $_ | Get-Acl; $acl.SetOwner($idRef); $_ | Set-Acl -AclObject $acl `
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
- import_playbook: UnixGUI.yaml
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: cider
|
||||
- role: gnome-tweaks
|
||||
when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP and"
|
||||
- role: kitty
|
||||
- role: xremap
|
||||
when: >
|
||||
'GNOME' in ansible_env.XDG_CURRENT_DESKTOP and
|
||||
ansible_env.XDG_SESSION_TYPE == 'wayland' and (
|
||||
ansible_os_family == "RedHat" or
|
||||
ansible_os_family == "Debian"
|
||||
)
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: rpmfusion
|
||||
when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora'
|
||||
- import_playbook: UnixCLI.yaml
|
||||
- hosts: localhost
|
||||
roles:
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
- role: python
|
||||
|
||||
- role: zsh
|
||||
tags: unsafe
|
||||
- role: neovim
|
||||
- role: tmux
|
||||
tags: unsafe
|
||||
|
||||
- role: ag
|
||||
- role: bash
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: flatpak
|
||||
when: ansible_os_family != "Darwin"
|
||||
|
||||
- role: 1password
|
||||
- role: ferdium
|
||||
- role: fonts
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
- role: 1password
|
||||
- role: autohotkey
|
||||
- role: cider
|
||||
- role: ferdium
|
||||
- role: firefox
|
||||
- role: fonts
|
||||
|
||||
@@ -8,11 +8,7 @@
|
||||
roles:
|
||||
- role: mas
|
||||
|
||||
- role: hiddenbar
|
||||
- role: iterm
|
||||
- role: kitty
|
||||
- role: magnet
|
||||
- role: microsoft-remote-desktop
|
||||
- role: viscosity
|
||||
|
||||
- role: macos
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
- name: add dnf repository key
|
||||
- name: add yum repository key
|
||||
become: true
|
||||
rpm_key:
|
||||
key: https://downloads.1password.com/linux/keys/1password.asc
|
||||
|
||||
- name: add dnf repository
|
||||
- name: add yum repository
|
||||
become: true
|
||||
yum_repository:
|
||||
name: 1password
|
||||
@@ -15,8 +15,8 @@
|
||||
repo_gpgcheck: true
|
||||
gpgkey: ['https://downloads.1password.com/linux/keys/1password.asc']
|
||||
|
||||
- name: install dnf package
|
||||
- name: install yum package
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name: 1password
|
||||
state: latest
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install dnf package
|
||||
- name: install yum package
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name: the_silver_searcher
|
||||
state: latest
|
||||
|
||||
@@ -110,13 +110,3 @@ grey="\001\e[38;5;244m\002"
|
||||
reset="\001\e[0m\002"
|
||||
|
||||
PS1="$yellow\u$reset@$grey\h$reset "
|
||||
|
||||
# Setup environment variables
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
if command -v nvim > /dev/null; then
|
||||
export EDITOR=nvim
|
||||
elif command -v vim > /dev/null; then
|
||||
export EDITOR=vim
|
||||
elif command -v vi > /dev/null; then
|
||||
export EDITOR=vi
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install dnf package
|
||||
- name: install yum package
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name: bat
|
||||
state: latest
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
- name: install chocolatey package
|
||||
when: ansible_os_family == 'Windows'
|
||||
win_chocolatey:
|
||||
state: latest
|
||||
name: Cider
|
||||
|
||||
- name: install flatpak package
|
||||
when: ansible_os_family != 'Windows' and
|
||||
ansible_os_family != 'Darwin'
|
||||
become: true
|
||||
flatpak:
|
||||
name: sh.cider.Cider
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install dnf package
|
||||
- name: install yum package
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name: curl
|
||||
state: latest
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
- name: install chocolatey package
|
||||
win_chocolatey:
|
||||
name: ferdium
|
||||
state: latest
|
||||
|
||||
- set_fact:
|
||||
ferdium_exe: 'C:/Program Files/Ferdium/Ferdium.exe'
|
||||
|
||||
- name: create start menu shortcut
|
||||
win_shortcut:
|
||||
src: '{{ferdium_exe}}'
|
||||
dest: '{{ansible_env.ProgramData}}/Microsoft/Windows/Start Menu/Programs/Ferdium.lnk'
|
||||
icon: '{{ferdium_exe}},0'
|
||||
@@ -6,11 +6,12 @@
|
||||
state: latest
|
||||
|
||||
- when: ansible_os_family == 'Windows'
|
||||
include_tasks: Windows.yaml
|
||||
win_chocolatey:
|
||||
name: ferdium
|
||||
state: latest
|
||||
|
||||
- name: install flatpak package
|
||||
when: ansible_os_family != 'Windows' and
|
||||
ansible_os_family != 'Darwin'
|
||||
become: true
|
||||
flatpak:
|
||||
name: org.ferdium.Ferdium
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
- name: install dnf package
|
||||
become: true
|
||||
dnf:
|
||||
name: flatpak
|
||||
state: latest
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install dnf package
|
||||
- name: install yum package
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name: fzf
|
||||
state: latest
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: add dnf repository
|
||||
- name: add yum repository
|
||||
become: true
|
||||
get_url:
|
||||
url: https://cli.github.com/packages/rpm/gh-cli.repo
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP"
|
||||
|
||||
- name: install gnome-tweaks
|
||||
become: true
|
||||
package:
|
||||
name: gnome-tweaks
|
||||
state: latest
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: hiddenbar
|
||||
state: latest
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
- name: install homebrew package
|
||||
homebrew_cask:
|
||||
name: kitty
|
||||
state: latest
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: disable creation of .DS_Store in directories
|
||||
osx_defaults:
|
||||
domain: com.apple.desktopservices
|
||||
key: DSDontWriteNetworkStores
|
||||
value: 'true'
|
||||
@@ -6,12 +6,6 @@
|
||||
state: latest
|
||||
|
||||
- set_fact:
|
||||
neovim_pip_packages: >
|
||||
{{
|
||||
neovim_pip_packages + [
|
||||
"pynvim",
|
||||
"greenlet"
|
||||
]
|
||||
}}
|
||||
neovim_pip_packages: '{{neovim_pip_packages + ["pynvim"]}}'
|
||||
|
||||
- include_tasks: Unix.yaml
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: ppa:neovim-ppa/stable
|
||||
codename: '{{os_release.UBUNTU_CODENAME}}'
|
||||
update_cache: true
|
||||
|
||||
- name: install apt package
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install dnf package
|
||||
- name: install yum package
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name: nodejs
|
||||
state: latest
|
||||
|
||||
@@ -1,32 +1,75 @@
|
||||
---
|
||||
- name: install flatpak package
|
||||
become: true
|
||||
flatpak:
|
||||
name: md.obsidian.Obsidian
|
||||
# TODO: Prefer Flatpak over AppImage if available
|
||||
|
||||
# Remove old appimage if it exists
|
||||
- name: stat appimage symlink
|
||||
- name: stat symlink
|
||||
stat:
|
||||
path: '{{ansible_env.HOME}}/.local/bin/Obsidian'
|
||||
register: symlink_file
|
||||
|
||||
- name: get latest release
|
||||
uri:
|
||||
url: https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest
|
||||
register: latest
|
||||
|
||||
- set_fact:
|
||||
appimage: 'Obsidian-{{latest.json.name}}.AppImage'
|
||||
- set_fact:
|
||||
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
|
||||
iconpath: 'share/icons/hicolor/512x512/apps/obsidian.png'
|
||||
- name: remove appimage icon file
|
||||
asset_query: '[?contains(name, `{{appimage}}`)] | [0]'
|
||||
- set_fact:
|
||||
needs_installed:
|
||||
'{{not symlink_file.stat.exists or symlink_file.stat.lnk_source != filepath}}'
|
||||
asset: '{{latest.json.assets | to_json | from_json | json_query(asset_query)}}'
|
||||
|
||||
- name: download latest version
|
||||
get_url:
|
||||
url: '{{asset.browser_download_url}}'
|
||||
dest: '{{filepath}}'
|
||||
mode: '0755'
|
||||
|
||||
- name: create directories
|
||||
file:
|
||||
path: '{{item}}'
|
||||
state: directory
|
||||
with_items:
|
||||
- '{{ansible_env.HOME}}/.local/bin'
|
||||
- '{{ansible_env.HOME}}/.local/share/icons/hicolor/512x512/apps'
|
||||
|
||||
- name: create symlink
|
||||
file:
|
||||
src: '{{filepath}}'
|
||||
dest: '{{ansible_env.HOME}}/.local/bin/Obsidian'
|
||||
state: link
|
||||
|
||||
- name: extract squashfs-root for app icon
|
||||
when: needs_installed
|
||||
command:
|
||||
cmd: '{{ansible_env.HOME}}/.local/bin/Obsidian --appimage-extract'
|
||||
chdir: '/tmp'
|
||||
|
||||
- name: copy icon file
|
||||
when: needs_installed
|
||||
copy:
|
||||
src: '/tmp/squashfs-root/usr/{{iconpath}}'
|
||||
dest: '{{ansible_env.HOME}}/.local/{{iconpath}}'
|
||||
state: absent
|
||||
- name: remove appimage desktop file
|
||||
|
||||
- name: remove squashfs-root directory
|
||||
when: needs_installed
|
||||
file:
|
||||
dest: '{{ansible_env.HOME}}/.local/share/applications/obsidian-obsidian.desktop'
|
||||
path: '/tmp/squashfs-root'
|
||||
state: absent
|
||||
|
||||
- name: create desktop file
|
||||
template:
|
||||
src: obsidian.desktop.j2
|
||||
dest: '{{ansible_env.HOME}}/.local/share/applications/obsidian-obsidian.desktop'
|
||||
notify: install desktop menu
|
||||
|
||||
- name: remove old appimage
|
||||
when: "'lnk_source' in symlink_file.stat"
|
||||
when: needs_installed and symlink_file.stat.exists
|
||||
file:
|
||||
path: '{{symlink_file.stat.lnk_source}}'
|
||||
state: absent
|
||||
- name: remove appimage symlink
|
||||
file:
|
||||
path: '{{ansible_env.HOME}}/.local/bin/Obsidian'
|
||||
state: absent
|
||||
|
||||
- include_tasks: Unix.yaml
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: install dnf packages
|
||||
- name: install yum packages
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name:
|
||||
- python3
|
||||
- python3-pip
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
- assert:
|
||||
that: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora'
|
||||
|
||||
- name: install rpm fusion free gpg key
|
||||
become: true
|
||||
rpm_key:
|
||||
key: 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-2020'
|
||||
state: present
|
||||
|
||||
- name: install rpmfusion free repository
|
||||
become: true
|
||||
dnf:
|
||||
name:
|
||||
'https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ansible_distribution_major_version}}.noarch.rpm'
|
||||
state: present
|
||||
validate_certs: no
|
||||
|
||||
- name: install rpmfusion non-free gpg key
|
||||
become: true
|
||||
rpm_key:
|
||||
key: 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020'
|
||||
state: present
|
||||
|
||||
- name: install rpmfusion non-free repository
|
||||
become: true
|
||||
dnf:
|
||||
name:
|
||||
'https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ansible_distribution_major_version}}.noarch.rpm'
|
||||
state: present
|
||||
validate_certs: no
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: install dnf packages
|
||||
- name: install yum packages
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name:
|
||||
- tmux
|
||||
- sysstat
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
---
|
||||
- assert:
|
||||
that: >
|
||||
'GNOME' in ansible_env.XDG_CURRENT_DESKTOP and
|
||||
ansible_env.XDG_SESSION_TYPE == 'wayland'
|
||||
that: ansible_env.XDG_CURRENT_DESKTOP == "GNOME" and
|
||||
ansible_env.XDG_SESSION_TYPE == "wayland"
|
||||
|
||||
- set_fact:
|
||||
install_dir: '{{ansible_env.HOME}}/.local/bin'
|
||||
@@ -36,14 +35,12 @@
|
||||
set_fact:
|
||||
needs_installed:
|
||||
'{{not executable.stat.exists or installed_version != latest.json.name}}'
|
||||
xdg_current_desktop:
|
||||
"{{ansible_env.XDG_CURRENT_DESKTOP | regex_replace('(.*:)?(.*)', '\\2')}}"
|
||||
|
||||
- name: construct asset query
|
||||
set_fact:
|
||||
asset_query: >
|
||||
[?contains(name, `xremap-linux-{{ansible_architecture}}-{{
|
||||
xdg_current_desktop | lower}}.zip`)] | [0]
|
||||
ansible_env.XDG_CURRENT_DESKTOP | lower}}.zip`)] | [0]
|
||||
- name: get release asset
|
||||
set_fact:
|
||||
asset: '{{latest.json.assets | to_json | from_json | json_query(asset_query)}}'
|
||||
@@ -84,14 +81,6 @@
|
||||
append: true
|
||||
groups: input
|
||||
|
||||
- name: load the uinput kernel module
|
||||
when: ansible_os_family == 'Debian'
|
||||
become: true
|
||||
copy:
|
||||
content: |
|
||||
uinput
|
||||
dest: /etc/modules-load.d/uinput.conf
|
||||
|
||||
# TODO: This works for on Fedora, author uses it on Ubuntu so I assume Debian
|
||||
# will work too. Arch and other distros are potentially different see the docs
|
||||
# https://github.com/k0kubun/xremap
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: install dnf packages
|
||||
- name: install yum packages
|
||||
become: true
|
||||
dnf:
|
||||
yum:
|
||||
name:
|
||||
- zsh
|
||||
- pinentry-tty
|
||||
|
||||
@@ -61,11 +61,6 @@
|
||||
dest: ~/.local/bin/cmake-uninstall
|
||||
- src: ~/.config/zsh/$
|
||||
dest: ~/.local/bin/$
|
||||
- src: ~/.config/zsh/url/url
|
||||
dest: ~/.local/bin/url
|
||||
- src: ~/.config/zsh/url/_url
|
||||
dest: ~/.local/share/zsh/site-functions/_url
|
||||
|
||||
loop_control:
|
||||
label: '{{item.dest}}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user