Skip to content
Snippets Groups Projects
Verified Commit 3020a854 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: integrate git-commit #4

parent 8af65eab
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,21 @@
"type": "github"
}
},
"git-commit": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1,
"narHash": "sha256-8hXrOA8SKy//ctoL1poIhJwuT7G4rvVu7FguROzEoDg=",
"path": "./git-commit",
"type": "path"
},
"original": {
"path": "./git-commit",
"type": "path"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
......@@ -164,6 +179,25 @@
"type": "github"
}
},
"nix-templates": {
"inputs": {
"git-commit": "git-commit",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1704993617,
"narHash": "sha256-++u7I3KCDgP+JhW70k5tiLfBESWVSKdVK7aei0G+mR8=",
"ref": "refs/heads/master",
"rev": "e63b1d6ae5526158fa2a1f4cd53b0ea4f4c93573",
"revCount": 18,
"type": "git",
"url": "https://gitlab.schukai.com/schukai/entwicklung/nix-flakes.git"
},
"original": {
"type": "git",
"url": "https://gitlab.schukai.com/schukai/entwicklung/nix-flakes.git"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1678875422,
......@@ -231,6 +265,36 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1706373441,
"narHash": "sha256-S1hbgNbVYhuY2L05OANWqmRzj4cElcbLuIkXTb69xkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "56911ef3403a9318b7621ce745f5452fb9ef6867",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1706098335,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
......@@ -246,7 +310,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_5": {
"locked": {
"lastModified": 1705856552,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
......@@ -262,7 +326,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_6": {
"locked": {
"lastModified": 1704145853,
"narHash": "sha256-G/1AMt9ibpeMlcxvD1vNaC8imGaK+g7zZ99e29BLgWw=",
......@@ -311,7 +375,8 @@
"flake-parts": "flake-parts",
"flake-root": "flake-root",
"mk-shell-bin": "mk-shell-bin",
"nixpkgs": "nixpkgs_2",
"nix-templates": "nix-templates",
"nixpkgs": "nixpkgs_4",
"treefmt-nix": "treefmt-nix",
"versionsTool": "versionsTool"
}
......@@ -333,7 +398,7 @@
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1706285206,
......@@ -351,7 +416,7 @@
},
"versionsTool": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1704542622,
......
......@@ -8,7 +8,7 @@
flake-root.url = "github:srid/flake-root";
treefmt-nix.url = "github:numtide/treefmt-nix";
versionsTool.url = "git+https://gitlab.schukai.com/oss/utilities/version.git";
git-commit.url = "git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes#git-commit";
nix-templates.url = "git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes.git";
};
nixConfig = {
......@@ -20,6 +20,7 @@
self,
flake-parts,
versionsTool,
nix-templates,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
......@@ -27,7 +28,6 @@
inputs.devenv.flakeModule
inputs.flake-root.flakeModule
inputs.treefmt-nix.flakeModule
inputs.git-commit.flakeModule
];
systems = (import ./project.nix).supportedSystems;
......@@ -50,11 +50,7 @@
portAsString = toString projectDefinition.k8s.port;
in {
packages = rec {
default = self.packages.${system}.bob;
bob = let
......@@ -67,7 +63,6 @@
{when = builtins.currentTime;}
"echo -n `date -d @$when +%Y-%m-%d_%H-%M-%S` > $out"
);
in
# https://nixos.wiki/wiki/Go
pkgs.buildGoModule {
......@@ -115,7 +110,6 @@
echo "Test passed: '$out' is as expected."
'';
};
};
treefmt.config = {
......@@ -131,7 +125,6 @@
devenv.shells = let
projectDefinition = import ./project.nix;
buildRoot = ./.;
in {
default = rec {
name = projectDefinition.name;
......@@ -140,7 +133,6 @@
versionsTool = inputs.versionsTool.defaultPackage."${builtins.currentSystem}";
workingDirectory = builtins.getEnv "PWD";
in {
treefmt.exec = ''
${config.treefmt.build.wrapper}/bin/treefmt
......@@ -165,14 +157,17 @@
update-version.exec = import ./system/scripts/update-version.nix {
inherit pkgs config buildRoot projectDefinition versionsTool workingDirectory;
};
};
imports = [];
packages = with pkgs; [
inputs.versionsTool.defaultPackage."${builtins.currentSystem}"
inputs.nix-templates.packages."${builtins.currentSystem}".git-commit
nodePackages.prettier-plugin-toml
nodePackages.prettier
go-task
alejandra
];
languages.nix.enable = true;
......@@ -188,9 +183,7 @@
};
flake = {
defaultPackage = self.packages.${builtins.currentSystem}.bob;
};
};
}
{ pkgs ? import <nixpkgs> {}, inputs, phps, lib, config, modulesPath, ... }:
{
pkgs ? import <nixpkgs> {},
inputs,
phps,
lib,
config,
modulesPath,
...
}: {
# https://devenv.sh/packages/
packages = with pkgs; [
inputs.version.defaultPackage."${builtins.currentSystem}"
......@@ -710,6 +716,4 @@ EOF
printLogfileAndExit 0
'';
}
{ pkgs ? import <nixpkgs> {}, inputs, phps, lib, config, modulesPath, ... }:
{
pkgs ? import <nixpkgs> {},
inputs,
phps,
lib,
config,
modulesPath,
...
}: {
# https://devenv.sh/packages/
packages = with pkgs; [
inputs.version.defaultPackage."${builtins.currentSystem}"
......@@ -710,6 +716,4 @@ EOF
printLogfileAndExit 0
'';
}
......@@ -8,7 +8,6 @@
}: let
serviceSourcePath = "${buildRoot}/";
common = import ./common.nix {inherit pkgs;};
in ''
#!${pkgs.bash}/bin/bash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment