From 7cba098b07f9b0096a625403a0af0316bd509ef8 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 24 Aug 2026 00:33:22 +0800 Subject: [PATCH] fix(home): replace deprecated stdenv.is* with hostPlatform.is* --- home/base/core/editors/neovim/default.nix | 2 +- home/base/gui/terminal/foot.nix | 2 +- home/base/gui/terminal/ghostty.nix | 2 +- home/linux/gui/base/browsers.nix | 2 +- home/linux/gui/base/creative.nix | 4 ++-- home/linux/gui/base/noctalia/default.nix | 2 +- home/linux/gui/base/note-taking.nix | 2 +- home/linux/gui/base/xdg/autostart.nix | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/home/base/core/editors/neovim/default.nix b/home/base/core/editors/neovim/default.nix index c64c334e..a43afbcc 100644 --- a/home/base/core/editors/neovim/default.nix +++ b/home/base/core/editors/neovim/default.nix @@ -20,7 +20,7 @@ # which is broken (patch fails to apply) on the current nixpkgs pin enable = false; - clipboard.providers.wl-copy.enable = pkgs.stdenv.isLinux; + clipboard.providers.wl-copy.enable = pkgs.stdenv.hostPlatform.isLinux; opts = { number = true; diff --git a/home/base/gui/terminal/foot.nix b/home/base/gui/terminal/foot.nix index 911ae57d..ac4a9f30 100644 --- a/home/base/gui/terminal/foot.nix +++ b/home/base/gui/terminal/foot.nix @@ -2,7 +2,7 @@ { programs.foot = { # foot is designed only for Linux - enable = pkgs.stdenv.isLinux; + enable = pkgs.stdenv.hostPlatform.isLinux; # foot can also be run in a server mode. In this mode, one process hosts multiple windows. # All Wayland communication, VT parsing and rendering is done in the server process. diff --git a/home/base/gui/terminal/ghostty.nix b/home/base/gui/terminal/ghostty.nix index 2074d0de..0c34c01e 100644 --- a/home/base/gui/terminal/ghostty.nix +++ b/home/base/gui/terminal/ghostty.nix @@ -11,7 +11,7 @@ programs.ghostty = { enable = true; package = - if pkgs.stdenv.isDarwin then + if pkgs.stdenv.hostPlatform.isDarwin then null # installed via Homebrew cask on darwin else pkgs.ghostty; diff --git a/home/linux/gui/base/browsers.nix b/home/linux/gui/base/browsers.nix index 3aa19309..a12e5a8a 100644 --- a/home/linux/gui/base/browsers.nix +++ b/home/linux/gui/base/browsers.nix @@ -10,6 +10,6 @@ # source code: https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix programs.google-chrome = { enable = true; - package = if pkgs.stdenv.isAarch64 then pkgs.chromium else pkgs.google-chrome; + package = if pkgs.stdenv.hostPlatform.isAarch64 then pkgs.chromium else pkgs.google-chrome; }; } diff --git a/home/linux/gui/base/creative.nix b/home/linux/gui/base/creative.nix index d75ad4c7..f71c7d46 100644 --- a/home/linux/gui/base/creative.nix +++ b/home/linux/gui/base/creative.nix @@ -49,7 +49,7 @@ in hunspellDicts.en_US # USA English hyphenDicts.en_GB # British English ] - ++ (lib.optionals pkgs.stdenv.isx86_64 [ + ++ (lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ ldtk # A modern, versatile 2D level editor # fpga @@ -63,7 +63,7 @@ in programs = { # live streaming obs-studio = { - enable = pkgs.stdenv.isx86_64; + enable = pkgs.stdenv.hostPlatform.isx86_64; plugins = with pkgs.obs-studio-plugins; [ # screen capture wlrobs diff --git a/home/linux/gui/base/noctalia/default.nix b/home/linux/gui/base/noctalia/default.nix index 8c3ab5f0..5307659d 100644 --- a/home/linux/gui/base/noctalia/default.nix +++ b/home/linux/gui/base/noctalia/default.nix @@ -23,7 +23,7 @@ in pkgs.qt6Packages.qt6ct # for icon theme pkgs.app2unit # Launch Desktop Entries (or arbitrary commands) as Systemd user units ] - ++ (lib.optionals pkgs.stdenv.isx86_64 [ + ++ (lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ pkgs.gpu-screen-recorder # recoding screen ]); diff --git a/home/linux/gui/base/note-taking.nix b/home/linux/gui/base/note-taking.nix index 38567243..33abdb8f 100644 --- a/home/linux/gui/base/note-taking.nix +++ b/home/linux/gui/base/note-taking.nix @@ -2,7 +2,7 @@ { home.packages = with pkgs; - (lib.optionals pkgs.stdenv.isx86_64 [ + (lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ # https://joplinapp.org/help/ joplin # joplin-cli # joplin-desktop diff --git a/home/linux/gui/base/xdg/autostart.nix b/home/linux/gui/base/xdg/autostart.nix index 85fc90cb..04e66255 100644 --- a/home/linux/gui/base/xdg/autostart.nix +++ b/home/linux/gui/base/xdg/autostart.nix @@ -24,7 +24,7 @@ "${pkgs.nixpaks.telegram-desktop}/share/applications/org.telegram.desktop.desktop" ] ++ ( - if pkgs.stdenv.isx86_64 then + if pkgs.stdenv.hostPlatform.isx86_64 then [ "${pkgs.google-chrome}/share/applications/google-chrome.desktop" ] else [ "${pkgs.chromium}/share/applications/chromium-browser.desktop" ]