From 7a83c26cc6fad457fdc023aeb2a81620795e0a7b Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 14 May 2020 16:35:24 +0100 Subject: [PATCH] Revert "Replace `keepassxc` with enpass" This reverts commit f9620c813115f1217dc0c71e8d12db1c5976b4c4. --- dotfiles.yml | 1 + files/i3.conf | 4 ++-- tasks/keepassxc.yml | 38 ++++++++++++++++++++++++++++++++++++++ tasks/security.yml | 1 + 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 tasks/keepassxc.yml diff --git a/dotfiles.yml b/dotfiles.yml index f56bd60..8a1ac8e 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -18,6 +18,7 @@ - import_tasks: tasks/ntp.yml - import_tasks: tasks/fonts.yml - import_tasks: tasks/security.yml + - import_tasks: tasks/keepassxc.yml - import_tasks: tasks/python.yml - import_tasks: tasks/vim.yml diff --git a/files/i3.conf b/files/i3.conf index 58dd72a..047a67e 100644 --- a/files/i3.conf +++ b/files/i3.conf @@ -27,10 +27,9 @@ bindsym $mod+F12 exec --no-startup-id redshift -O 3000 # Applications -bindsym $mod+K exec --no-startup-id enpass showassistant -bindsym $mod+Shift+K exec --no-startup-id enpass bindsym $mod+l exec --no-startup-id betterlockscreen -l dimblur && sleep 1 bindsym $mod+Shift+l exec --no-startup-id pranklock +bindsym $mod+K exec --no-startup-id keepassxc bindsym $mod+d exec --no-startup-id rofi -show drun -sidebar-mode bindsym $mod+Tab exec --no-startup-id rofi -show window bindsym $mod+c exec --no-startup-id rofi -show calc -modi calc -no-show-match -no-sort @@ -121,6 +120,7 @@ exec dex -as ~/.config/autostart exec picom --dbus --xrender-sync-fence exec tbg ~/Upload/bg/ -m 10 -c "betterlockscreen -u /_" exec ssh-agent -Da /tmp/ssh-agent-$USER.sock +exec keepassxc exec enpass exec dunst exec xfce4-power-manager --no-daemon diff --git a/tasks/keepassxc.yml b/tasks/keepassxc.yml new file mode 100644 index 0000000..70babc9 --- /dev/null +++ b/tasks/keepassxc.yml @@ -0,0 +1,38 @@ +- file: + state: directory + recurse: true + path: "{{ home }}/Private" + owner: "{{ user }}" + mode: 0700 + +- file: + state: directory + recurse: true + path: "{{ home }}/.config/keepassxc" + owner: "{{ user }}" + mode: 0700 + +- set_fact: + keepassxc_config: + - {section: General, option: "SSHAgent", value: "true"} + - {section: General, option: "AutoSaveAfterEveryChange", value: "true"} + - {section: General, option: "LastOpenedDatabases", value: "{{ home }}/Private/KeePass/Password Safe.kdbx"} + - {section: General, option: "SingleInstance", value: "true"} + - {section: Http, option: "Enabled", value: "false"} + - {section: GUI, option: "ShowTrayIcon", value: "true"} + - {section: GUI, option: "MinimizeToTray", value: "true"} + - {section: GUI, option: "MinimizeOnStartup", value: "true"} + - {section: security, option: "lockdatabasescreenlock", value: "true"} + - {section: Browser, option: "Enabled", value: "true"} + - {section: Browser, option: "AlwaysAllowAccess", value: "true"} + - {section: Browser, option: "AlwaysAllowUpdate", value: "true"} + +- name: Set KeepassXC configuration + ini_file: + path: "{{ home }}/.config/keepassxc/keepassxc.ini" + mode: 0700 + owner: "{{ user }}" + section: "{{ item.section }}" + option: "{{ item.option }}" + value: "{{ item.value }}" + with_items: "{{ keepassxc_config }}" diff --git a/tasks/security.yml b/tasks/security.yml index 24a395e..15d6290 100644 --- a/tasks/security.yml +++ b/tasks/security.yml @@ -7,6 +7,7 @@ when: item not in installed_packages.stdout_lines loop: - enpass-bin + - keepassxc - qomui - wireguard-tools