From 683e22d8dda1efd2db86ed4a30159bd99597daad Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 13 Sep 2024 13:15:21 +0000 Subject: chore(nix): use flake-utils for per-system --- README.md | 4 ++-- flake.lock | 21 +++++++++++++++++++++ flake.nix | 9 +++++++-- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 96d2fc6..1e97572 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ works well. rev = "..."; # Use the current commit revision hash hash = "..."; # Use the current commit sha256 hash } - )).${builtins.currentSystem}.homeManagerModules.default + )).homeManagerModules.${builtins.currentSystem}.default ]; } ``` @@ -53,7 +53,7 @@ module. inputs.home-manager.lib.homeManagerConfiguration { modules = [ - inputs.pywal-nix.${pkgs.system}.homeManagerModules.default + inputs.pywal-nix.homeManagerModules.${pkgs.system}.default ]; }; diff --git a/flake.lock b/flake.lock index 2ab446b..864f023 100644 --- a/flake.lock +++ b/flake.lock @@ -14,6 +14,26 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-utils": { + "inputs": { + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1726137256, @@ -32,6 +52,7 @@ "root": { "inputs": { "flake-compat": "flake-compat", + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "systems": "systems" } diff --git a/flake.nix b/flake.nix index 376ed22..bb84f65 100644 --- a/flake.nix +++ b/flake.nix @@ -3,15 +3,20 @@ nixpkgs.url = "github:NixOS/nixpkgs"; systems.url = "github:nix-systems/default"; flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; + + flake-utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; + }; }; outputs = { nixpkgs, - systems, + flake-utils, ... }: - (nixpkgs.lib.genAttrs (import systems)) (system: { + flake-utils.lib.eachDefaultSystem (system: { homeManagerModules.default = { config, ... }: let -- cgit v1.2.3