From 2dfa6f1eb76a54c277ca842e8d6d660268ce6949 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 16 Dec 2023 12:50:45 +0200 Subject: [flake,autoconfig] Reworked how package inputs are handled --- autoconfig.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'autoconfig.nix') diff --git a/autoconfig.nix b/autoconfig.nix index 95ffcc1..ee8b108 100644 --- a/autoconfig.nix +++ b/autoconfig.nix @@ -16,14 +16,25 @@ in { (name: _: (lib.hasInfix "_" name) -> (lib.hasPrefix (sysidentity.type + "_") name)) (import ./packages)); + + inputs-overlays = + lib.mapAttrs + (_: nixpkgs: + nixpkgs.legacyPackages.${sysidentity.arch}) + (lib.filterAttrs + (name: _: + lib.hasPrefix "nixpkgs-" name) + inputs); in lib.nixosSystem { system = sysidentity.arch; modules = [ ./machines/${dir}/hardware-configuration.nix ./configuration.nix - ({ ... }: { networking.hostName = sysidentity.name; }) - # ({ ... }: { environment.systemPackages = [ inputs.nixpkgs-firefox119.legacyPackages.x86_64-linux.firefox ]; }) + ({ ... }: { + networking.hostName = sysidentity.name; + nixpkgs.overlays = [ (_: _: inputs-overlays) ]; + }) ] ++ (if lib.pathIsRegularFile ./machines/${dir}/configuration.nix then [ ./machines/${dir}/configuration.nix ] -- cgit v1.3.1-23-gd82d