From dcbe6f4f0dbcf1cfdb4bfbc538e4a46f96650e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 15 Jan 2026 10:15:16 +0100 Subject: [PATCH] chore: initialize headroom-templates chore: hack headroom nix template chore: hack headroom python and shell template escape regex for nix doc start --- .headroom.yaml | 67 +++++++++++++++++++++++++++++++++ headroom-templates/nix.mustache | 17 +++++++++ 2 files changed, 84 insertions(+) create mode 100644 .headroom.yaml create mode 100644 headroom-templates/nix.mustache diff --git a/.headroom.yaml b/.headroom.yaml new file mode 100644 index 00000000..dc85b3d0 --- /dev/null +++ b/.headroom.yaml @@ -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)" diff --git a/headroom-templates/nix.mustache b/headroom-templates/nix.mustache new file mode 100644 index 00000000..8370eac1 --- /dev/null +++ b/headroom-templates/nix.mustache @@ -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/. +*/