2023-06-15 01:40:55 +02:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
username,
|
|
|
|
isNixOS ? true,
|
|
|
|
}: rec {
|
2023-12-31 06:03:50 +01:00
|
|
|
inherit (pkgs.stdenv) isLinux isDarwin;
|
|
|
|
|
2023-06-15 01:40:55 +02:00
|
|
|
extraSpecialArgs = {
|
|
|
|
flakePath =
|
2023-12-31 06:03:50 +01:00
|
|
|
if isDarwin
|
2023-12-24 16:05:13 +01:00
|
|
|
then "/Users/${username}/.config/flake"
|
|
|
|
else "/home/${username}/.config/flake";
|
2023-09-20 18:45:58 +02:00
|
|
|
inherit inputs;
|
2023-06-15 01:40:55 +02:00
|
|
|
};
|
2023-12-31 06:03:50 +01:00
|
|
|
|
|
|
|
hmStandaloneConfig = {
|
2023-06-15 01:40:55 +02:00
|
|
|
home.homeDirectory =
|
2023-09-03 00:48:20 +02:00
|
|
|
if isLinux
|
2023-06-15 01:40:55 +02:00
|
|
|
then "/home/${username}"
|
2023-09-03 00:48:20 +02:00
|
|
|
else if isDarwin
|
2023-06-15 01:40:55 +02:00
|
|
|
then "/Users/${username}"
|
|
|
|
else throw "Unsupported system";
|
|
|
|
home.username = username;
|
2023-11-28 12:21:17 +01:00
|
|
|
isGraphical = false;
|
2023-09-03 00:48:20 +02:00
|
|
|
targets.genericLinux.enable = isLinux;
|
|
|
|
xdg.mime.enable = isLinux;
|
2023-06-15 01:40:55 +02:00
|
|
|
};
|
2023-12-31 06:03:50 +01:00
|
|
|
|
2023-06-15 01:40:55 +02:00
|
|
|
modules = with inputs;
|
|
|
|
[
|
|
|
|
nix-index-database.hmModules.nix-index
|
|
|
|
sops.homeManagerModules.sops
|
|
|
|
caarlos0-nur.homeManagerModules.default
|
|
|
|
nekowinston-nur.homeManagerModules.default
|
2023-06-15 14:30:19 +02:00
|
|
|
./.
|
2023-06-15 01:40:55 +02:00
|
|
|
]
|
|
|
|
++ pkgs.lib.optionals (!isNixOS) [hmStandaloneConfig];
|
|
|
|
}
|