From 6ffa18aa86b921a8d63f0a8b538c5f00cad65c1a Mon Sep 17 00:00:00 2001 From: winston Date: Sun, 31 Dec 2023 06:03:50 +0100 Subject: [PATCH] refactor: lib cleanup --- home/lib.nix | 10 ++++++---- machines/lib.nix | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/home/lib.nix b/home/lib.nix index 39b6bd4..5effada 100644 --- a/home/lib.nix +++ b/home/lib.nix @@ -4,16 +4,17 @@ username, isNixOS ? true, }: rec { + inherit (pkgs.stdenv) isLinux isDarwin; + extraSpecialArgs = { flakePath = - if pkgs.stdenv.isDarwin + if isDarwin then "/Users/${username}/.config/flake" else "/home/${username}/.config/flake"; inherit inputs; }; - hmStandaloneConfig = let - inherit (pkgs.stdenv) isLinux isDarwin; - in { + + hmStandaloneConfig = { home.homeDirectory = if isLinux then "/home/${username}" @@ -25,6 +26,7 @@ targets.genericLinux.enable = isLinux; xdg.mime.enable = isLinux; }; + modules = with inputs; [ nix-index-database.hmModules.nix-index diff --git a/machines/lib.nix b/machines/lib.nix index a341465..3eee568 100644 --- a/machines/lib.nix +++ b/machines/lib.nix @@ -65,7 +65,7 @@ isGraphical = lib.mkOption { type = lib.types.bool; default = isGraphical; - description = "Whether the system is a isGraphical target"; + description = "Whether the system is a graphical target"; }; }; }