From c75c17c3d01627863e0392b642d4d321b1806b15 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Sun, 21 Apr 2024 22:17:01 -0500 Subject: [PATCH] Converted to flake-parts --- flake.lock | 39 ++++++++++++++++++++++++++++++--------- flake.nix | 39 ++++++++++++++++++++++++--------------- 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 00ddd0f..3e4fb03 100644 --- a/flake.lock +++ b/flake.lock @@ -1,17 +1,20 @@ { "nodes": { - "flake-utils": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, @@ -31,9 +34,27 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1711703276, + "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "flake-utils": "flake-utils", + "flake-parts": "flake-parts", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 5ea9355..9f38b46 100644 --- a/flake.nix +++ b/flake.nix @@ -1,18 +1,27 @@ { - description = "A basic flake with a shell"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; + description = "Greg's homepage"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + }; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; - in { - devShells.default = pkgs.mkShell { - nativeBuildInputs = [ - pkgs.bashInteractive - pkgs.hugo - ]; - buildInputs = [ ]; - }; - }); + outputs = { self, nixpkgs, flake-parts }@inputs: + flake-parts.lib.mkFlake { inherit inputs; } { + flake = { + # Universal things + }; + systems = [ + "x86_64-linux" + "aarch64-linux" + ]; + perSystem = { config, pkgs, ... }: { + devShells.default = pkgs.mkShell { + nativeBuildInputs = [ + pkgs.bashInteractive + pkgs.hugo + ]; + buildInputs = [ ]; + }; + }; + }; }