Skip to content

Commit

Permalink
tweaks & updates (#17)
Browse files Browse the repository at this point in the history
Updates and tweaks 

* bump github ci step versions
* pin python version
* bump archlinux version
* added updated config's for rice linux setup
* seperate ci & release building, we don't need a release per commit
* Add spotify preferences to fix issue with track changes under wayland
See https://medium.com/@CodyReichert/fix-spotify-ui-lags-unresponsive-between-track-changes-on-linux-93e955710776
* Move to Pipenv for python dep management
* switch to neovim, it has many of my preferences out of the box
* classify is failing the idempotent molecule check, let's just ignore
changes from it
* add term colors to neovim
* use ansible for test verification testinfra is no longer the default
see https://molecule.readthedocs.io/en/latest/configuration.html
  • Loading branch information
yuhonas authored Oct 27, 2021
1 parent 17b7bfd commit da199ac
Show file tree
Hide file tree
Showing 43 changed files with 1,957 additions and 1,019 deletions.
10 changes: 7 additions & 3 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
skip_list:
- 301
- 305
warn_list:
- command-instead-of-shell # Use shell only when shell functionality is required
- experimental # all rules tagged as experimental
- no-changed-when # Commands should not change things if nothing needs doing
- unnamed-task # All tasks should be named
- yaml # Violations reported by yamllint


2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip pipenv
Expand Down
1 change: 1 addition & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
rules:
line-length: disable
comments: disable
79 changes: 5 additions & 74 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,80 +6,11 @@ verify_ssl = true
[dev-packages]

[packages]
ansible = "==2.9.6"
ansible-lint = "==4.2.0"
appdirs = "==1.4.3"
arrow = "==0.15.5"
"aspy.yaml" = "==1.3.0"
attrs = "==19.3.0"
bcrypt = "==3.1.7"
binaryornot = "==0.4.4"
certifi = "==2019.11.28"
cffi = "==1.14.0"
cfgv = "==3.1.0"
chardet = "==3.0.4"
click = "==7.0"
click-completion = "==0.5.2"
click-help-colors = "==0.7"
colorama = "==0.4.3"
cookiecutter = "==1.7.0"
cryptography = "==3.3.2"
distlib = "==0.3.0"
docker = "==4.2.0"
entrypoints = "==0.3"
fasteners = "==0.15"
filelock = "==3.0.12"
flake8 = "==3.7.9"
future = "==0.18.2"
git-url-parse = "==1.2.2"
identify = "==1.4.11"
idna = "==2.9"
importlib-metadata = "==1.5.0"
importlib-resources = "==1.3.1"
jinja2-time = "==0.2.0"
mccabe = "==0.6.1"
molecule = "==3.0.2"
monotonic = "==1.5"
more-itertools = "==8.2.0"
nodeenv = "==1.3.5"
paramiko = "==2.7.1"
pathspec = "==0.7.0"
pbr = "==5.4.4"
pexpect = "==4.8.0"
pluggy = "==0.13.1"
poyo = "==0.5.0"
pre-commit = "==1.21.0"
ptyprocess = "==0.6.0"
py = "==1.8.1"
pycodestyle = "==2.5.0"
pycparser = "==2.20"
pyflakes = "==2.1.1"
pyparsing = "==2.4.6"
pytest = "==5.3.5"
python-dateutil = "==2.8.1"
python-gilt = "==1.2.1"
requests = "==2.23.0"
"ruamel.yaml" = "==0.16.10"
"ruamel.yaml.clib" = "==0.2.0"
sh = "==1.12.14"
shellingham = "==1.3.2"
six = "==1.14.0"
tabulate = "==0.8.6"
testinfra = "==5.0.0"
toml = "==0.10.0"
tree-format = "==0.1.2"
urllib3 = "==1.25.8"
virtualenv = "==20.0.9"
wcwidth = "==0.1.8"
websocket-client = "==0.57.0"
whichcraft = "==0.6.1"
ansible = "*"
ansible-lint = "*"
flake8 = "*"
molecule-docker = "*"
yamllint = "==1.20.0"
zipp = "==3.1.0"
Cerberus = "==1.3.2"
Jinja2 = "==2.11.1"
MarkupSafe = "==1.1.1"
PyNaCl = "==1.3.0"
PyYAML = "==5.3"

[requires]
python_version = "3.7"
python_version = "3.9"
966 changes: 435 additions & 531 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[defaults]
interpreter_python=auto_silent
callback_whitelist = profile_tasks

8 changes: 3 additions & 5 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ driver:
name: "docker"
lint: |
set -e
yamllint .
ansible-lint
# yamllint .
ansible-lint -x formatting playbook.yml roles/
flake8
platforms:
- name: "molecule_instance"
Expand All @@ -28,6 +28,4 @@ provisioner:
prepare: "../../prepare.yml"
converge: "../../playbook.yml"
verifier:
name: "testinfra"
options:
s: false # set to true for test debugging see https://docs.pytest.org/en/latest/capture.html
name: ansible
10 changes: 10 additions & 0 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
assert:
that: true
1 change: 1 addition & 0 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- name: classify hosts depending on their os distribution
group_by:
key: os_{{ ansible_facts['os_family'] }}
changed_when: false
tags: minimal

- hosts: all
Expand Down
3 changes: 2 additions & 1 deletion roles/developer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
register: asdf_location
changed_when: false

- debug: msg="{{ asdf_location.stdout }}"
# - debug: msg="{{ asdf_location.stdout }}"

- name: ensure asdf is in the $PATH
blockinfile:
Expand All @@ -65,6 +65,7 @@
- name: set global asdf versions
blockinfile:
path: "{{ ansible_env.HOME }}/.tool-versions"
mode: 0644
create: true
block: |
golang 1.12.5
Expand Down
1 change: 1 addition & 0 deletions roles/dotfiles/files/.mackup/zsh_config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ name = zsh_config

[configuration_files]
.zshrc
.oh-my-zsh/custom/custom.zsh
7 changes: 7 additions & 0 deletions roles/dotfiles/files/Mackup/.Xresources
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ rofi.padding: 10
rofi.bw: 0
rofi.eh: 1
rofi.separator-style: none


Sxiv.background: #000000
Sxiv.foreground: #00C0FF
Sxiv.font: Hack-9


101 changes: 52 additions & 49 deletions roles/dotfiles/files/Mackup/.config/Code - OSS/User/keybindings.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,54 @@
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+w k",
"command": "workbench.action.focusAboveGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'",
},
{
"key": "ctrl+w j",
"command": "workbench.action.focusBelowGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'",
},
{
"key": "ctrl+w h",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'",
},
{
"key": "ctrl+w l",
"command": "workbench.action.focusRightGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'",
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetVisible"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetVisible"
},{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
{
"key": "ctrl+w c",
"command": "workbench.action.closeActiveEditor",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'"
},
{
"key": "ctrl+w n",
"command": "workbench.action.openNewEditor",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'"
}
// {
// "key": "ctrl+p",
// "command": "workbench.action.quickOpen",
// "when": "!editorFocus && !inQuickOpen"
// },
{
"key": "ctrl+w",
"command": "workbench.action.closeActiveEditor",
"when": "!editorFocus"
},
{
"key": "ctrl+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
"key": "ctrl+2",
"command": "workbench.action.openEditorAtIndex2"
},
{
"key": "ctrl+3",
"command": "workbench.action.openEditorAtIndex3"
},
{
"key": "ctrl+4",
"command": "workbench.action.openEditorAtIndex4"
},
{
"key": "ctrl+5",
"command": "workbench.action.openEditorAtIndex5"
},
{
"key": "ctrl+6",
"command": "workbench.action.openEditorAtIndex6"
},
{
"key": "ctrl+7",
"command": "workbench.action.openEditorAtIndex7"
},
{
"key": "ctrl+8",
"command": "workbench.action.openEditorAtIndex8"
},
{
"key": "ctrl+9",
"command": "workbench.action.openEditorAtIndex9"
},
{
"key": "ctrl+shift+v",
"command": "-markdown.showPreview",
"when": "!notebookEditorFocused && editorLangId == 'markdown'"
}
]
23 changes: 20 additions & 3 deletions roles/dotfiles/files/Mackup/.config/Code - OSS/User/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
{
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.leader": "\\",
"vim.cursorStylePerMode.replace": "underline",
"window.zoomLevel": 0,
"liveServer.settings.donotShowInfoMsg": true,
"diffEditor.renderSideBySide": false
"diffEditor.renderSideBySide": false,
"vim.useSystemClipboard": false,
"vim.handleKeys": {
"<C-w>": false,
"<C-p>": false
},
"vim.commandLineModeKeyBindings": [

],
"editor.minimap.enabled": false,
"workbench.startupEditor": "newUntitledFile",
"keyboard.dispatch": "keyCode",
"todo.symbols.box": "[ ]",
"todo.symbols.done": "[x]",
"todo.symbols.cancelled": "[-]",
"solargraph.commandPath": "/home/clintp/.asdf/shims/solargraph",
"tailwindCSS.includeLanguages": {
"slim": "html",
"slim-lang": "html"
}
}
30 changes: 29 additions & 1 deletion roles/dotfiles/files/Mackup/.config/alacritty/alacritty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
WINIT_X11_SCALE_FACTOR: "1.0"

window:
# title: Terminal
# Window dimensions (changes require restart)
#
# Specified in number of columns/lines, not pixels. If both are zero this
Expand Down Expand Up @@ -415,7 +416,7 @@ cursor:
# window is not focused.
unfocused_hollow: true

# dynamic_title: false
# dynamic_title: true
# Live config reload (changes require restart)
live_config_reload: true

Expand Down Expand Up @@ -452,3 +453,30 @@ debug:
ref_test: false

# vim: nospell
# BEGIN ACE
colors:
primary:
background: '#09171C'
foreground: '#c4afbf'
cursor:
text: '#09171C'
cursor: '#c4afbf'
normal:
black: '#09171C'
red: '#27425C'
green: '#304A6A'
yellow: '#4E5272'
blue: '#3A5B85'
magenta: '#536992'
cyan: '#596A94'
white: '#c4afbf'
bright:
black: '#897a85'
red: '#27425C'
green: '#304A6A'
yellow: '#4E5272'
blue: '#3A5B85'
magenta: '#536992'
cyan: '#596A94'
white: '#c4afbf'
# END ACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Creating an encrypted folder
mkdir <encrypted> <decrypted>
gocryptfs -init <encrypted>
gocryptfs <encrypted> <decrypted>

# Unmounting an encrypted folder
fusermount -u <decrypted>
rmdir <decrypted>

# Allow other users to access the encrypted folder
gocryptfs -allow_other <encrypted> <decrypted>

# Change the password of an encrypted folder
$ gocryptfs -passwd <encrypted>

# Mount directory as read only
$ gocryptfs -ro <encrypted> <decrypted>

Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ pacman -Fy [FILE]

# find which local package owns a particuar program
pacman -Qo [FILE]

# list files installed by a package
pacman -Ql [FILE]
Loading

0 comments on commit da199ac

Please sign in to comment.