refactor(nvf): move core nvf config to a module

This commit is contained in:
Mohammad Rafiq 2025-05-06 15:54:26 +08:00
parent 3e92ace989
commit 57a73bbcae
No known key found for this signature in database
5 changed files with 118 additions and 84 deletions

View file

@ -0,0 +1,29 @@
{
config,
lib,
inputs,
pkgs,
...
}:
let
username = config.nixosModules.mainUser;
in
{
config = lib.mkIf (config.hmModules.mainApps.editor == "nvf") (
lib.mkMerge [
{
nix.settings.substituters = [ "https://nvf.cachix.org" ];
nix.settings.trusted-public-keys = [
"nvf.cachix.org-1:GMQWiUhZ6ux9D5CvFFMwnc2nFrUHTeGaXRlVBXo+naI="
];
home-manager.users.${username} = {
imports = [
inputs.nvf.homeManagerModules.default
./nvf/core.nix
];
};
}
]
);
}