fix(nix-monitored)!: put in nixVersions.monitored

Also fix `devShell`
  - did not correctly use the `monitored` version of `nix`
Also apply the overlays to the `pkgs` instance, used by `flake-parts`
This commit is contained in:
reo101 2024-06-01 16:07:36 +03:00
parent be2ad3ccfd
commit 1c809e1460
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
4 changed files with 44 additions and 33 deletions

View file

@ -52,6 +52,7 @@
nix-monitored = {
url = "github:ners/nix-monitored";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
@ -143,7 +144,13 @@
"x86_64-darwin"
];
perSystem = { pkgs, ... }: {
perSystem = { pkgs, lib, system, ... }: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = lib.attrValues outputs.overlays;
config = { };
};
# Packages (`nix build`)
packages = import ./pkgs { inherit pkgs; };

View file

@ -10,7 +10,7 @@
nix = {
# Ensure we can work with flakes
package = pkgs.nixVersions.latest-monitored;
package = pkgs.nixVersions.monitored.latest;
# extraOptions = ''
# # Enable flakes and new 'nix' command

View file

@ -35,7 +35,9 @@
nix-output-monitor = prev.nix-output-monitor;
};
nixVersions = prev.nixVersions // final.lib.flip final.lib.concatMapAttrs prev.nixVersions (version: package:
nixVersions = prev.nixVersions // {
monitored =
final.lib.flip final.lib.concatMapAttrs prev.nixVersions (version: package:
final.lib.optionalAttrs
(final.lib.and
(final.lib.all (prefix: ! final.lib.hasPrefix prefix version)
@ -59,12 +61,14 @@
])
(final.lib.isDerivation package))
{
"${version}-monitored" = inputs.nix-monitored.packages.${final.system}.default.override {
# NOTE: `lib.getBin` is needed, otherwise the `-dev` output is chosen
"${version}" = final.lib.getBin (inputs.nix-monitored.packages.${final.system}.default.override {
nix = package;
nix-output-monitor = prev.nix-output-monitor;
};
});
}
);
};
river = prev.river.overrideAttrs (oldAttrs: rec {
xwaylandSupport = true;

View file

@ -8,7 +8,7 @@
extra-experimental-features = nix-command flakes
'';
nativeBuildInputs = with pkgs; [
nix
nixVersions.monitored.latest
home-manager
git
wireguard-tools