diff --git a/flake.lock b/flake.lock index 569e05c7..25882917 100644 --- a/flake.lock +++ b/flake.lock @@ -1,20 +1,12 @@ { "nodes": { "crane": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, "locked": { - "lastModified": 1688772518, - "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "lastModified": 1731974733, + "narHash": "sha256-enYSSZVVl15FI5p+0Y5/Ckf5DZAvXe6fBrHxyhA/njc=", "owner": "ipetkov", "repo": "crane", - "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "rev": "3cb338ce81076ce5e461cf77f7824476addb0e1c", "type": "github" }, "original": { @@ -39,22 +31,6 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -77,24 +53,6 @@ "inputs": { "systems": "systems" }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, "locked": { "lastModified": 1685518550, "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", @@ -109,9 +67,9 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -150,11 +108,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1687412861, - "narHash": "sha256-Z/g0wbL68C+mSGerYS2quv9FXQ1RRP082cAC0Bh4vcs=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e603dc5f061ca1d8a19b3ede6a8cf9c9fcba6cdc", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { @@ -248,8 +206,8 @@ }, "pre-commit-hooks-nix": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", "gitignore": "gitignore", "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable" @@ -270,11 +228,11 @@ }, "process-compose-flake": { "locked": { - "lastModified": 1689870193, - "narHash": "sha256-qZgtMtMoPKtH1u/9BiWB8B+pVYLcuZwBdnKB7bRZExQ=", + "lastModified": 1731079499, + "narHash": "sha256-ir7WTVpG999N07wkOCs1kwZsQKitOv3CNDqNalCMK3c=", "owner": "Platonic-Systems", "repo": "process-compose-flake", - "rev": "0e2aab0ba17c098838813979251a4363b26b0875", + "rev": "018783e68c89f94dbe11ce918d6206e9e4138787", "type": "github" }, "original": { @@ -290,40 +248,15 @@ "nixpkgs": "nixpkgs", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "process-compose-flake": "process-compose-flake", - "rust-overlay": "rust-overlay_2", + "rust-overlay": "rust-overlay", "services-flake": "services-flake", - "systems": "systems_4", + "systems": "systems_3", "treefmt-nix": "treefmt-nix" } }, "rust-overlay": { "inputs": { - "flake-utils": [ - "crane", - "flake-utils" - ], - "nixpkgs": [ - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688351637, - "narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "f9b92316727af9e6c7fee4a761242f7f46880329", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -342,11 +275,11 @@ }, "services-flake": { "locked": { - "lastModified": 1693308844, - "narHash": "sha256-JDOCKKR8kREeKd7/nMPNPhT2F/bGADxyoy3B7GWWKw8=", + "lastModified": 1731803425, + "narHash": "sha256-VnMt3bJhzrDYpNkp2NYpIqTAJnY645SCxxZBMlWxtiA=", "owner": "juspay", "repo": "services-flake", - "rev": "b93a612aa7057fbb395c79a915672f9b6567ffea", + "rev": "a6ef2d67aa91aaa7866bc53027b970d0c47da7df", "type": "github" }, "original": { @@ -400,21 +333,6 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": "nixpkgs_4" diff --git a/flake.nix b/flake.nix index 2f230a52..cacd80a8 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,6 @@ # Rust rust-overlay.url = "github:oxalica/rust-overlay"; crane.url = "github:ipetkov/crane"; - crane.inputs.nixpkgs.follows = "nixpkgs"; # Dev tools treefmt-nix.url = "github:numtide/treefmt-nix"; diff --git a/nix/services.nix b/nix/services.nix index 7c742948..07dea3c3 100644 --- a/nix/services.nix +++ b/nix/services.nix @@ -3,7 +3,7 @@ perSystem = { config, self', pkgs, lib, system, ... }: { - process-compose."lts-services" = { + process-compose."lts-services" = pc: { imports = [ inputs.services-flake.processComposeModules.default ]; @@ -16,12 +16,22 @@ port = 6381; }; services.zookeeper."zookeeper1".enable = true; - services.apache-kafka."kafka1".enable = true; + services.apache-kafka."kafka1" = { + enable = true; + settings = { + "zookeeper.connect" = with pc.config.services.zookeeper; [ "localhost:${builtins.toString zookeeper1.port}" ]; + }; + }; + # kafka should start only after zookeeper is healthy + settings.processes."kafka1".depends_on."zookeeper1".condition = "process_healthy"; }; # Flake outputs devShells.services = pkgs.mkShell { - nativeBuildInputs = [ + inputsFrom = [ + config.process-compose."lts-services".services.outputs.devShell + ]; + packages = [ config.process-compose."lts-services".outputs.package ]; };