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 @@ ...@@ -87,6 +87,21 @@
"type": "github" "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": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
...@@ -164,6 +179,25 @@ ...@@ -164,6 +179,25 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1678875422, "lastModified": 1678875422,
...@@ -231,6 +265,36 @@ ...@@ -231,6 +265,36 @@
} }
}, },
"nixpkgs_2": { "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": { "locked": {
"lastModified": 1706098335, "lastModified": 1706098335,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
...@@ -246,7 +310,7 @@ ...@@ -246,7 +310,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1705856552, "lastModified": 1705856552,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
...@@ -262,7 +326,7 @@ ...@@ -262,7 +326,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1704145853, "lastModified": 1704145853,
"narHash": "sha256-G/1AMt9ibpeMlcxvD1vNaC8imGaK+g7zZ99e29BLgWw=", "narHash": "sha256-G/1AMt9ibpeMlcxvD1vNaC8imGaK+g7zZ99e29BLgWw=",
...@@ -311,7 +375,8 @@ ...@@ -311,7 +375,8 @@
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-root": "flake-root", "flake-root": "flake-root",
"mk-shell-bin": "mk-shell-bin", "mk-shell-bin": "mk-shell-bin",
"nixpkgs": "nixpkgs_2", "nix-templates": "nix-templates",
"nixpkgs": "nixpkgs_4",
"treefmt-nix": "treefmt-nix", "treefmt-nix": "treefmt-nix",
"versionsTool": "versionsTool" "versionsTool": "versionsTool"
} }
...@@ -333,7 +398,7 @@ ...@@ -333,7 +398,7 @@
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1706285206, "lastModified": 1706285206,
...@@ -351,7 +416,7 @@ ...@@ -351,7 +416,7 @@
}, },
"versionsTool": { "versionsTool": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1704542622, "lastModified": 1704542622,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
flake-root.url = "github:srid/flake-root"; flake-root.url = "github:srid/flake-root";
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
versionsTool.url = "git+https://gitlab.schukai.com/oss/utilities/version.git"; 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 = { nixConfig = {
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
self, self,
flake-parts, flake-parts,
versionsTool, versionsTool,
nix-templates,
... ...
}: }:
flake-parts.lib.mkFlake {inherit inputs;} { flake-parts.lib.mkFlake {inherit inputs;} {
...@@ -27,7 +28,6 @@ ...@@ -27,7 +28,6 @@
inputs.devenv.flakeModule inputs.devenv.flakeModule
inputs.flake-root.flakeModule inputs.flake-root.flakeModule
inputs.treefmt-nix.flakeModule inputs.treefmt-nix.flakeModule
inputs.git-commit.flakeModule
]; ];
systems = (import ./project.nix).supportedSystems; systems = (import ./project.nix).supportedSystems;
...@@ -50,11 +50,7 @@ ...@@ -50,11 +50,7 @@
portAsString = toString projectDefinition.k8s.port; portAsString = toString projectDefinition.k8s.port;
in { in {
packages = rec { packages = rec {
default = self.packages.${system}.bob; default = self.packages.${system}.bob;
bob = let bob = let
...@@ -67,7 +63,6 @@ ...@@ -67,7 +63,6 @@
{when = builtins.currentTime;} {when = builtins.currentTime;}
"echo -n `date -d @$when +%Y-%m-%d_%H-%M-%S` > $out" "echo -n `date -d @$when +%Y-%m-%d_%H-%M-%S` > $out"
); );
in in
# https://nixos.wiki/wiki/Go # https://nixos.wiki/wiki/Go
pkgs.buildGoModule { pkgs.buildGoModule {
...@@ -115,7 +110,6 @@ ...@@ -115,7 +110,6 @@
echo "Test passed: '$out' is as expected." echo "Test passed: '$out' is as expected."
''; '';
}; };
}; };
treefmt.config = { treefmt.config = {
...@@ -131,7 +125,6 @@ ...@@ -131,7 +125,6 @@
devenv.shells = let devenv.shells = let
projectDefinition = import ./project.nix; projectDefinition = import ./project.nix;
buildRoot = ./.; buildRoot = ./.;
in { in {
default = rec { default = rec {
name = projectDefinition.name; name = projectDefinition.name;
...@@ -140,7 +133,6 @@ ...@@ -140,7 +133,6 @@
versionsTool = inputs.versionsTool.defaultPackage."${builtins.currentSystem}"; versionsTool = inputs.versionsTool.defaultPackage."${builtins.currentSystem}";
workingDirectory = builtins.getEnv "PWD"; workingDirectory = builtins.getEnv "PWD";
in { in {
treefmt.exec = '' treefmt.exec = ''
${config.treefmt.build.wrapper}/bin/treefmt ${config.treefmt.build.wrapper}/bin/treefmt
...@@ -165,14 +157,17 @@ ...@@ -165,14 +157,17 @@
update-version.exec = import ./system/scripts/update-version.nix { update-version.exec = import ./system/scripts/update-version.nix {
inherit pkgs config buildRoot projectDefinition versionsTool workingDirectory; inherit pkgs config buildRoot projectDefinition versionsTool workingDirectory;
}; };
}; };
imports = []; imports = [];
packages = with pkgs; [ packages = with pkgs; [
inputs.versionsTool.defaultPackage."${builtins.currentSystem}" inputs.versionsTool.defaultPackage."${builtins.currentSystem}"
inputs.nix-templates.packages."${builtins.currentSystem}".git-commit
nodePackages.prettier-plugin-toml
nodePackages.prettier
go-task go-task
alejandra
]; ];
languages.nix.enable = true; languages.nix.enable = true;
...@@ -188,9 +183,7 @@ ...@@ -188,9 +183,7 @@
}; };
flake = { flake = {
defaultPackage = self.packages.${builtins.currentSystem}.bob; 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/ # https://devenv.sh/packages/
packages = with pkgs; [ packages = with pkgs; [
inputs.version.defaultPackage."${builtins.currentSystem}" inputs.version.defaultPackage."${builtins.currentSystem}"
...@@ -710,6 +716,4 @@ EOF ...@@ -710,6 +716,4 @@ EOF
printLogfileAndExit 0 printLogfileAndExit 0
''; '';
} }
{ pkgs ? import <nixpkgs> {}, inputs, phps, lib, config, modulesPath, ... }:
{ {
pkgs ? import <nixpkgs> {},
inputs,
phps,
lib,
config,
modulesPath,
...
}: {
# https://devenv.sh/packages/ # https://devenv.sh/packages/
packages = with pkgs; [ packages = with pkgs; [
inputs.version.defaultPackage."${builtins.currentSystem}" inputs.version.defaultPackage."${builtins.currentSystem}"
...@@ -710,6 +716,4 @@ EOF ...@@ -710,6 +716,4 @@ EOF
printLogfileAndExit 0 printLogfileAndExit 0
''; '';
} }
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
}: let }: let
serviceSourcePath = "${buildRoot}/"; serviceSourcePath = "${buildRoot}/";
common = import ./common.nix {inherit pkgs;}; common = import ./common.nix {inherit pkgs;};
in '' in ''
#!${pkgs.bash}/bin/bash #!${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