refactor: KISS cleanup — deduplicate shared config, merge thin files

- Extract fonts, fish.enable, openssh.enable to modules/shared/
- Centralize sshKeys in lib/ via specialArgs
- Merge nixos/base.nix + locale.nix into nixos/default.nix
- Merge home/theme.nix into home/default.nix
- Simplify homeManagerConfig, flake packages output
- Remove redundant vim/wget from NixOS system packages
- Update AGENTS.md to reflect new structure
This commit is contained in:
2026-04-13 22:25:55 +08:00
parent d7e0aaf798
commit be247ff3b9
12 changed files with 121 additions and 134 deletions
+19 -10
View File
@@ -1,26 +1,35 @@
{ pkgs, username, ... }:
{
pkgs,
username,
sshKeys,
...
}:
{
imports = [
./base.nix
./docker.nix
./locale.nix
];
# ── Default shell ──────────────────────────────────
programs.fish.enable = true;
# ── System-essential packages ──────────────────────
environment.systemPackages = with pkgs; [
curl
git
ghostty.terminfo
];
# ── SSH ──────────────────────────────────────────
services.openssh.enable = true;
# ── Locale / Timezone ──────────────────────────────
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
};
time.timeZone = "Asia/Shanghai";
# ── Default user ───────────────────────────────────
users.users.${username} = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRTOo48gzzRGT+bF9dzJCFJu61YgsQVONFtxU9kTPIg"
];
openssh.authorizedKeys.keys = sshKeys;
};
# ── sudo ───────────────────────────────────────────