From 686a2f39e145ced2d72493e92d14ab3fd379f2ea Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Thu, 27 Oct 2022 21:05:33 +0200 Subject: [PATCH] Use the correct filter for systems --- darwin/brew.nix | 2 +- home/common-linux.nix | 2 +- modules/personal/fonts/default.nix | 4 ++-- modules/personal/u2f.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/darwin/brew.nix b/darwin/brew.nix index a47aa48..7245cb1 100644 --- a/darwin/brew.nix +++ b/darwin/brew.nix @@ -4,7 +4,7 @@ with lib; { homebrew.enable = true; homebrew.brewPrefix = - if pkgs.system == "aarch64-darwin" then "/opt/homebrew/bin" + if pkgs.stdenv.isAarch64 then "/opt/homebrew/bin" else "/usr/local/bin"; homebrew.onActivation.cleanup = "zap"; homebrew.onActivation.upgrade = true; diff --git a/home/common-linux.nix b/home/common-linux.nix index a530e5d..35a0a1d 100644 --- a/home/common-linux.nix +++ b/home/common-linux.nix @@ -4,7 +4,7 @@ with lib; { ./modules/linux/graphical ./modules/X11/xfce4-notifyd.nix ]; - config = (mkIf (strings.hasSuffix "linux" pkgs.system) { + config = (mkIf pkgs.stdenv.isLinux { home.packages = with pkgs; [ psmisc # killall and friends diff --git a/modules/personal/fonts/default.nix b/modules/personal/fonts/default.nix index 82ef59b..a105084 100644 --- a/modules/personal/fonts/default.nix +++ b/modules/personal/fonts/default.nix @@ -12,7 +12,7 @@ with lib; noto-fonts-cjk merriweather ]; - } // (if (strings.hasSuffix "linux" pkgs.system) then { + } // (if pkgs.stdenv.isLinux then { enableDefaultFonts = false; fontconfig = { defaultFonts = { @@ -23,7 +23,7 @@ with lib; }; }; fontDir.enable = true; - } else { }) // (if (strings.hasSuffix "darwin" pkgs.system) then { + } else { }) // (if pkgs.stdenv.isDarwin then { fontDir.enable = true; } else { }); } diff --git a/modules/personal/u2f.nix b/modules/personal/u2f.nix index 74336d1..1b9d4b6 100644 --- a/modules/personal/u2f.nix +++ b/modules/personal/u2f.nix @@ -13,7 +13,7 @@ in environment.systemPackages = with pkgs; [ pam_u2f # for pamu2fcfg ]; - security.pam = mkIf (strings.hasSuffix "linux" pkgs.system) { + security.pam = mkIf pkgs.stdenv.isLinux { u2f = { enable = true; cue = true;