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 = {
|
wrappers.neovim = {
|
||||||
enable = true;
|
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
|
# 1. Point to your existing Lua config directory
|
||||||
settings.config_directory = ./lua-config;
|
settings.config_directory = ./lua-config;
|
||||||
|
|
||||||
|
|||||||
@@ -3,17 +3,27 @@ let
|
|||||||
homeModules = config.flake.modules.homeManager;
|
homeModules = config.flake.modules.homeManager;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager."user-base" = {
|
flake.modules.homeManager."common-user-base" = {
|
||||||
imports = [
|
imports = [
|
||||||
homeModules.terminal
|
homeModules.terminal
|
||||||
homeModules.shell
|
homeModules.shell
|
||||||
homeModules.neovim
|
homeModules.neovim
|
||||||
homeModules."ssh-client"
|
|
||||||
homeModules."sops-admin"
|
|
||||||
homeModules.git
|
homeModules.git
|
||||||
homeModules."dev-tools"
|
homeModules."dev-tools"
|
||||||
homeModules.podman
|
homeModules.podman
|
||||||
homeModules.gemini
|
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);
|
primaryEmails = lib.filter (email: email.primary) (builtins.attrValues account.emails);
|
||||||
isWorkstation = config.meta.host.kind == "workstation";
|
isWorkstation = config.meta.host.kind == "workstation";
|
||||||
hasWorkstationModule = builtins.hasAttr workstationModuleName homeModules;
|
hasWorkstationModule = builtins.hasAttr workstationModuleName homeModules;
|
||||||
|
baseModuleName = if isWorkstation then "workstation-user-base" else "server-user-base";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
assertions = [
|
assertions = [
|
||||||
@@ -99,8 +100,10 @@ let
|
|||||||
|
|
||||||
home-manager.users.${name} = {
|
home-manager.users.${name} = {
|
||||||
imports = [
|
imports = [
|
||||||
|
homeModules.${baseModuleName}
|
||||||
homeModules.${userModuleName}
|
homeModules.${userModuleName}
|
||||||
]
|
]
|
||||||
|
++ extraHomeImports
|
||||||
++ lib.optionals (isWorkstation && hasWorkstationModule) [
|
++ lib.optionals (isWorkstation && hasWorkstationModule) [
|
||||||
homeModules.${workstationModuleName}
|
homeModules.${workstationModuleName}
|
||||||
];
|
];
|
||||||
@@ -122,11 +125,6 @@ let
|
|||||||
homeDirectory = account.homeDirectory;
|
homeDirectory = account.homeDirectory;
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
|
||||||
homeModules."user-base"
|
|
||||||
]
|
|
||||||
++ extraHomeImports;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user