Fix: Work around https://github.com/NixOS/nix/issues/12417: pin Nix package version to latest.

This commit is contained in:
Joey Hafner 2025-02-27 21:54:39 -08:00
parent 1f8901cb36
commit 40051dbb58
Signed by: Jafner
GPG Key ID: 6D9A24EF2F389E55
2 changed files with 36 additions and 9 deletions

View File

@ -53,6 +53,11 @@
overlays = [ nixgl.overlay ]; overlays = [ nixgl.overlay ];
config = { allowUnfreePredicate = (_: true); }; config = { allowUnfreePredicate = (_: true); };
}; };
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
overlays = [ nixgl.overlay ];
config = { allowUnfreePredicate = (_: true); };
};
in nixpkgs.lib.nixosSystem { in nixpkgs.lib.nixosSystem {
modules = [ modules = [
./systems/desktop/configuration.nix ./systems/desktop/configuration.nix
@ -64,7 +69,7 @@
inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
]; ];
home-manager.extraSpecialArgs = { inherit pkgs inputs sys; }; home-manager.extraSpecialArgs = { inherit pkgs pkgs-unstable inputs sys; };
} }
{ nix.settings.download-buffer-size = 1073741824; } { nix.settings.download-buffer-size = 1073741824; }
./modules/system.nix ./modules/system.nix
@ -94,7 +99,8 @@
./systems/desktop/clips.nix ./systems/desktop/clips.nix
]; ];
inherit system; inherit system;
specialArgs = { inherit pkgs inputs; specialArgs = {
inherit pkgs pkgs-unstable inputs;
sys = sys; sys = sys;
docker = { docker = {
username = sys.username; username = sys.username;
@ -148,6 +154,10 @@
inherit system; inherit system;
config = { allowUnfreePredicate = (_: true); }; config = { allowUnfreePredicate = (_: true); };
}; };
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config = { allowUnfreePredicate = (_: true); };
};
in nixpkgs.lib.nixosSystem { in nixpkgs.lib.nixosSystem {
modules = [ modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
@ -155,8 +165,9 @@
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
./modules/system.nix ./modules/system.nix
]; ];
inherit system pkgs; inherit system;
specialArgs = { inherit pkgs inputs; specialArgs = {
inherit pkgs pkgs-unstable inputs;
sys = sys; sys = sys;
}; };
}; };
@ -176,14 +187,19 @@
inherit system; inherit system;
config = { allowUnfreePredicate = (_: true); }; config = { allowUnfreePredicate = (_: true); };
}; };
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config = { allowUnfreePredicate = (_: true); };
};
in nixpkgs.lib.nixosSystem { in nixpkgs.lib.nixosSystem {
modules = [ modules = [
"${nixpkgs}/nixos/modules/virtualisation/digital-ocean-image.nix" "${nixpkgs}/nixos/modules/virtualisation/digital-ocean-image.nix"
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
./modules/system.nix ./modules/system.nix
]; ];
inherit system pkgs; inherit system;
specialArgs = { specialArgs = {
inherit pkgs pkgs-unstable inputs;
sys = sys; sys = sys;
}; };
}; };
@ -200,6 +216,10 @@
inherit system; inherit system;
config = { allowUnfreePredicate = (_: true); }; config = { allowUnfreePredicate = (_: true); };
}; };
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config = { allowUnfreePredicate = (_: true); };
};
in nixpkgs.lib.nixosSystem { in nixpkgs.lib.nixosSystem {
modules = [ modules = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
@ -212,8 +232,9 @@
./modules/docker.nix ./modules/docker.nix
./systems/artificer/stacks.nix ./systems/artificer/stacks.nix
]; ];
inherit system pkgs; inherit system;
specialArgs = { inherit inputs pkgs; specialArgs = {
inherit inputs pkgs pkgs-unstable;
sys = sys; sys = sys;
git = { git = {
username = sys.username; username = sys.username;
@ -251,6 +272,10 @@
inherit system; inherit system;
config = { allowUnfreePredicate = (_: true); allowUnfree = true; }; config = { allowUnfreePredicate = (_: true); allowUnfree = true; };
}; };
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config = { allowUnfreePredicate = (_: true); };
};
in nixpkgs.lib.nixosSystem { in nixpkgs.lib.nixosSystem {
modules = [ modules = [
./systems/fighter/hardware.nix ./systems/fighter/hardware.nix
@ -267,8 +292,9 @@
./modules/smb.nix ./modules/smb.nix
./modules/iscsi.nix ./modules/iscsi.nix
]; ];
inherit system pkgs; inherit system;
specialArgs = { specialArgs = {
inherit inputs pkgs pkgs-unstable;
sys = sys; sys = sys;
networking = { networking = {
hostname = sys.hostname; hostname = sys.hostname;

View File

@ -1,4 +1,4 @@
{ sys, pkgs, ... }: { { sys, pkgs, pkgs-unstable, ... }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
@ -51,6 +51,7 @@
LC_TIME = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
}; };
nix.package = pkgs-unstable.nixVersions.latest;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "24.11"; system.stateVersion = "24.11";