Compare commits
4 Commits
5cbbf5e777
...
c791055d7f
| Author | SHA1 | Date | |
|---|---|---|---|
| c791055d7f | |||
| 9ac0a9895c | |||
| 7aea9806ad | |||
| a3e3c88204 |
@@ -25,7 +25,6 @@ Wants=signal.service
|
|||||||
Wants=spotify.service
|
Wants=spotify.service
|
||||||
Wants=steam.service
|
Wants=steam.service
|
||||||
Wants=touchpad.service
|
Wants=touchpad.service
|
||||||
Wants=wallpaper.timer
|
|
||||||
Wants=xresources.service
|
Wants=xresources.service
|
||||||
Wants=yubikey-touch-detector.service
|
Wants=yubikey-touch-detector.service
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=/usr/bin/env setrandom --recursive --onlylarge --mode=stretch /usr/share/wallpapers
|
|
||||||
RemainAfterExit=true
|
|
||||||
PassEnvironment=DISPLAY
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
BindsTo=autostart.target
|
|
||||||
After=windowmanager.target
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnActiveSec=0s
|
|
||||||
OnCalendar=hourly
|
|
||||||
Unit=wallpaper.service
|
|
||||||
RemainAfterElapse=true
|
|
||||||
@@ -341,12 +341,6 @@ packages:
|
|||||||
kwallet:
|
kwallet:
|
||||||
ubuntu: []
|
ubuntu: []
|
||||||
archlinux: ["kwallet", "kwalletmanager"]
|
archlinux: ["kwallet", "kwalletmanager"]
|
||||||
wallpapers:
|
|
||||||
ubuntu: []
|
|
||||||
archlinux: ["elementary-wallpapers", "deepin-community-wallpapers"]
|
|
||||||
wallutils:
|
|
||||||
ubuntu: []
|
|
||||||
archlinux: ["wallutils"]
|
|
||||||
pv:
|
pv:
|
||||||
ubuntu: ["pv"]
|
ubuntu: ["pv"]
|
||||||
archlinux: ["pv"]
|
archlinux: ["pv"]
|
||||||
|
|||||||
130
playbook.yml
130
playbook.yml
@@ -371,6 +371,70 @@
|
|||||||
- distro == 'archlinux'
|
- distro == 'archlinux'
|
||||||
- machine.gpu is defined and machine.gpu == 'amd'
|
- machine.gpu is defined and machine.gpu == 'amd'
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: set go version
|
||||||
|
set_fact:
|
||||||
|
go_version: "1.17.1"
|
||||||
|
|
||||||
|
- name: stat go target directory
|
||||||
|
stat:
|
||||||
|
path: /usr/local/go-v{{ go_version }}
|
||||||
|
register: go_target_stat
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: create temporary directory for go download
|
||||||
|
tempfile:
|
||||||
|
state: directory
|
||||||
|
register: go_download
|
||||||
|
|
||||||
|
- name: download go
|
||||||
|
get_url:
|
||||||
|
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
|
||||||
|
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
||||||
|
|
||||||
|
- name: unpack go
|
||||||
|
unarchive:
|
||||||
|
src: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0755'
|
||||||
|
dest: "{{ go_download.path }}"
|
||||||
|
remote_src: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: install new go version
|
||||||
|
command: mv "{{ go_download.path }}/go/" /usr/local/go-v{{ go_version }}
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: clean up go download directory
|
||||||
|
file:
|
||||||
|
path: "{{ go_download.path }}"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
when: not go_target_stat.stat.exists
|
||||||
|
|
||||||
|
- name: link to the current go version
|
||||||
|
file:
|
||||||
|
src: /usr/local/go-v{{ go_version }}
|
||||||
|
dest: /usr/local/go
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
state: link
|
||||||
|
force: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: add go directory to PATH
|
||||||
|
copy:
|
||||||
|
dest: /etc/profile.d/go.sh
|
||||||
|
content: |
|
||||||
|
PATH=$PATH:/usr/local/go/bin
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
become: true
|
||||||
|
|
||||||
|
tags: [go]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: install alacritty build dependencies
|
- name: install alacritty build dependencies
|
||||||
package:
|
package:
|
||||||
@@ -430,7 +494,7 @@
|
|||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
|
|
||||||
- name: build yubikey-touch-detector
|
- name: build yubikey-touch-detector
|
||||||
shell: env GOPATH=$(pwd) go get -u github.com/maximbaz/yubikey-touch-detector
|
shell: env GOPATH=$(pwd) GOPATH=/usr/local/go/bin go get -u github.com/maximbaz/yubikey-touch-detector
|
||||||
args:
|
args:
|
||||||
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
@@ -507,70 +571,6 @@
|
|||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
tags: [signal]
|
tags: [signal]
|
||||||
|
|
||||||
- block:
|
|
||||||
- name: set go version
|
|
||||||
set_fact:
|
|
||||||
go_version: "1.17.1"
|
|
||||||
|
|
||||||
- name: stat go target directory
|
|
||||||
stat:
|
|
||||||
path: /usr/local/go-v{{ go_version }}
|
|
||||||
register: go_target_stat
|
|
||||||
|
|
||||||
- block:
|
|
||||||
- name: create temporary directory for go download
|
|
||||||
tempfile:
|
|
||||||
state: directory
|
|
||||||
register: go_download
|
|
||||||
|
|
||||||
- name: download go
|
|
||||||
get_url:
|
|
||||||
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
|
|
||||||
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
|
||||||
|
|
||||||
- name: unpack go
|
|
||||||
unarchive:
|
|
||||||
src: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: '0755'
|
|
||||||
dest: "{{ go_download.path }}"
|
|
||||||
remote_src: true
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: install new go version
|
|
||||||
command: mv "{{ go_download.path }}/go/" /usr/local/go-v{{ go_version }}
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: clean up go download directory
|
|
||||||
file:
|
|
||||||
path: "{{ go_download.path }}"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
when: not go_target_stat.stat.exists
|
|
||||||
|
|
||||||
- name: link to the current go version
|
|
||||||
file:
|
|
||||||
src: /usr/local/go-v{{ go_version }}
|
|
||||||
dest: /usr/local/go
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
state: link
|
|
||||||
force: true
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: add go directory to PATH
|
|
||||||
copy:
|
|
||||||
dest: /etc/profile.d/go.sh
|
|
||||||
content: |
|
|
||||||
PATH=$PATH:/usr/local/go/bin
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: '0755'
|
|
||||||
become: true
|
|
||||||
|
|
||||||
tags: [go]
|
|
||||||
|
|
||||||
- name: create dotfiles group
|
- name: create dotfiles group
|
||||||
group:
|
group:
|
||||||
name: dotfiles
|
name: dotfiles
|
||||||
|
|||||||
4
user.yml
4
user.yml
@@ -319,7 +319,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: install go binaries for vim
|
- name: install go binaries for vim
|
||||||
command: /usr/bin/nvim --headless +GoInstallBinaries +qall
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoInstallBinaries +qall'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: update vim plugins
|
- name: update vim plugins
|
||||||
@@ -327,7 +327,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: update go binaries for vim
|
- name: update go binaries for vim
|
||||||
command: /usr/bin/nvim --headless +GoUpdateBinaries +qall
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: get ycm version after update
|
- name: get ycm version after update
|
||||||
|
|||||||
@@ -1,19 +1,13 @@
|
|||||||
_path=("$HOME/bin"
|
source /etc/profile
|
||||||
"$HOME/.optbin"
|
|
||||||
"/usr/local/go/bin"
|
_path=(
|
||||||
"/usr/local/sbin"
|
"$HOME/bin"
|
||||||
"/usr/local/bin"
|
"$HOME/.optbin"
|
||||||
"/usr/sbin"
|
)
|
||||||
"/usr/bin"
|
|
||||||
"/sbin"
|
|
||||||
"/bin"
|
|
||||||
"/usr/games")
|
|
||||||
|
|
||||||
PATH=""
|
|
||||||
for part in ${_path[@]} ; do
|
for part in ${_path[@]} ; do
|
||||||
PATH="$PATH:${part}"
|
PATH="$PATH:${part}"
|
||||||
done
|
done
|
||||||
PATH="${PATH#:}"
|
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
|
|||||||
Reference in New Issue
Block a user