From cba0fd941094e79c8a10a529cc6e2a1514886a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 29 Dec 2020 11:16:27 +0100 Subject: [PATCH] add flake.nix --- flake.lock | 42 ++++++++++++++++++++++++++++++++++++++++++ flake.nix | 17 +++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..347390f --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..70e890c --- /dev/null +++ b/flake.nix @@ -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; + }); +}