feat: implement profile system with mkHomeConfig and context constraints
- Add home/lib/default.nix with mkHomeConfig utility - Loads base + common modules always - Maps profiles (coding, gaming, media) to module imports - Enforces desktop/server mutual exclusion via assertion - Context must be 'desktop', 'server', or null - Migrate all per-host home configs to new profile system - m3-ares: context=desktop, profiles=[coding, gaming, media] - m3-kratos: context=desktop, profiles=[coding, gaming, media] - m3-atlas: context=server, profiles=[coding] - m3-helios: context=server, profiles=[] - m3-hermes: context=server, profiles=[] - m3-aether: context=server, profiles=[] - m3-daedalus: context=desktop, profiles=[coding, media] - Replace features.* options with new namespaces: - features.cli.* -> base.shell.* / base.cliTools.* / base.secrets - features.desktop.* -> desktop.wm.* / desktop.apps.* / desktop.theme.* - gaming/media moved to profiles.gaming.* / profiles.media.* - Fix home/coding/editor/neovim.nix: remove duplicate option declaration (coding.editors.neovim.enable already declared by m3ta-nixpkgs) - Fix home/coding/lsp/servers.nix: replace removed nodePackages.typescript-language-server with typescript-language-server - Fix home/desktop/theme/wallpapers.nix: correct relative path (was ../../.. which resolved to project root, should be ../..)
This commit is contained in:
@@ -1,17 +1,33 @@
|
||||
# m3-helios — AdGuard DNS and internal routing server.
|
||||
# Context: server | Profiles: (none)
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
homeLib = import ../lib { inherit lib; };
|
||||
in {
|
||||
imports = [
|
||||
../common
|
||||
../features/cli
|
||||
(homeLib.mkHomeConfig {
|
||||
profiles = [ ];
|
||||
context = "server";
|
||||
})
|
||||
./home-server.nix
|
||||
# Fish shell — no equivalent in new base module yet
|
||||
../features/cli/fish.nix
|
||||
];
|
||||
|
||||
features = {
|
||||
cli = {
|
||||
fish.enable = true;
|
||||
fzf.enable = true;
|
||||
nitch.enable = true;
|
||||
secrets.enable = false;
|
||||
# Base CLI tools (new namespace)
|
||||
base = {
|
||||
shell = {
|
||||
starship.enable = true;
|
||||
};
|
||||
cliTools = {
|
||||
fzf.enable = true;
|
||||
nitch.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Fish shell (legacy — no new equivalent yet)
|
||||
features.cli.fish.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user