diff --git a/flake.nix b/flake.nix index f881612..1b47114 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,8 @@ { description = "Declaratively update your data."; inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; - outputs = { ... }: { + outputs = { nixpkgs, ... }: { + lib = builtins.import ./lib.nix { pkgs = nixpkgs; }; nixosModules = rec { fooud = builtins.import ./module.nix; default = fooud; diff --git a/lib.nix b/lib.nix index e69de29..689d185 100644 --- a/lib.nix +++ b/lib.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +let + post-recv = dest: pkgs.writeScriptBin "post-recv" '' + git clone . ${dest} + ''; +in +let + lib.git = { + inherit post-recv; + }; +in + lib