From 8e0a8c49e25a78d611ed69da5ee063adf5fba9ea Mon Sep 17 00:00:00 2001 From: Jashandeep Sohi Date: Fri, 15 Dec 2023 15:03:38 -0800 Subject: [PATCH] fix local flake reference in module --- flake-module.nix | 8 +++----- flake.lock | 18 +++++++++--------- flake.nix | 13 +++++++++++-- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/flake-module.nix b/flake-module.nix index 155106c..0b4a838 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -5,9 +5,7 @@ localFlake: inputs.devenv.flakeModule ]; - perSystem = { inputs', config, pkgs, ... }: { - packages.kpt = inputs'.kpt.packages.default; - packages.octopilot = inputs'.octopilot.packages.default; + perSystem = { system, pkgs, ... }: { devenv.shells.default = { name = "devenv-k8s"; @@ -27,10 +25,10 @@ localFlake: pkgs.kubernetes-helm pkgs.kustomize pkgs.jq - + ] ++ localFlake.withSystem system ({config, ...}: [ config.packages.kpt config.packages.octopilot - ]; + ]); }; }; } diff --git a/flake.lock b/flake.lock index b6bf1fa..35b9895 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1702239828, - "narHash": "sha256-H+z5LY1XslLLIlsh0pirHmveD7Eh6QQUT96VNSRJW9w=", + "lastModified": 1702549996, + "narHash": "sha256-mEN+8gjWUXRxBCcixeth+jlDNuzxbpFwZNOEc4K22vw=", "owner": "cachix", "repo": "devenv", - "rev": "895e8403410c3ec14d1e8cae94e88b4e7e2e8c2f", + "rev": "e681a99ffe2d2882f413a5d771129223c838ddce", "type": "github" }, "original": { @@ -362,11 +362,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1702151865, - "narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=", + "lastModified": 1702312524, + "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd", + "rev": "a9bf124c46ef298113270b1f84a164865987a91c", "type": "github" }, "original": { @@ -384,11 +384,11 @@ ] }, "locked": { - "lastModified": 1702066730, - "narHash": "sha256-aQ1uWxiFhJGzlW/rEbD1MrTg1Pg//wcjsOs6e2sFAuA=", + "lastModified": 1702370597, + "narHash": "sha256-QK4hqNKtRJP/Ku5ZYViUDwp9jQeXd60LgYzcLel/Ee8=", "owner": "dailymotion-oss", "repo": "octopilot", - "rev": "741949026ec13b15543c112387579929127bcd2e", + "rev": "c4e9bde7604cec98f1aa398880f81b0e36223e2c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 345ba36..759ef42 100644 --- a/flake.nix +++ b/flake.nix @@ -39,8 +39,6 @@ flakeModules.default = importApply ./flake-module.nix { inherit withSystem; }; in { - systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; - imports = [ flakeModules.default ]; @@ -48,5 +46,16 @@ flake = { inherit flakeModules; }; + + systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; + + perSystem = { inputs', ...}: { + + packages = { + kpt = inputs'.kpt.packages.default; + octopilot = inputs'.octopilot.packages.default; + }; + + }; }); }