Skip to content

Commit

Permalink
Merge pull request #133 from akirak/multi-licenses
Browse files Browse the repository at this point in the history
Manage licenses
  • Loading branch information
akirak authored Jan 19, 2025
2 parents 121c3a3 + 758905d commit 23631fb
Show file tree
Hide file tree
Showing 55 changed files with 154 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: MIT
*.mdoc linguist-language=Markdown
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: MIT
.pre-commit-config.yaml
result
flake.lock
Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Contributing
Thank you for considering contributing to this project. Contributions help make
this template repository more helpful. This guide outlines how to get involved,
report issues, and submit changes.
## Contributing the documentation
If you have identified any errors in the instructions, please feel free to
submit a pull request with your proposed changes.

I would also appreciate any suggestions for enhancing the content. If you are
aware of a better alternative to the described option, please feel free to open
an issue or submit a PR.
## Contributing to templates
If you have noticed any error with one of the templates, please feel free to
report an issue.
File renamed without changes.
21 changes: 21 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-2024 Akira Komamura

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
File renamed without changes.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,18 @@ Also see [nix3.el](https://github.com/emacs-twist/nix3.el), which
provides `nix3-flake-new` and `nix3-flake-init` commands for running a
flake template quickly from inside Emacs.

## License
This repository uses different licenses depending on the files. The specific
license applicable to a file or group of files is indicated in the file headers
or in the [LICENSES](LICENSES/) directory.

- The templates are released under the UNLICENSE.
See [LICENSES/UNLICENSE](LICENSES/Unlicense.txt) for more details.
- The documentation is licensed under Attribution-ShareAlike 4.0 International
(CC-BY-SA-4.0).
- Some files are released under the MIT License.
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md).
## Other template repositories and alternatives

The following is a list of template repositories I found on GitHub:
Expand Down
2 changes: 2 additions & 0 deletions dev/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2023-2025 Akira Komamura
# SPDX-License-Identifier: MIT
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
3 changes: 3 additions & 0 deletions dev/update-beam.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/*
This script helps the user keep Erlang (erlangRxx) and Elixir (elixir_x_xx)
to their latest versions. It performs simple regexp substitutions in flake.nix.
SPDX-FileCopyrightText: 2022-2025 Akira Komamura
SPDX-License-Identifier: MIT
*/
{
lib,
Expand Down
13 changes: 0 additions & 13 deletions doc/README.md

This file was deleted.

2 changes: 2 additions & 0 deletions doc/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: MIT
{
inputs = {
systems.url = "github:nix-systems/default";
Expand Down
5 changes: 5 additions & 0 deletions doc/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
SPDX-FileCopyrightText: 2024-2025 Akira Komamura
SPDX-License-Identifier: MIT
*/
import { defineCollection } from "astro:content";
import { docsSchema } from "@astrojs/starlight/schema";

Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/configuration/editor/emacs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Emacs
description: How to set up Emacs for using Nix flakes.
---
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/configuration/nix-direnv.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Enable nix-direnv
description: How to set up nix-direnv
---
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/getting-started.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Getting started with a flake template
---
## Configuration
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Nix Flake Templates
description: A documentation site for Nix flake templates.
tableOfContents: false
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/introduction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Introduction to Flake Templates
---
Hello, this site provides instructions for setting up a development environment
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/patterns/ci/github-actions.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Continuous Integration on GitHub Actions
---

Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/patterns/formatting/treefmt-nix.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Checking formatting using treefmt-nix on GitHub Actions
---

Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/patterns/updating/renovate.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Updating Packages with Mend Renovate
---
This tutorial explains how to automatically updates packages using Renovate Bot.
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/recipes/elixir/phoenix.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Developing an Elixir Phoenix application
description: How to develop an Elixir Phoenix with a Nix flake template
---
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/recipes/gleam/app.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Developing a Gleam application
description: How to develop a server-side web application in Gleam with a Nix flake template
---
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/recipes/go/executable.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Developing a Go executable application
---

Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/recipes/ocaml/generic.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Developing an OCaml project with Dune and Nix
---

Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/recipes/rust/executable.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Developing a Rust program
description: How to develop a Rust program with a Nix flake template
---
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/recipes/typescript/web-framework.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Developing a web application in TypeScript
description: How to develop a web application in TypeScript with a Nix flake template
---
Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/recipes/zig/cli.mdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Developing a Zig CLI application
---

Expand Down
2 changes: 2 additions & 0 deletions doc/src/content/docs/resources.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: CC-BY-SA-4.0
title: Resources
description: A collection of resources related to developing a project with Nix flakes.
---
Expand Down
2 changes: 2 additions & 0 deletions doc/treefmt.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: MIT
{
projectRootFile = "treefmt.nix";

Expand Down
2 changes: 2 additions & 0 deletions elixir-app/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions elixir/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions flake-parts/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions flake-utils/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: MIT
{
description = "A collection of project templates";

Expand Down
2 changes: 2 additions & 0 deletions gleam/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions go/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions go/treefmt.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
projectRootFile = "treefmt.nix";

Expand Down
2 changes: 2 additions & 0 deletions meta/.github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
name: Build the Nix package

on:
Expand Down
2 changes: 2 additions & 0 deletions meta/.github/workflows/nix-format.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
name: Check format

on:
Expand Down
2 changes: 2 additions & 0 deletions meta/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
result
result-*
.pre-commit-hooks.yaml
Expand Down
2 changes: 2 additions & 0 deletions minimal/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions node-typescript/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
3 changes: 3 additions & 0 deletions ocaml/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense

# The default cache path is immutable when odig is installed using Nix
ODIG_CACHE_DIR="$PWD/_build/default/.odig"
# Using _build directory may not be properly allowed for storing user contents
Expand Down
3 changes: 3 additions & 0 deletions ocaml/.envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense

dotenv
use flake
2 changes: 2 additions & 0 deletions ocaml/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
_build
4 changes: 4 additions & 0 deletions ocaml/.ocamlformat
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2017-2023, Facebook, Inc.
# SPDX-FileCopyrightText: 2023-present, Tarides.
# SPDX-License-Identifier: MIT

# Latest version is available from
# https://github.com/ocaml-ppx/ocamlformat/blob/main/.ocamlformat

Expand Down
2 changes: 2 additions & 0 deletions ocaml/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
nixpkgs.url = "github:nix-ocaml/nix-overlays";
Expand Down
2 changes: 2 additions & 0 deletions ocaml/justfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
odig-odoc:
odig odoc

Expand Down
2 changes: 2 additions & 0 deletions pre-commit/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2021-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions rust/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
Expand Down
2 changes: 2 additions & 0 deletions treefmt/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2023-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions treefmt/treefmt.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2023-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
projectRootFile = "treefmt.nix";

Expand Down
3 changes: 3 additions & 0 deletions zig/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense

# Zig
zig-out/
.zig-cache/
Expand Down
2 changes: 2 additions & 0 deletions zig/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
Expand Down
2 changes: 2 additions & 0 deletions zig/treefmt.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2024-2025 Akira Komamura
# SPDX-License-Identifier: Unlicense
{
projectRootFile = "treefmt.nix";

Expand Down

0 comments on commit 23631fb

Please sign in to comment.