some management and task files
This commit is contained in:
parent
4e0b7fb319
commit
09b5bae6b3
11 changed files with 193 additions and 11 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use nix
|
16
.forgejo/actions/precommit/Taskfile.yaml
Normal file
16
.forgejo/actions/precommit/Taskfile.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
init:
|
||||
desc: Initialize pre-commit hooks
|
||||
cmds:
|
||||
- pre-commit install --install-hooks
|
||||
run:
|
||||
desc: Run pre-commit
|
||||
cmds:
|
||||
- pre-commit run --all-files
|
||||
update:
|
||||
desc: Update pre-commit hooks
|
||||
cmds:
|
||||
- pre-commit autoupdate
|
23
.gitignore
vendored
23
.gitignore
vendored
|
@ -1 +1,22 @@
|
|||
/.tmp
|
||||
.tmp
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
.direnv
|
||||
.private/
|
||||
.venv/
|
||||
.terraform
|
||||
.direnv
|
||||
*.tfvars
|
||||
.decrypted~*
|
||||
*.agekey
|
||||
*.pub
|
||||
*.key
|
||||
*.pem
|
||||
kubeconfig*
|
||||
*talosconfig.yaml
|
||||
omniconfig.yaml
|
||||
config.xml
|
||||
.idea/
|
||||
.env
|
||||
.secrets
|
||||
.github
|
||||
|
|
53
.pre-commit-config.yaml
Normal file
53
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
fail_fast: false
|
||||
|
||||
exclude: |
|
||||
(?x)^(
|
||||
docs/_assets/.*
|
||||
| .*\.sops\.toml
|
||||
)$
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/adrienverge/yamllint
|
||||
rev: v1.35.1
|
||||
hooks:
|
||||
- id: yamllint
|
||||
args:
|
||||
- -c
|
||||
- ".yamllint.yaml"
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-byte-order-marker
|
||||
- id: mixed-line-ending
|
||||
- id: check-added-large-files
|
||||
args: [--maxkb=2048]
|
||||
- id: check-merge-conflict
|
||||
- id: check-executables-have-shebangs
|
||||
|
||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||
rev: v1.5.5
|
||||
hooks:
|
||||
- id: forbid-crlf
|
||||
- id: forbid-tabs
|
||||
|
||||
- repo: https://github.com/sirosen/fix-smartquotes
|
||||
rev: 0.2.0
|
||||
hooks:
|
||||
- id: fix-smartquotes
|
||||
|
||||
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||
rev: 3.0.0
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
language: script
|
||||
args: [--severity=error]
|
||||
additional_dependencies: []
|
||||
|
||||
- repo: https://github.com/onedr0p/sops-pre-commit
|
||||
rev: v2.1.1
|
||||
hooks:
|
||||
- id: forbid-secrets
|
8
.taskfiles/act/Taskfile.yaml
Normal file
8
.taskfiles/act/Taskfile.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
run:
|
||||
desc: Run ACT with custom image
|
||||
cmds:
|
||||
- act -P docker=catthehacker/ubuntu:act-latest
|
16
.taskfiles/precommit/Taskfile.yaml
Normal file
16
.taskfiles/precommit/Taskfile.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
init:
|
||||
desc: Initialize pre-commit hooks
|
||||
cmds:
|
||||
- pre-commit install --install-hooks
|
||||
run:
|
||||
desc: Run pre-commit
|
||||
cmds:
|
||||
- pre-commit run --all-files
|
||||
update:
|
||||
desc: Update pre-commit hooks
|
||||
cmds:
|
||||
- pre-commit autoupdate
|
18
.vscode/settings.json
vendored
18
.vscode/settings.json
vendored
|
@ -5,6 +5,20 @@
|
|||
".forgejo/workflows/*"
|
||||
]
|
||||
},
|
||||
"yaml.schemaStore.enable": true
|
||||
"yaml.schemaStore.enable": true,
|
||||
"files.associations": {
|
||||
".secrets": "dotenv"
|
||||
},
|
||||
"material-icon-theme.folders.associations": {
|
||||
".taskfiles": "utils",
|
||||
"bootstrap": "import",
|
||||
"charts": "kubernetes",
|
||||
"hack": "scripts",
|
||||
"repositories": "database",
|
||||
"vars": "other"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.fontFamily": "FiraCode Nerd Font",
|
||||
}
|
||||
|
29
.yamllint.yaml
Normal file
29
.yamllint.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
ignore: |
|
||||
.ansible/
|
||||
.direnv/
|
||||
.private/
|
||||
.vscode/
|
||||
*.sops.*
|
||||
ansible/roles/xanmanning.k3s/
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
truthy:
|
||||
allowed-values: ["true", "false", "on"]
|
||||
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
|
||||
line-length: disable
|
||||
|
||||
braces:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 1
|
||||
|
||||
brackets:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 0
|
||||
|
||||
indentation: enable
|
10
Taskfile.yaml
Normal file
10
Taskfile.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
version: "3"
|
||||
|
||||
includes:
|
||||
act: .taskfiles/act
|
||||
precommit: .taskfiles/precommit
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds: ["task -l"]
|
|
@ -23,4 +23,3 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
|
15
shell.nix
Normal file
15
shell.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Shell for bootstrapping flake-enabled nix and home-manager
|
||||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.mkShell {
|
||||
# Enable experimental features without having to specify the argument
|
||||
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gitleaks
|
||||
go-task
|
||||
pre-commit
|
||||
sops
|
||||
age
|
||||
go-task
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue