From cbc475bdf46c115ac0f28008a531164567a12f87 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 22 Jul 2023 23:31:40 +0200 Subject: init flake.nix --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 56 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..51e2759 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1689940971, + "narHash": "sha256-397xShPnFqPC59Bmpo3lS+/Aw0yoDRMACGo1+h2VJMo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9ca785644d067445a4aa749902b29ccef61f7476", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ec13152 --- /dev/null +++ b/flake.nix @@ -0,0 +1,29 @@ +{ + description = "krops - krebs operations"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs, ... }: + let + supportedSystems = [ + "x86_64-linux" + "i686-linux" + "aarch64-linux" + "riscv64-linux" + ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + in + { + lib = forAllSystems (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + krops = pkgs.callPackage ./pkgs/krops {}; + populate = pkgs.callPackage ./pkgs/populate {}; + in { + inherit populate; + inherit (krops) rebuild runShell withNixOutputMonitor writeCommand writeDeploy writeTest; + }); + }; +} -- cgit v1.2.3