chore: import project files
This commit is contained in:
parent
a7b6e107c2
commit
24f7f2a1f4
7 changed files with 135 additions and 0 deletions
9
.envrc
Normal file
9
.envrc
Normal file
|
@ -0,0 +1,9 @@
|
|||
use flake .nix
|
||||
dotenv_if_exists
|
||||
|
||||
if on_git_branch; then
|
||||
echo
|
||||
git status --short --branch
|
||||
echo
|
||||
git fetch
|
||||
fi
|
61
.nix/flake.lock
Normal file
61
.nix/flake.lock
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1692190437,
|
||||
"narHash": "sha256-yJUZzmzSmDYb9ONPnMQDru66RjZgGQZRvj3tQebkexk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9b2aa98db6b10503666a50f4eb93b2fc0d57bde5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
29
.nix/flake.nix
Normal file
29
.nix/flake.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "A basic flake with a shell";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = [ pkgs.bashInteractive ];
|
||||
buildInputs = with pkgs; [
|
||||
# pre-commit
|
||||
pre-commit
|
||||
commitizen
|
||||
|
||||
# formatting
|
||||
nodePackages.prettier # markdown formatting
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
pre-commit install --allow-missing-config --hook-type pre-commit --hook-type commit-msg
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
18
.pre-commit-config.yaml
Normal file
18
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
|
||||
- repo: https://github.com/commitizen-tools/commitizen
|
||||
rev: v2.37.0
|
||||
hooks:
|
||||
- id: commitizen
|
||||
stages: [commit-msg]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v3.0.0-alpha.4
|
||||
hooks:
|
||||
- id: prettier
|
||||
types_or:
|
||||
- markdown
|
8
.releaserc
Normal file
8
.releaserc
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"branches": ["main"],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/npm",
|
||||
"@semantic-release/git"
|
||||
]
|
||||
}
|
1
Dockerfile
Normal file
1
Dockerfile
Normal file
|
@ -0,0 +1 @@
|
|||
FROM kopia/kopia
|
9
build-and-push.sh
Executable file
9
build-and-push.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
SKIP=no-commit-to-branch,prettier CI=false npx semantic-release
|
||||
|
||||
VERSION=`npx semantic-release --version`
|
||||
|
||||
docker image build --tag git.molez.org/mandlm/kopia:${VERSION} --tag git.molez.org/mandlm/kopia:latest .
|
||||
docker image push git.molez.org/mandlm/kopia:${VERSION}
|
||||
docker image push git.molez.org/mandlm/kopia:latest
|
Loading…
Reference in a new issue