2023-06-15 01:40:55 +02:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
username,
|
|
|
|
isNixOS ? true,
|
|
|
|
}: rec {
|
|
|
|
extraSpecialArgs = {
|
|
|
|
flakePath =
|
|
|
|
if pkgs.stdenv.isDarwin
|
|
|
|
then "/Users/${username}/.config/nixpkgs"
|
|
|
|
else "/home/${username}/.config/nixpkgs";
|
2023-09-20 18:45:58 +02:00
|
|
|
inherit inputs;
|
2023-06-15 01:40:55 +02:00
|
|
|
};
|
2023-09-03 00:48:20 +02:00
|
|
|
hmStandaloneConfig = let
|
|
|
|
inherit (pkgs.stdenv) isLinux isDarwin;
|
|
|
|
in {
|
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-09-03 00:48:20 +02:00
|
|
|
targets.genericLinux.enable = isLinux;
|
|
|
|
xdg.mime.enable = isLinux;
|
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];
|
|
|
|
}
|