refactor: migrate nix-darwin config to a flake-parts dendritic layout

This commit is contained in:
Poby 2026-03-26 09:03:35 +09:00
parent f80b0b0d4f
commit 09801ac429
No known key found for this signature in database
84 changed files with 1029 additions and 687 deletions

33
modules/aspects/base.nix Normal file
View file

@ -0,0 +1,33 @@
{lib, ...}: {
flake.modules.darwin.base = {config, ...}: {
time.timeZone = "Asia/Seoul";
networking = {
hostName = config.repo.host.name;
computerName = config.repo.host.name;
localHostName = config.repo.host.name;
};
users.users."${config.repo.user.name}" = {
home = config.repo.user.homeDirectory;
description = config.repo.user.name;
};
nix.settings.trusted-users = [config.repo.user.name];
system = {
primaryUser = config.repo.user.name;
stateVersion = config.repo.user.darwinStateVersion;
};
};
repo.homeModules.base = {config, ...}: {
home = {
username = lib.mkDefault config.repo.user.name;
homeDirectory = lib.mkDefault config.repo.user.homeDirectory;
stateVersion = lib.mkDefault config.repo.user.homeStateVersion;
};
programs.home-manager.enable = true;
};
}