refactor: lib cleanup

This commit is contained in:
winston 2023-12-31 06:03:50 +01:00
parent 4ec35dcd2b
commit 6ffa18aa86
Signed by: winston
GPG key ID: 3786770EDBC2B481
2 changed files with 7 additions and 5 deletions

View file

@ -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

View file

@ -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";
};
};
}