From 4d95632c7c372ffb2133e98f9783b397b6aff422 Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Mon, 21 Aug 2023 09:39:38 -0400 Subject: [PATCH] use pkgs.stdenv.hostPlatform --- nix/home-manager/flake.nix | 4 ---- nix/home-manager/home.nix | 7 ++++--- nix/home-manager/modules/packages/default.nix | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/nix/home-manager/flake.nix b/nix/home-manager/flake.nix index de47144..94c4936 100644 --- a/nix/home-manager/flake.nix +++ b/nix/home-manager/flake.nix @@ -61,10 +61,6 @@ nix-index-database.hmModules.nix-index ./home.nix ]; - - extraSpecialArgs = { - system = system; - }; } ); in { diff --git a/nix/home-manager/home.nix b/nix/home-manager/home.nix index 1d1fbdc..2cf377a 100644 --- a/nix/home-manager/home.nix +++ b/nix/home-manager/home.nix @@ -1,15 +1,16 @@ { config, pkgs, - system, ... -}: { +}: let + inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; +in { # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "acicchetti"; home.homeDirectory = - if "${system}" == "aarch64-darwin" + if isDarwin then "/Users/acicchetti" else "/home/acicchetti"; diff --git a/nix/home-manager/modules/packages/default.nix b/nix/home-manager/modules/packages/default.nix index 0073cb9..fa401e2 100644 --- a/nix/home-manager/modules/packages/default.nix +++ b/nix/home-manager/modules/packages/default.nix @@ -2,11 +2,11 @@ pkgs, lib, config, - system, ... }: let + inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; systemSpecificPackages = - if "${system}" != "aarch64-darwin" + if isLinux # include gping because of open bug then [pkgs.zsh pkgs.racket pkgs.gping pkgs.mold] else [];