From a2ceaf2e2e4d2dc9179ce58d90a795033baf78c6 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 13 Jul 2024 10:44:39 -0400 Subject: [PATCH] Flake: Easier Overlay Spec --- flake.nix | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index e3f5a87..2c0f5bf 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,10 @@ overlays = import ./overlays/default.nix inputs; modules = import ./modules/default.nix inputs; + overlays' = l: ({ config, pkgs, ... }: { + nixpkgs.overlays = l; + }); + pkgs_linux-x86_64 = nixpkgs.legacyPackages."x86-linux"; pkgs_linux-aarch64 = nixpkgs.legacyPackages."aarch64-linux"; @@ -36,12 +40,10 @@ nixos = nixosSystem' { modules = [ - ({ config, pkgs, ... }: { - nixpkgs.overlays = [ - overlays.hydra - overlays.nvidiaContainer - ]; - }) + (overlays' [ + overlays.hydra + overlays.nvidiaContainer + ]) ./machines/hippocampus/configuration.nix modules.sops ]; @@ -49,9 +51,9 @@ universedesktop = nixosSystem' { modules = [ - ({ config, pkgs, ... }: { - nixpkgs.overlays = [ overlays.emacs ]; - }) + (overlays' [ + overlays.emacs + ]) ./machines/universedesktop/configuration.nix modules.sops ]; @@ -60,9 +62,9 @@ darwinConfigurations."UniverseAir" = darwinSystem' { modules = [ ./machines/universeair/configuration.nix - ({ config, pkgs, ... }: { - nixpkgs.overlays = [ overlays.emacs ]; - }) + (overlays' [ + overlays.emacs + ]) modules.home-manager-darwin ]; };