feat: split hm user base by host type and remove nvim secret
This commit is contained in:
@@ -23,17 +23,9 @@
|
||||
})
|
||||
];
|
||||
|
||||
# Configure sops-nix secret
|
||||
sops.secrets.gemini-api-key-neovim = { };
|
||||
|
||||
wrappers.neovim = {
|
||||
enable = true;
|
||||
|
||||
# Inject the API key into the Neovim environment only
|
||||
env = {
|
||||
GEMINI_API_KEY = "$(cat ${config.sops.secrets.gemini-api-key-neovim.path})";
|
||||
};
|
||||
|
||||
# 1. Point to your existing Lua config directory
|
||||
settings.config_directory = ./lua-config;
|
||||
|
||||
|
||||
@@ -3,17 +3,27 @@ let
|
||||
homeModules = config.flake.modules.homeManager;
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager."user-base" = {
|
||||
flake.modules.homeManager."common-user-base" = {
|
||||
imports = [
|
||||
homeModules.terminal
|
||||
homeModules.shell
|
||||
homeModules.neovim
|
||||
homeModules."ssh-client"
|
||||
homeModules."sops-admin"
|
||||
homeModules.git
|
||||
homeModules."dev-tools"
|
||||
homeModules.podman
|
||||
homeModules.gemini
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager."server-user-base" = {
|
||||
imports = [ homeModules."common-user-base" ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager."workstation-user-base" = {
|
||||
imports = [
|
||||
homeModules."common-user-base"
|
||||
homeModules."ssh-client"
|
||||
homeModules."sops-admin"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
+3
-5
@@ -68,6 +68,7 @@ let
|
||||
primaryEmails = lib.filter (email: email.primary) (builtins.attrValues account.emails);
|
||||
isWorkstation = config.meta.host.kind == "workstation";
|
||||
hasWorkstationModule = builtins.hasAttr workstationModuleName homeModules;
|
||||
baseModuleName = if isWorkstation then "workstation-user-base" else "server-user-base";
|
||||
in
|
||||
{
|
||||
assertions = [
|
||||
@@ -99,8 +100,10 @@ let
|
||||
|
||||
home-manager.users.${name} = {
|
||||
imports = [
|
||||
homeModules.${baseModuleName}
|
||||
homeModules.${userModuleName}
|
||||
]
|
||||
++ extraHomeImports
|
||||
++ lib.optionals (isWorkstation && hasWorkstationModule) [
|
||||
homeModules.${workstationModuleName}
|
||||
];
|
||||
@@ -122,11 +125,6 @@ let
|
||||
homeDirectory = account.homeDirectory;
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
imports = [
|
||||
homeModules."user-base"
|
||||
]
|
||||
++ extraHomeImports;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user