add flake.nix

This commit is contained in:
Jörg Thalheim 2020-12-29 11:16:27 +01:00
parent 611059a329
commit cba0fd9410
No known key found for this signature in database
GPG key ID: 003F2096411B5F92
2 changed files with 59 additions and 0 deletions

42
flake.lock generated Normal file
View file

@ -0,0 +1,42 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1609233094,
"narHash": "sha256-Ltzng3h4LDNjYAvmoX0kQ3023TvdupwuMvm1D7hZkyY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2b556ea6712cd4fa76a433093df0cb375a267e3d",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

17
flake.nix Normal file
View file

@ -0,0 +1,17 @@
{
description = "Kubernetes resource builder using nix";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
rec {
packages.kubenix = pkgs.callPackage ./default.nix {
inherit pkgs;
nixosPath = "${nixpkgs}/nixos";
};
defaultPackage = packages.kubenix;
});
}