From e4424f982ae2234c21d4c480aa570848b4b12580 Mon Sep 17 00:00:00 2001 From: winston Date: Sun, 3 Sep 2023 00:48:20 +0200 Subject: [PATCH] fix: isLinux checks for genericLinux/xdg.mime --- home/lib.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/home/lib.nix b/home/lib.nix index 494e98d..62a2ef6 100644 --- a/home/lib.nix +++ b/home/lib.nix @@ -10,16 +10,18 @@ then "/Users/${username}/.config/nixpkgs" else "/home/${username}/.config/nixpkgs"; }; - hmStandaloneConfig = { + hmStandaloneConfig = let + inherit (pkgs.stdenv) isLinux isDarwin; + in { home.homeDirectory = - if pkgs.stdenv.isLinux + if isLinux then "/home/${username}" - else if pkgs.stdenv.isDarwin + else if isDarwin then "/Users/${username}" else throw "Unsupported system"; home.username = username; - targets.genericLinux.enable = true; - xdg.mime.enable = true; + targets.genericLinux.enable = isLinux; + xdg.mime.enable = isLinux; }; modules = with inputs; [