mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
chore: initialize headroom-templates
chore: hack headroom nix template chore: hack headroom python and shell template escape regex for nix doc start
This commit is contained in:
parent
a70b9db0c7
commit
dcbe6f4f0d
2 changed files with 84 additions and 0 deletions
67
.headroom.yaml
Normal file
67
.headroom.yaml
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
## This is the configuration file for Headroom.
|
||||||
|
## See https://github.com/vaclavsvejcar/headroom for more details.
|
||||||
|
|
||||||
|
## Defines with which version of Headroom this configuration is compatible.
|
||||||
|
## Headroom uses this field to detect whether your configuration doesn't need
|
||||||
|
## any manual migration steps in case that it's older than your current Headroom
|
||||||
|
## version. You don't need to touch this field unless explicitly stated in
|
||||||
|
## migration guide during upgrading Headroom to new version.
|
||||||
|
version: 0.5.0.0
|
||||||
|
|
||||||
|
## Defines the behaviour how to handle license headers, possible options are:
|
||||||
|
##
|
||||||
|
## - add = (default) adds license header to files with no existing header
|
||||||
|
## (same as '-a|--add-headers' command line argument)
|
||||||
|
## - drop = drops existing license header from without replacement
|
||||||
|
## (same as '-d|--drop-headers' command line argument)
|
||||||
|
## - replace = adds or replaces existing license header
|
||||||
|
## (same as '-r|--replace-headers' command line argument)
|
||||||
|
run-mode: add
|
||||||
|
|
||||||
|
## Paths to source code files (either files or directories),
|
||||||
|
## same as '-s|--source-path=PATH' command line argument (can be used multiple
|
||||||
|
## times for more than one path).
|
||||||
|
source-paths:
|
||||||
|
- .
|
||||||
|
|
||||||
|
license-headers:
|
||||||
|
nix:
|
||||||
|
file-extensions: ["nix"]
|
||||||
|
margin-top-code: 1
|
||||||
|
margin-top-file: 0
|
||||||
|
margin-bottom-code: 1
|
||||||
|
margin-bottom-file: 0
|
||||||
|
put-after: []
|
||||||
|
put-before: []
|
||||||
|
# use a special comment so it doesn't collide with my own comments
|
||||||
|
block-comment:
|
||||||
|
starts-with: ^\/\*\*
|
||||||
|
ends-with: \*\/$
|
||||||
|
|
||||||
|
## Allows to define list of regular expressions that will be matched against
|
||||||
|
## 'source-paths' and such paths will be excluded from processing. Same as
|
||||||
|
## '-e|--excluded-path=REGEX' command line argument (can be used multiple times
|
||||||
|
## for more than one path).
|
||||||
|
excluded-paths:
|
||||||
|
- ".direnv"
|
||||||
|
- "./result"
|
||||||
|
|
||||||
|
## If set to 'true', Headroom tries to detect whether any VCS (like GIT) is used
|
||||||
|
## for current project and if yes, it loads rules for ignored files and excludes
|
||||||
|
## all source paths that matches these rules.
|
||||||
|
exclude-ignored-paths: false
|
||||||
|
|
||||||
|
## Paths to template files (either files or directories),
|
||||||
|
## same as '-t|--template-path=PATH' command line argument (can be used multiple
|
||||||
|
## times for more than one path).
|
||||||
|
template-paths:
|
||||||
|
- headroom-templates
|
||||||
|
|
||||||
|
## Variables (key-value) to replace in templates,
|
||||||
|
## same as '-v|--variable="KEY=VALUE"' command line argument (can be used
|
||||||
|
## multiple times for more than one path).
|
||||||
|
variables:
|
||||||
|
author: "Léana"
|
||||||
|
year: "2026"
|
||||||
|
project: ".files"
|
||||||
|
email: "yrnan.wvnat+tvg@vpybhq.pbz (rot13)"
|
||||||
17
headroom-templates/nix.mustache
Normal file
17
headroom-templates/nix.mustache
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
/**
|
||||||
|
{{ project }}
|
||||||
|
Copyright (C) {{ year }} {{ author }}
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
Loading…
Add table
Add a link
Reference in a new issue