add lib for helper functions
This commit is contained in:
parent
2bd18ab7ca
commit
cc887fdc72
2 changed files with 14 additions and 1 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
description = "Declaratively update your data.";
|
description = "Declaratively update your data.";
|
||||||
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
outputs = { ... }: {
|
outputs = { nixpkgs, ... }: {
|
||||||
|
lib = builtins.import ./lib.nix { pkgs = nixpkgs; };
|
||||||
nixosModules = rec {
|
nixosModules = rec {
|
||||||
fooud = builtins.import ./module.nix;
|
fooud = builtins.import ./module.nix;
|
||||||
default = fooud;
|
default = fooud;
|
||||||
|
|
|
||||||
12
lib.nix
12
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue