refactor: lib cleanup
This commit is contained in:
parent
4ec35dcd2b
commit
6ffa18aa86
2 changed files with 7 additions and 5 deletions
10
home/lib.nix
10
home/lib.nix
|
@ -4,16 +4,17 @@
|
||||||
username,
|
username,
|
||||||
isNixOS ? true,
|
isNixOS ? true,
|
||||||
}: rec {
|
}: rec {
|
||||||
|
inherit (pkgs.stdenv) isLinux isDarwin;
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
flakePath =
|
flakePath =
|
||||||
if pkgs.stdenv.isDarwin
|
if isDarwin
|
||||||
then "/Users/${username}/.config/flake"
|
then "/Users/${username}/.config/flake"
|
||||||
else "/home/${username}/.config/flake";
|
else "/home/${username}/.config/flake";
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
hmStandaloneConfig = let
|
|
||||||
inherit (pkgs.stdenv) isLinux isDarwin;
|
hmStandaloneConfig = {
|
||||||
in {
|
|
||||||
home.homeDirectory =
|
home.homeDirectory =
|
||||||
if isLinux
|
if isLinux
|
||||||
then "/home/${username}"
|
then "/home/${username}"
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
targets.genericLinux.enable = isLinux;
|
targets.genericLinux.enable = isLinux;
|
||||||
xdg.mime.enable = isLinux;
|
xdg.mime.enable = isLinux;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = with inputs;
|
modules = with inputs;
|
||||||
[
|
[
|
||||||
nix-index-database.hmModules.nix-index
|
nix-index-database.hmModules.nix-index
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
isGraphical = lib.mkOption {
|
isGraphical = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = isGraphical;
|
default = isGraphical;
|
||||||
description = "Whether the system is a isGraphical target";
|
description = "Whether the system is a graphical target";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue