add flakes

This commit is contained in:
Solene Rapenne 2022-09-10 00:11:42 +02:00
parent eb2dbad720
commit e684890b20
2 changed files with 54 additions and 0 deletions

27
flake.lock Normal file
View File

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1662099760,
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "67e45078141102f45eff1589a831aeaa3182b41e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

27
flake.nix Normal file
View File

@ -0,0 +1,27 @@
{
description = "bento: an asynchronous NixOS deployment tool";
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05;
outputs = { self, nixpkgs }: {
packages.x86_64-linux.default =
with import nixpkgs { system = "x86_64-linux"; };
stdenv.mkDerivation {
name = "bento";
src = self;
version = "1.0.1";
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share
install -Dm555 bento $out/bin/
install -Dm444 fleet.nix $out/share/
install -Dm444 config.sh.sample $out/share/
install -Dm444 LICENSE $out/share/
install -Dm444 README.md $out/share/
install -Dm444 utils/bento.nix $out/share/
'';
};
};
}