remove deprecated system passing

fixes
'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'

Wherever possible, it's best to reference the hostPlatform of the
nixpkgs instance directly via `config`. This is only possible in NixOS
systems though, for standalon home-manager configs we need to get that
value through `pkgs.stdenv`.
This commit is contained in:
Trolli Schmittlauch 2025-12-29 02:25:50 +01:00
parent 411c7642ea
commit b0093ef58f
13 changed files with 12 additions and 23 deletions

View file

@ -1,7 +1,6 @@
{
config,
lib,
system,
...
}:
let
@ -56,7 +55,7 @@ in
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs system;
inherit inputs;
};
};

View file

@ -80,14 +80,11 @@
system: extraModules:
nixpkgs.lib.nixosSystem rec {
modules = (defaultModules system) ++ extraModules;
inherit system;
specialArgs = {
inherit system;
};
};
mkHomeManager =
confName: user: system: # unfortunately, home-manager configs are still system-specific
home-manager.lib.homeManagerConfiguration {
# XXX: when can we move to hostPlatform?
pkgs = import (mkNixpkgs-patched system) { inherit system; };
modules = [
{
@ -102,7 +99,7 @@
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs system;
inherit inputs;
};
};
treefmtConf =
@ -200,7 +197,7 @@
exit 0
fi
${
inputs.home-manager.packages.${pkgs.system}.home-manager
inputs.home-manager.packages.${system}.home-manager
}/bin/home-manager --flake "${self}#$profile" "$@"
''}/bin/hm";
};

View file

@ -2,7 +2,6 @@
pkgs,
inputs,
config,
system,
lib,
...
}:

View file

@ -2,7 +2,6 @@
pkgs,
inputs,
config,
system,
lib,
...
}:

View file

@ -3,7 +3,6 @@
lib,
inputs,
config,
system,
...
}:

View file

@ -2,7 +2,6 @@
pkgs,
inputs,
config,
system,
...
}:
{
@ -15,7 +14,7 @@
twemoji-color-font
open-sans
(iosevka-bin.override { variant = "CurlySlab"; })
inputs.nur.legacyPackages.${system}.repos.schmittlauch.vollkorn
inputs.nur.legacyPackages.${pkgs.stdenv.hostPlatform.system}.repos.schmittlauch.vollkorn
# TODO: humor-sans
# fcio corporate design, TODO module

View file

@ -2,7 +2,6 @@
pkgs,
inputs,
config,
system,
lib,
...
}:

View file

@ -3,7 +3,6 @@
lib,
inputs,
config,
system,
...
}:
let

View file

@ -2,15 +2,14 @@
pkgs,
inputs,
config,
system,
...
}:
with pkgs;
let
cfg = config.schmittlauch.packages;
unstable = inputs.nixos-unstable.legacyPackages.${system};
nur = inputs.nur.legacyPackages.${system};
unstable = inputs.nixos-unstable.legacyPackages.${stdenv.hostPlatform.system};
nur = inputs.nur.legacyPackages.${stdenv.hostPlatform.system};
graphicsApps = [
inkscape

View file

@ -3,7 +3,6 @@
lib,
inputs,
config,
system,
...
}:
{

View file

@ -2,14 +2,13 @@
pkgs,
inputs,
config,
system,
lib,
...
}:
with pkgs;
let
unstable = inputs.nixos-unstable.legacyPackages.${system};
unstable = inputs.nixos-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
imports = [ ./modules/llm.nix ];

View file

@ -2,11 +2,11 @@
config,
lib,
pkgs,
system,
...
}:
let
unstable = config.inputInjection.flake-inputs.nixos-unstable.legacyPackages.${system};
unstable =
config.inputInjection.flake-inputs.nixos-unstable.legacyPackages.${config.nixpkgs.hostPlatform};
in
{
imports = [

View file

@ -9,6 +9,8 @@
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"