Skip to content

Commit 6222b80

Browse files
Merge pull request #10 from codosseum-org/feature/add-nix-support
2 parents 68afebc + d6a47dc commit 6222b80

File tree

9 files changed

+196
-25
lines changed

9 files changed

+196
-25
lines changed

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-FileCopyrightText: 2025 Alexander Wood (BristerMitten)
2+
#
3+
# SPDX-License-Identifier: AGPL-3.0-or-later
4+
5+
use flake .

.github/workflows/compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v3
1717
- name: REUSE Compliance check
18-
uses: fsfe/reuse-action@v2
18+
uses: fsfe/reuse-action@v6.0.0
1919
openapi:
2020
runs-on: ubuntu-latest
2121
steps:

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ out/
1515
.settings
1616
.classpath
1717
.factorypath
18+
19+
# Devenv
20+
.devenv*
21+
devenv.local.nix
22+
23+
# direnv
24+
.direnv

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
# See https://pre-commit.com/hooks.html for more hooks
66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.2.0
8+
rev: v6.0.0
99
hooks:
1010
- id: trailing-whitespace
1111
- id: end-of-file-fixer
1212
- id: check-yaml
1313
- id: check-added-large-files
1414
- repo: https://github.com/python-openapi/openapi-spec-validator
15-
rev: 0.5.5 # The version to use or 'master' for latest
15+
rev: 0.7.2
1616
hooks:
1717
- id: openapi-spec-validator
1818
- repo: https://github.com/fsfe/reuse-tool
19-
rev: v1.0.0
19+
rev: v6.1.2
2020
hooks:
2121
- id: reuse

.reuse/dep5

Lines changed: 0 additions & 21 deletions
This file was deleted.

REUSE.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version = 1
2+
SPDX-PackageName = "codosseum-backend"
3+
SPDX-PackageSupplier = "JohnnyJayJay <johnnyjayjay02@gmail.com>"
4+
SPDX-PackageDownloadLocation = "https://github.com/codosseum-org/backend"
5+
6+
[[annotations]]
7+
path = ".github/workflows/**"
8+
precedence = "aggregate"
9+
SPDX-FileCopyrightText = "JohnnyJayJay"
10+
SPDX-License-Identifier = "CC0-1.0"
11+
12+
[[annotations]]
13+
path = ["gradle/**", "gradlew", "gradlew.bat"]
14+
precedence = "aggregate"
15+
SPDX-FileCopyrightText = "Gradle, Inc."
16+
SPDX-License-Identifier = "Apache-2.0"

flake.lock

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.lock.license

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-FileCopyrightText: 2025 Alexander Wood (BristerMitten)
2+
SPDX-License-Identifier: AGPL-3.0-or-later

flake.nix

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# SPDX-FileCopyrightText: 2025 Alexander Wood (BristerMitten)
2+
#
3+
# SPDX-License-Identifier: AGPL-3.0-or-later
4+
5+
{
6+
description = "Codosseum Backend Development Flake";
7+
8+
inputs = {
9+
flake-parts.url = "github:hercules-ci/flake-parts";
10+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
11+
treefmt-nix.url = "github:numtide/treefmt-nix";
12+
};
13+
14+
nixConfig = {
15+
extra-trusted-public-keys = [
16+
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
17+
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
18+
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
19+
];
20+
extra-substituters = [
21+
"https://cache.nixos.org"
22+
"https://nix-community.cachix.org/"
23+
"https://numtide.cachix.org"
24+
];
25+
};
26+
27+
outputs =
28+
inputs@{ flake-parts, ... }:
29+
flake-parts.lib.mkFlake { inherit inputs; } {
30+
imports = [
31+
inputs.treefmt-nix.flakeModule
32+
];
33+
systems = [
34+
"x86_64-linux"
35+
"aarch64-linux"
36+
"aarch64-darwin"
37+
"x86_64-darwin"
38+
];
39+
perSystem =
40+
{
41+
config,
42+
self',
43+
inputs',
44+
pkgs,
45+
system,
46+
...
47+
}:
48+
{
49+
treefmt = {
50+
flakeCheck = true;
51+
flakeFormatter = true;
52+
53+
programs.nixfmt.enable = true;
54+
};
55+
devShells.default = pkgs.mkShell {
56+
buildInputs = with pkgs; [
57+
pre-commit
58+
reuse
59+
checkstyle
60+
];
61+
};
62+
};
63+
flake = {
64+
};
65+
};
66+
}

0 commit comments

Comments
 (0)