diff --git a/common/packages.nix b/common/packages.nix index 0a048cc..d507b42 100644 --- a/common/packages.nix +++ b/common/packages.nix @@ -1,6 +1,8 @@ -{ pkgs, config, ... }: +{ lib, pkgs, config, ... }: { + # take overlays from flake + nixpkgs.overlays = lib.attrValues config.inputInjection.flake-inputs.self.overlays; # List packages installed in system profile. environment.systemPackages = with pkgs; [ wget diff --git a/flake.nix b/flake.nix index c19ddea..bcfb9b6 100644 --- a/flake.nix +++ b/flake.nix @@ -26,10 +26,10 @@ }; outputs = - { self, nixpkgs, nur, lanzaboote, flake-utils, home-manager, ... }@inputs: + { self, nixpkgs, nur, lanzaboote, utils, home-manager, ... }@inputs: let # FIXME: allow different systems - systems = flake-utils.lib.system; + systems = utils.lib.system; # necessary to make the top-level inputs available to system configuration # inspired by https://jade.fyi/blog/flakes-arent-real/ inputInjection = {pkgs, lib, ...}: { @@ -74,10 +74,24 @@ }; in { + overlays.default = import ./packages; nixosConfigurations = { thinknix = mkSystem systems.x86_64-linux [ ./hosts/thinknix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t440s lanzaboote.nixosModules.lanzaboote ]; framenix = mkSystem systems.x86_64-linux [ ./hosts/framenix inputs.nixos-hardware.nixosModules.framework-13-7040-amd lanzaboote.nixosModules.lanzaboote ]; }; homeConfigurations.spiollinux = mkHomeManager "spiollinux" "spiollinux" systems.x86_64-linux; - }; + } // utils.lib.eachDefaultSystem(system: + let + nixpkgs = import inputs.nixpkgs { + inherit system; + overlays = nixpkgs.lib.attrValues self.overlays; + }; + pkgs = inputs.nixpkgs.legacyPackages.${system}; + in { + devShells.default = pkgs.mkShell { + buildInputs = []; + }; + # expose nixpkgs with overlay; TODO: figure out role of config + #legacyPackages = nixpkgs; + }); } diff --git a/packages/default.nix b/packages/default.nix new file mode 100644 index 0000000..45a4a07 --- /dev/null +++ b/packages/default.nix @@ -0,0 +1,2 @@ +final: prev: { +}