aboutsummaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2024-05-22 02:47:18 +0200
committerGitHub <noreply@github.com>2024-05-22 00:47:18 +0000
commitde6f0488a67ad65bd2ac40356b08a78a365414cd (patch)
tree109272ea22d952e3772b763523b18cef4f97eac8 /flake.nix
parent3066114c2481b5f3a5e4cda65fdd22e768359e94 (diff)
downloadgitea-de6f0488a67ad65bd2ac40356b08a78a365414cd.tar.gz
gitea-de6f0488a67ad65bd2ac40356b08a78a365414cd.zip
Add nix flake for dev shell (#30967)
To try it you need **nix** installed `nix-daemon ` running and your user has to be member of the **nix-users** group. Or use NixOS. then by just: ```sh nix develop -c $SHELL ``` a dedicated development environment with all needed packages will be created.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000000..c6e915e9db
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,37 @@
+{
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+ outputs =
+ { nixpkgs, flake-utils, ... }:
+ flake-utils.lib.eachDefaultSystem (
+ system:
+ let
+ pkgs = nixpkgs.legacyPackages.${system};
+ in
+ {
+ devShells.default = pkgs.mkShell {
+ buildInputs = with pkgs; [
+ # generic
+ git
+ git-lfs
+ gnumake
+ gnused
+ gnutar
+ gzip
+
+ # frontend
+ nodejs_20
+
+ # linting
+ python312
+ poetry
+
+ # backend
+ go_1_22
+ ];
+ };
+ }
+ );
+}