mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-07 04:14:07 +09:00
mac
This commit is contained in:
@@ -19,7 +19,7 @@ makes any statement here stale, update `AGENTS.md` in the same change.
|
|||||||
| `modules/hardwares/` | Reusable drivers, hardware families, and VM or WSL guest configuration |
|
| `modules/hardwares/` | Reusable drivers, hardware families, and VM or WSL guest configuration |
|
||||||
| `modules/users/` | User identity and the user's NixOS-, nix-darwin-, and Home Manager-specific definitions |
|
| `modules/users/` | User identity and the user's NixOS-, nix-darwin-, and Home Manager-specific definitions |
|
||||||
| `modules/profiles/` | Purpose- or form-factor-oriented compositions of multiple units |
|
| `modules/profiles/` | Purpose- or form-factor-oriented compositions of multiple units |
|
||||||
| `hosts/` | Machine-specific facts and the profiles or applications selected for each machine |
|
| `hosts/` | Machine-specific facts and the profiles selected for each machine; direct unit selections are exceptional |
|
||||||
| `libs/` | Registry, unit discovery, and host construction logic |
|
| `libs/` | Registry, unit discovery, and host construction logic |
|
||||||
| `overlays/` | Package replacements and additions |
|
| `overlays/` | Package replacements and additions |
|
||||||
| `shells/` | Development shells |
|
| `shells/` | Development shells |
|
||||||
@@ -468,7 +468,9 @@ host-owned data includes:
|
|||||||
- Kernel parameters required by one machine only.
|
- Kernel parameters required by one machine only.
|
||||||
- `system.stateVersion`.
|
- `system.stateVersion`.
|
||||||
- Host-specific secret references.
|
- Host-specific secret references.
|
||||||
- The profiles, applications, and other units enabled on that host.
|
- The profiles enabled on that host and, only in exceptional cases, direct
|
||||||
|
application or other unit selections that cannot be expressed by a coherent
|
||||||
|
reusable profile.
|
||||||
|
|
||||||
A host registry may use a specification like this:
|
A host registry may use a specification like this:
|
||||||
|
|
||||||
@@ -515,8 +517,9 @@ workload. m2 is the daily-use macOS development and personal machine. Keep the
|
|||||||
desktop sessions independently selectable, and keep m2's development and
|
desktop sessions independently selectable, and keep m2's development and
|
||||||
personal profiles usable on Darwin.
|
personal profiles usable on Darwin.
|
||||||
|
|
||||||
Treat entries in `profiles` and `applications` as IDs relative to their
|
Treat entries in `profiles` and the exceptional `applications` field as IDs
|
||||||
respective category roots. Add the category prefixes during host construction:
|
relative to their respective category roots. Add the category prefixes during
|
||||||
|
host construction:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
selectedUnits =
|
selectedUnits =
|
||||||
@@ -526,13 +529,16 @@ selectedUnits =
|
|||||||
++ spec.units or [ ];
|
++ spec.units or [ ];
|
||||||
```
|
```
|
||||||
|
|
||||||
`units` is an escape hatch for fully qualified service, system, hardware, or
|
`applications` and `units` are escape hatches, not normal host composition.
|
||||||
other unit IDs. Do not use it when an existing profile expresses the concern or
|
Do not add either field when an existing profile expresses the concern, when an
|
||||||
when the concern is reusable enough to deserve a small profile. For example,
|
existing profile can coherently include the unit, or when the concern is
|
||||||
select `security.fingerprint`; do not write
|
reusable enough to deserve a small profile. For example, add a development tool
|
||||||
`units = [ "systems.fingerprint" ];`. Prefer profiles for the main composition
|
to `workload.development` and select `security.fingerprint`; do not write
|
||||||
and keep `units` empty unless a genuinely exceptional low-level selection is
|
`applications = [ "ghostty" ];` or `units = [ "systems.fingerprint" ];` in a
|
||||||
required.
|
host. A direct selection is permitted only for a genuinely exceptional,
|
||||||
|
machine-specific unit that would make every reasonable profile misleading; add
|
||||||
|
an adjacent comment explaining that exception. Prefer profiles for host
|
||||||
|
composition and omit both escape-hatch fields by default.
|
||||||
|
|
||||||
Host modules use normal Nix module semantics and are not Registry-guarded
|
Host modules use normal Nix module semantics and are not Registry-guarded
|
||||||
configuration fragments. For example:
|
configuration fragments. For example:
|
||||||
@@ -596,8 +602,10 @@ When implementing or modifying modules:
|
|||||||
profile.
|
profile.
|
||||||
- Keep `modules/profiles/README.md`, the profile directories, and host profile
|
- Keep `modules/profiles/README.md`, the profile directories, and host profile
|
||||||
selections synchronized whenever any of them changes.
|
selections synchronized whenever any of them changes.
|
||||||
- Prefer an existing or newly justified profile over a host-level `units` entry
|
- Do not select applications or units directly in `hosts/default.nix` unless
|
||||||
for reusable concerns such as fingerprint authentication.
|
they meet the documented exceptional, machine-specific escape-hatch rule.
|
||||||
|
Prefer adding the unit to an existing coherent profile or creating a small,
|
||||||
|
justified reusable profile.
|
||||||
- Do not rely on module-list ordering to override values. Use Nix module
|
- Do not rely on module-list ordering to override values. Use Nix module
|
||||||
priorities such as `lib.mkDefault`, `lib.mkForce`, `lib.mkBefore`, or
|
priorities such as `lib.mkDefault`, `lib.mkForce`, `lib.mkBefore`, or
|
||||||
`lib.mkAfter` explicitly when required.
|
`lib.mkAfter` explicitly when required.
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"applications.codex-desktop"
|
"applications.codex-desktop"
|
||||||
"applications.docker"
|
"applications.docker"
|
||||||
"applications.drawio"
|
"applications.drawio"
|
||||||
|
"applications.ghostty"
|
||||||
"applications.grok"
|
"applications.grok"
|
||||||
"applications.java"
|
"applications.java"
|
||||||
"applications.opencode"
|
"applications.opencode"
|
||||||
|
|||||||
@@ -11,4 +11,18 @@
|
|||||||
primaryUser
|
primaryUser
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.defaults.dock = {
|
||||||
|
# Finder and Trash are managed by macOS and do not belong in this list.
|
||||||
|
persistent-apps = [
|
||||||
|
"/Applications/Google Chrome.app"
|
||||||
|
"/Applications/Zed.app"
|
||||||
|
"/Applications/Visual Studio Code.app"
|
||||||
|
"/Applications/Slack.app"
|
||||||
|
"/Applications/Vesktop.app"
|
||||||
|
"/Applications/Ghostty.app"
|
||||||
|
];
|
||||||
|
persistent-others = [ ];
|
||||||
|
show-recents = false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user