Skip to content

Commit

Permalink
refactor: lib cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Dec 31, 2023
1 parent 4ec35dc commit 6ffa18a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions home/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -25,6 +26,7 @@
targets.genericLinux.enable = isLinux;
xdg.mime.enable = isLinux;
};

modules = with inputs;
[
nix-index-database.hmModules.nix-index
Expand Down
2 changes: 1 addition & 1 deletion machines/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
}
Expand Down

0 comments on commit 6ffa18a

Please sign in to comment.