diff --git a/flake.lock b/flake.lock index bc958be..3e3e1cd 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fleet-pins": { "inputs": { "nixpkgs": "nixpkgs", @@ -69,12 +87,28 @@ }, "root": { "inputs": { + "flake-utils": "flake-utils", "fleet-pins": "fleet-pins", "nixpkgs": [ "fleet-pins", "nixpkgs-projects" ] } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f3c9dd2..7f2dbc3 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { fleet-pins.url = "git+https://git.oleks.space/oleks/fleet-pins?ref=main"; nixpkgs.follows = "fleet-pins/nixpkgs-projects"; + flake-utils.url = "github:numtide/flake-utils"; }; outputs = @@ -11,34 +12,37 @@ self, nixpkgs, fleet-pins, + flake-utils, ... }: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; - in - { - packages.${system} = rec { - hello-world = pkgs.callPackage ./packages/hello-world.nix { }; - xonsh = pkgs.callPackage ./packages/xonsh.nix { }; - default = hello-world; - }; + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + packages = rec { + hello-world = pkgs.callPackage ./packages/hello-world.nix { }; + xonsh = pkgs.callPackage ./packages/xonsh.nix { }; + default = hello-world; + }; - overlays.default = final: prev: { - hello-world = final.callPackage ./packages/hello-world.nix { }; - xonsh = final.callPackage ./packages/xonsh.nix { }; - }; + overlays.default = final: prev: { + hello-world = final.callPackage ./packages/hello-world.nix { }; + xonsh = final.callPackage ./packages/xonsh.nix { }; + }; - devShells.${system}.default = pkgs.mkShell { - name = "oleks-hub-shell"; - buildInputs = [ self.packages.${system}.hello-world ]; - nativeBuildInputs = with pkgs; [ - nix - fmt - ]; - shellHook = '' - echo "Welcome to the oleks Flake hub development shell." - ''; - }; - }; + devShells.default = pkgs.mkShell { + name = "oleks-hub-shell"; + buildInputs = [ self.packages.${system}.default ]; + nativeBuildInputs = with pkgs; [ + nix + fmt + ]; + shellHook = '' + echo "Welcome to the oleks Flake hub development shell." + ''; + }; + } + ); }