Compare commits

..

4 Commits

Author SHA1 Message Date
cf2d9274d4 Add screencfg config 2024-11-09 18:01:46 +01:00
3d3890affe Add cargo config 2024-11-09 18:01:33 +01:00
c4ed7b9b9b Always copy files and directories, never symlink 2024-11-09 18:01:19 +01:00
81553524a6 Create XDG_ dirs on startup 2024-11-09 17:37:08 +01:00
5 changed files with 59 additions and 10 deletions

2
cargo/config.toml Normal file
View File

@@ -0,0 +1,2 @@
[build]
rustc-wrapper = "sccache"

View File

@@ -17,6 +17,7 @@ empty_directories:
- name: .config/alacritty
- name: .local/state/gnupg/
mode: '0700'
- name: .local/state/cargo/
dotfiles:
- from: git/gitconfig
to: .config/git/config
@@ -43,6 +44,7 @@ dotfiles:
to: .config/i3status-rust/icons/awesome.toml
- from: i3/scripts
to: .config/i3/scripts
dir: true
- from: tmux/tmux.conf
to: .config/tmux/tmux.conf
- from: vim/vimrc
@@ -75,6 +77,7 @@ dotfiles:
template: true
- from: alacritty/themes
to: .config/alacritty/themes
dir: true
- from: rofi/config
to: .config/rofi/config
- from: gtk/gtk-3.0.ini
@@ -90,10 +93,15 @@ dotfiles:
to: .config/qt5ct/qt5ct.conf
- from: scripts
to: scripts
dir: true
- from: helix/config.toml
to: .config/helix/config.toml
- from: helix/languages.toml
to: .config/helix/languages.toml
- from: screencfg/screencfg.toml
to: .config/screencfg.toml
- from: cargo/config.toml
to: .local/state/cargo/config.toml
dotfiles_remove:
- .gitconfig
- .vimrc

4
screencfg/screencfg.toml Normal file
View File

@@ -0,0 +1,4 @@
post_commands = [
"systemctl --user restart keyboard.service",
"systemctl --user restart touchpad.service",
]

View File

@@ -123,14 +123,14 @@
loop_control:
label: "{{ item.to }}"
- name: remove invalid copy target (directories)
- name: remove invalid copy target (symlinks)
file:
path: "{{ item.stat.path }}"
state: absent
when:
- not item.skipped is defined or not item.skipped
- item.stat.exists
- item.stat.isdir
- item.stat.islnk
with_items: "{{ copy_stat.results }}"
loop_control:
label: "{{ item.item.from }}"
@@ -147,16 +147,46 @@
loop_control:
label: "{{ item.to }}"
- name: link dotfiles
file:
state: link
force: true
follow: false
path: "/home/{{ user.name }}/{{ item.to }}"
- name: copy dotfiles
copy:
dest: "/home/{{ user.name }}/{{ item.to }}"
src: /var/lib/dotfiles/{{ item.from }}
owner: "{{ user.name }}"
group: "{{ user.name }}"
when: not item.template|default(false)
when: not item.template|default(false) and not item.dir|default(false)
with_items: "{{ dotfiles }}"
become: true
become_user: root
loop_control:
label: "{{ item.to }}"
- name: copy directories
synchronize:
dest: "/home/{{ user.name }}/{{ item.to }}/"
src: /var/lib/dotfiles/{{ item.from }}/
archive: false
owner: false
group: false
links: true
perms: false
times: false
recursive: true
checksum: true
delete: true
when: item.dir|default(false)
with_items: "{{ dotfiles }}"
become: true
become_user: root
loop_control:
label: "{{ item.to }}"
- name: apply directory permissions
file:
dest: "/home/{{ user.name }}/{{ item.to }}/"
owner: "{{ user.name }}"
group: "{{ user.name }}"
recurse: true
when: item.dir|default(false)
with_items: "{{ dotfiles }}"
become: true
become_user: root

View File

@@ -21,8 +21,13 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_DOWNLOAD_DIR="$HOME/download"
XDG_DOWNLOAD_DIR="$HOME/download"
mkdir -p "${XDG_CONFIG_HOME}"
mkdir -p "${XDG_CACHE_HOME}"
mkdir -p "${XDG_DATA_HOME}"
mkdir -p "${XDG_STATE_HOME}"
mkdir -p "${XDG_DOWNLOAD_DIR}"
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority