diff --git a/flake.nix b/flake.nix index ecb27cd..1f33579 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,14 @@ }); } ) // { + overlays.default = + final: prev: { + linuxPackages_latest.xone = xonePatcher { + inherit (final) fetchFromGitHub; + inherit (final.linuxPackages_latest) xone; + }; + }; + nixosConfigurations = builtins.mapAttrs ( hostname: { system, config, modules }@machine: nixpkgs.lib.nixosSystem { @@ -143,14 +151,16 @@ { pkgs, ... }: { config = { _module.args = { - inherit xonePatcher; - machine = machine // { name = hostname; config = (pkgs.callPackage config { }); }; }; + nixpkgs.overlays = [ + self.overlays.default + ]; + home-manager.sharedModules = [ sops-nix.homeManagerModules.sops ]; diff --git a/lib/modules/xone.nix b/lib/modules/xone.nix index 46c1823..c07f59e 100644 --- a/lib/modules/xone.nix +++ b/lib/modules/xone.nix @@ -1,22 +1,9 @@ -{ lib, pkgs, xonePatcher, ... }: { +{ lib, ... }: { config = { nixpkgs = { config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "xow_dongle-firmware" ]; - - overlays = [ - (final: prev: { - linuxPackages = prev.linuxPackages.extend ( - final: prev: { - xone = xonePatcher { - inherit (pkgs) fetchFromGitHub; - inherit (prev) xone; - }; - } - ); - }) - ]; }; }; }