From b1b7c4ff8dd65cb9589373bb4821d3eb263c25a0 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 c939b54..5705967 100644 --- a/nix/home-manager/flake.nix +++ b/nix/home-manager/flake.nix @@ -57,10 +57,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 c4917b7..99dab33 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 [];