nixpkgs (flake input): 2023-05-06 -> 2023-05-14
``` • Updated input 'nixpkgs-unpatched': 'github:nixos/nixpkgs/897876e4c484f1e8f92009fd11b7d988a121a4e7' (2023-05-06) → 'github:nixos/nixpkgs/0470f36b02ef01d4f43c641bbf07020bcab71bf1' (2023-05-14) ```
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -82,11 +82,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unpatched": {
|
"nixpkgs-unpatched": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683408522,
|
"lastModified": 1684049129,
|
||||||
"narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=",
|
"narHash": "sha256-7WB9LpnPNAS8oI7hMoHeKLNhRX7k3CI9uWBRSfmOCCE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7",
|
"rev": "0470f36b02ef01d4f43c641bbf07020bcab71bf1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
17
flake.nix
17
flake.nix
@@ -92,18 +92,10 @@
|
|||||||
nixpkgs = nixpkgs-unpatched;
|
nixpkgs = nixpkgs-unpatched;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgsCompiledBy = local: nixpkgs.legacyPackages."${local}";
|
nixpkgsCompiledBy = system: nixpkgs.legacyPackages."${system}";
|
||||||
|
|
||||||
evalHost = { name, local, target }:
|
evalHost = { name, local, target }: nixpkgs.lib.nixosSystem {
|
||||||
let
|
system = target;
|
||||||
# XXX: we'd prefer to use `nixosSystem = (nixpkgsCompiledBy target).nixos`
|
|
||||||
# but it doesn't propagate config to the underlying pkgs, meaning it doesn't let you use
|
|
||||||
# non-free packages even after setting nixpkgs.allowUnfree.
|
|
||||||
# XXX: patch using the target -- not local -- otherwise the target will
|
|
||||||
# need to emulate the host in order to rebuild!
|
|
||||||
nixosSystem = import ((nixpkgsCompiledBy target).path + "/nixos/lib/eval-config.nix");
|
|
||||||
in
|
|
||||||
(nixosSystem {
|
|
||||||
modules = [
|
modules = [
|
||||||
(import ./hosts/instantiate.nix { localSystem = local; hostName = name; })
|
(import ./hosts/instantiate.nix { localSystem = local; hostName = name; })
|
||||||
self.nixosModules.default
|
self.nixosModules.default
|
||||||
@@ -118,12 +110,13 @@
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
({ lib, ... }: {
|
({ lib, ... }: {
|
||||||
|
# TODO: does the earlier `system` arg to nixosSystem make its way here?
|
||||||
nixpkgs.hostPlatform.system = target;
|
nixpkgs.hostPlatform.system = target;
|
||||||
# nixpkgs.buildPlatform = local; # set by instantiate.nix instead
|
# nixpkgs.buildPlatform = local; # set by instantiate.nix instead
|
||||||
# nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
|
# nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
});
|
};
|
||||||
in {
|
in {
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
let
|
let
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
|
# user is expected to define this from their flake via `inputs.nixpkgs.follows = ...`
|
||||||
nixpkgs = {};
|
nixpkgs = {};
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs }@inputs:
|
outputs = { self, nixpkgs }@inputs:
|
||||||
@@ -16,6 +17,8 @@
|
|||||||
(patchedFlakeFor system).outputs { inherit self; };
|
(patchedFlakeFor system).outputs { inherit self; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
lib.nixosSystem = args: (patchedFlakeOutputsFor args.system).lib.nixosSystem args;
|
||||||
|
|
||||||
legacyPackages = builtins.mapAttrs
|
legacyPackages = builtins.mapAttrs
|
||||||
(system: _:
|
(system: _:
|
||||||
(patchedFlakeOutputsFor system).legacyPackages."${system}"
|
(patchedFlakeOutputsFor system).legacyPackages."${system}"
|
||||||
|
Reference in New Issue
Block a user