From b6149f678eea33ce233b4f53de26ef8c3e3feea2 Mon Sep 17 00:00:00 2001 From: Isabella Bastaja Date: Fri, 27 Mar 2026 12:13:00 +0100 Subject: switch to using flake-parts --- flake.lock | 54 +++++++++++++++++++++++++++--------------------------- flake.nix | 48 +++++++++++++++++++++++++++--------------------- 2 files changed, 54 insertions(+), 48 deletions(-) diff --git a/flake.lock b/flake.lock index a8ff143..9baed35 100644 --- a/flake.lock +++ b/flake.lock @@ -21,22 +21,22 @@ "type": "github" } }, - "futils": { + "flake-parts": { "inputs": { - "systems": "systems" + "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1722472559, - "narHash": "sha256-HqzEdURUwgCNDpopDC38NbChC0cOyj1L47EP+1aco8k=", - "ref": "refs/heads/main", - "rev": "aaa51589dd772073c6eb48d6b7bd51dc8be3b455", - "revCount": 4, - "type": "git", - "url": "https://git.sorre.xyz/isabella/futils" + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", + "type": "github" }, "original": { - "type": "git", - "url": "https://git.sorre.xyz/isabella/futils" + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" } }, "nixpkgs": { @@ -55,6 +55,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1772328832, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1773964973, @@ -74,26 +89,11 @@ "root": { "inputs": { "emacs-overlay": "emacs-overlay", - "futils": "futils", + "flake-parts": "flake-parts", "nixpkgs": "nixpkgs", "wrapper-manager": "wrapper-manager" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "wrapper-manager": { "locked": { "lastModified": 1772780728, diff --git a/flake.nix b/flake.nix index 03914ad..cdd1001 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - futils.url = "git+https://git.sorre.xyz/isabella/futils"; + flake-parts.url = "github:hercules-ci/flake-parts"; wrapper-manager.url = "github:viperML/wrapper-manager"; emacs-overlay = { url = "github:nix-community/emacs-overlay"; @@ -12,27 +12,33 @@ }; outputs = - { - self, - nixpkgs, - futils, - emacs-overlay, - wrapper-manager, - }: - futils.lib.eachSystem ( - system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ emacs-overlay.overlays.default ]; - }; - in + inputs@{ flake-parts, wrapper-manager, ... }: + flake-parts.lib.mkFlake { inherit inputs; } ( + { config, ... }: { - legacyPackages = import ./default.nix { - # inherit self pkgs wrapper-manager system; - inherit pkgs wrapper-manager; - }; - packages = nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system}; + systems = [ "x86_64-linux" ]; + perSystem = + { + self', + pkgs, + config, + system, + ... + }: + { + _module.args.pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + inputs.emacs-overlay.overlays.default + ]; + }; + + legacyPackages = import ./default.nix { + inherit pkgs wrapper-manager; + }; + + packages = pkgs.lib.filterAttrs (_: v: pkgs.lib.isDerivation v) self'.legacyPackages; + }; } ); } -- cgit v1.3.1