feat(nix-flake): add nix flake and nix module

This commit is contained in:
Philipp 2025-03-20 00:44:55 +01:00
parent 21d580d1a6
commit ddaf33b4f8
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750
6 changed files with 226 additions and 0 deletions

21
nix/default.nix Normal file
View file

@ -0,0 +1,21 @@
{ pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in
import (fetchTree nixpkgs.locked) {
overlays = [
(import "${fetchTree gomod2nix.locked}/overlay.nix")
];
}
)
, buildGoApplication ? pkgs.buildGoApplication
}:
buildGoApplication {
pname = "discord-tweeter";
version = "0.1";
pwd = ./.;
src = ../.;
modules = ./gomod2nix.toml;
}