From 00cbc505f33b9e7471936ccdf1da0012c9f09508 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Tue, 1 Apr 2025 15:37:03 +0200 Subject: [PATCH] hosts: define hostPlatform in defined systems instead of getting them impurely from `builtins.currentSystem` --- hosts/main/default.nix | 2 ++ hosts/tablet.nix | 2 ++ hosts/vm-base.nix | 1 + outputs.nix | 1 + 4 files changed, 6 insertions(+) diff --git a/hosts/main/default.nix b/hosts/main/default.nix index 75d7df7..3b9807f 100644 --- a/hosts/main/default.nix +++ b/hosts/main/default.nix @@ -83,6 +83,8 @@ OLLAMA_HOST = "127.0.0.1:${builtins.toString config.services.ollama.port}"; }; + nixpkgs.hostPlatform = "x86_64-linux"; + system.stateVersion = "23.05"; }; } diff --git a/hosts/tablet.nix b/hosts/tablet.nix index 3ec9e20..7343cda 100644 --- a/hosts/tablet.nix +++ b/hosts/tablet.nix @@ -52,6 +52,8 @@ lidSwitchExternalPower = "lock"; }; + nixpkgs.hostPlatform = "x86_64-linux"; + system.stateVersion = "23.11"; }; } diff --git a/hosts/vm-base.nix b/hosts/vm-base.nix index 9c7a57a..8584fbd 100644 --- a/hosts/vm-base.nix +++ b/hosts/vm-base.nix @@ -20,5 +20,6 @@ virtualisation.forwardPorts = [ { from = "host"; host.port = 2222; guest.port = 22; } ]; + nixpkgs.hostPlatform = "x86_64-linux"; }; } diff --git a/outputs.nix b/outputs.nix index 76b8b85..48ad9b6 100644 --- a/outputs.nix +++ b/outputs.nix @@ -38,6 +38,7 @@ self = { nixosSystem = import "${inputs.nixpkgs}/nixos/lib/eval-config.nix"; mkNixosSystem = path: nixosSystem { inherit lib; + system = null; modules = [ path {