moved hm to home/

This commit is contained in:
ari committed 2024-08-10 22:32:57 -04:00
1 parent c56f06bbfb
commit afaacd003d
8 files changed
+127 -107

No files matched your search

+55
View File
@@ -0,0 +1,55 @@
{ stateVersion }:
let
makeCommonGitConfigs = (import ./git).makeCommonGitConfigs;
programsModule = (import ./programs);
servicesModule = (import ./services);
homeModule = {
stateVersion = stateVersion;
shellAliases = {
cat = "bat";
};
};
in
{
makeRootUser = { hostName }: { pkgs, ... }: {
home = homeModule;
programs = (programsModule { pkgs = pkgs; }) // {
git = (makeCommonGitConfigs {
userName = "root";
userEmail = "root@${hostName}";
extraGitConfigs = [ ];
});
};
services = servicesModule { pkgs = pkgs; };
};
makeCommonUser =
{ enableDevelopmentKit
, fullName
, email
, extraGitConfigs ? [ ]
, ...
}: { pkgs, ... }: {
home = homeModule // {
packages = with pkgs;
[ jq nixpkgs-fmt ipfetch nixd ]
++ (if enableDevelopmentKit then [
rye
devenv
uv
devbox
terraform
kubectl
] else
[ ]);
};
programs = (programsModule { pkgs = pkgs; }) // {
git = (makeCommonGitConfigs {
userName = fullName;
userEmail = email;
extraGitConfigs = extraGitConfigs;
});
};
services = servicesModule { pkgs = pkgs; };
};
}