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, config,
lib, lib,
system,
... ...
}: }:
let let
@ -56,7 +55,7 @@ in
# Optionally use extraSpecialArgs # Optionally use extraSpecialArgs
# to pass through arguments to home.nix # to pass through arguments to home.nix
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs system; inherit inputs;
}; };
}; };

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
inputs, inputs,
config, config,
system,
... ...
}: }:
{ {
@ -15,7 +14,7 @@
twemoji-color-font twemoji-color-font
open-sans open-sans
(iosevka-bin.override { variant = "CurlySlab"; }) (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 # TODO: humor-sans
# fcio corporate design, TODO module # fcio corporate design, TODO module

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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