diff --git a/flake.nix b/flake.nix index 151da23a..7e903620 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,9 @@ { description = "distinst patched for solarOS"; - inputs.solaros.url = "github:ssd-solar/solaros-nix/flake"; + inputs.solar.url = "github:ssd-solar/solaros-nix/flake"; - outputs = { self, nixpkgs, solaros }: { - defaultPackage = solaros.lib.forAllSystems({ pkgs, ... }: pkgs.callPackage ./package.nix { inherit nixpkgs; /* TODO: inherit from solar */ }); + outputs = { self, nixpkgs, solar }: { + defaultPackage = solar.lib.forAllSystems({ pkgs, ... }: pkgs.callPackage ./package.nix { nixpkgs = solar.lib.nixpkgs; }); }; } diff --git a/package.nix b/package.nix index e7a3df53..5e8e5747 100644 --- a/package.nix +++ b/package.nix @@ -22,6 +22,7 @@ , shellHookAppend ? "" # only used by shell.nix to add channels to NIX_PATH , nixDistinst ? nixFlakes , makeRustPlatform +, system }: let @@ -51,14 +52,20 @@ let }); tools = - with import "${path}/nixos" { configuration = { - nixpkgs.overlays = [ - (self: super: { - nix = nixPatched; - }) + with nixpkgs.lib.nixosSystem { + modules = [ + ({...}: { + nixpkgs.overlays = [ + (self: super: { + nix = nixPatched; + }) + ]; + + nix.package = nixPatched; + }) ]; - system = "x86-64_linux"; - }; }; + inherit system; + }; with config.system.build; # https://github.com/NixOS/nixpkgs/pull/87182/files?file-filters%5B%5D=.nix&file-filters%5B%5D=.sh&file-filters%5B%5D=.xml /* @@ -73,7 +80,7 @@ let sed 's|nix-build|nix build|g' -i $out/bin/nixos-install sed "s| '' -A system|-f '' system|g" -i $out/bin/nixos-install ''; - })) conf-tool /* nixos-enter manual.manpages */] ++ + })) conf-tool /* nixos-enter manual.manpages */ ] ++ [ (writeShellScriptBin "nixos-install-wrapped" (builtins.readFile ./install-wrapper.sh)) ]; in with rust; (makeRustPlatform packages.stable).buildRustPackage rec {