From c53377a5046f70493ac268aedb5824add94c4ba1 Mon Sep 17 00:00:00 2001 From: atagen Date: Thu, 29 Jan 2026 16:20:21 +1100 Subject: [PATCH] satisfy nixpkgs pedantry --- flake.nix | 54 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index c25e88d..943e1b3 100644 --- a/flake.nix +++ b/flake.nix @@ -12,36 +12,44 @@ }: let forAllSystems = - func: nixpkgs.lib.genAttrs (import systems) (system: func (import nixpkgs { inherit system; })); + func: + nixpkgs.lib.genAttrs (import systems) (system: func (import nixpkgs { inherit system; }) system); in { - devShells = forAllSystems (pkgs: { - default = pkgs.mkShell { - packages = with pkgs; [ - cargo - rustc - rust-analyzer - rustfmt - clippy - ]; - }; - }); - packages = forAllSystems (pkgs: { - default = self.packages.${pkgs.system}.yoke; - yoke = pkgs.rustPlatform.callPackage ./nix/package.nix { - features = [ - "cli" - ]; - }; - yoke-lite = pkgs.rustPlatform.callPackage ./nix/package.nix { }; - }); + devShells = forAllSystems ( + pkgs: sys: { + default = pkgs.mkShell { + packages = with pkgs; [ + cargo + rustc + rust-analyzer + rustfmt + clippy + ]; + }; + } + ); + packages = forAllSystems ( + pkgs: sys: { + default = self.packages.${pkgs.system}.yoke; + yoke = pkgs.rustPlatform.callPackage ./nix/package.nix { + features = [ + "cli" + ]; + }; + yoke-lite = pkgs.rustPlatform.callPackage ./nix/package.nix { }; + } + ); nixosModules.default = { pkgs, lib, ... }: + let + sys = pkgs.stdenv.hostPlatform.system; + in { config = { imports = [ ./nix/module.nix ]; - wrapperPkg = self.packages.${pkgs.system}.yoke-lite; - environment.systemPackages = [ self.packages.${pkgs.system}.yoke ]; + wrapperPkg = self.packages.${sys}.yoke-lite; + environment.systemPackages = [ self.packages.${sys}.yoke ]; }; }; };