diff --git a/hosts/algiz/services.nix b/hosts/algiz/services.nix index 651ce2d..10683b6 100644 --- a/hosts/algiz/services.nix +++ b/hosts/algiz/services.nix @@ -25,13 +25,13 @@ in }; security.polkit = enabled; # attic was looking for this... - environment.systemPackages = [ pkgs.attic-client ]; + environment.systemPackages = [ (flake.pkgs "self").attic-client ]; # allow docker to forward the request to the host running attic # https://discourse.nixos.org/t/docker-container-not-resolving-to-host/30259/6 # networking.firewall.extraCommands = "iptables -A INPUT -p tcp --destination-port ${atticPort} -s 172.16.0.0/12 -j ACCEPT"; services.atticd = enabled // { - package = (flake.pkgs "lix-attic").attic-server; + package = (flake.pkgs "self").attic-server; # Replace with absolute path to your credentials file # TODO: replace with sops-secret! diff --git a/hosts/othalan/default.nix b/hosts/othalan/default.nix index 3fd7f53..2db0da0 100644 --- a/hosts/othalan/default.nix +++ b/hosts/othalan/default.nix @@ -29,7 +29,7 @@ }; environment.systemPackages = [ - (flake.pkgs "lix-attic").attic-client + (flake.pkgs "self").attic-client ]; } diff --git a/lib/default.nix b/lib/default.nix index 28e12fb..bc170e6 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -67,7 +67,7 @@ let iso = mkIso.config.system.build.isoImage; # nimlangserver = pkgs.callPackage ../pkgs/nim/nimlangserver { }; } - // (import ../pkgs { inherit pkgs lib; }) + // (import ../pkgs { inherit pkgs lib inputs; }) ); devShells = forAllSystems (pkgs: { diff --git a/lib/generators.nix b/lib/generators.nix index af5ff1a..ba6e2a6 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -49,6 +49,22 @@ let ] ++ (selfModules ''oizys'') ++ (nixosModules ''lix-module|sops-nix'') + ++ [ + ( + { ... }: + { + nixpkgs.overlays = [ + (final: prev: { + # override what the lix-module set + # make sure attic is using this lix + nix = inputs.self.${final.system}.lix; + }) + + ]; + } + ) + + ] ++ (hostFiles hostName); specialArgs = commonSpecialArgs // { diff --git a/overlays/default.nix b/overlays/default.nix index 4584c73..7fe0ea4 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -4,6 +4,11 @@ inputs.nim2nix.overlays.default # adds buildNimPackage (final: prev: { + + # make sure attic is using this lix + nix = inputs.self.packages.${final.system}.lix; + + stable = import inputs.stable { system = final.system; config.allowUnfree = true; diff --git a/pkgs/default.nix b/pkgs/default.nix index 21a71a6..ab19802 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,6 +6,15 @@ let inherit (lib) flakeFromSystem; flake = flakeFromSystem pkgs.system; + lix = pkgs.callPackage ./lix { inherit flake; }; + + # make attic also use the "no check lix" + atticPackages = pkg: { + "${pkg}" = (flake.pkgs "lix-attic").${pkg}.overrideAttrs (oldAttrs: { + buildInputs = oldAttrs.buildInputs ++ [ lix ]; + }); + }; + in { nimlangserver = pkgs.callPackage ./nim/nimlangserver { }; @@ -16,10 +25,10 @@ in llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins { }; - attic-client = (flake.pkgs "lix-attic").attic-client; - attic-server = (flake.pkgs "lix-attic").attic-server; - lix = pkgs.callPackage ./lix { inherit flake; }; + lix = lix; } +// (atticPackages "attic-client") +// (atticPackages "attic-server") // (flake.toPackageAttrs [ "pixi" "f1multiviewer"