This commit is contained in:
2026-07-27 23:16:30 +09:00
parent 2a02beda38
commit 5132a1af1b
9 changed files with 42 additions and 11 deletions
+14 -8
View File
@@ -39,6 +39,7 @@ Prefer the following placements:
| ---------------------------------------------------- | ------------------------------------------------------- | | ---------------------------------------------------- | ------------------------------------------------------- |
| Nix settings shared by every system host | `modules/systems/nix/common.nix` | | Nix settings shared by every system host | `modules/systems/nix/common.nix` |
| NixOS-only boot configuration | `modules/systems/boot/.../nixos.nix` | | NixOS-only boot configuration | `modules/systems/boot/.../nixos.nix` |
| Disko NixOS module and CLI | `modules/systems/disko/` |
| macOS Dock defaults | `modules/systems/dock/darwin.nix` | | macOS Dock defaults | `modules/systems/dock/darwin.nix` |
| macOS trackpad defaults | `modules/systems/trackpad/darwin.nix` | | macOS trackpad defaults | `modules/systems/trackpad/darwin.nix` |
| Ghostty-specific configuration | `modules/applications/ghostty/` | | Ghostty-specific configuration | `modules/applications/ghostty/` |
@@ -312,10 +313,11 @@ Application metadata should include only dependencies technically required for
the application to work. A profile owns the user's choice to adopt several the application to work. A profile owns the user's choice to adopt several
otherwise independent applications together. For example, the niri application otherwise independent applications together. For example, the niri application
includes the Wayland foundation as a technical dependency. The includes the Wayland foundation as a technical dependency. The
`profiles.interface.linux-desktop` profile selects Ghostty, Nautilus, and `profiles.interface.linux-desktop` profile selects Ghostty and Nautilus because
Vicinae because both GNOME and niri use them, while `profiles.interface.niri` both GNOME and niri use them, while the cross-platform `profiles.interface.gui`
selects only the niri-specific shell and services. Ghostty must not depend on profile selects Vicinae for graphical hosts. `profiles.interface.niri` selects
niri, and niri-specific keybindings remain owned by the niri unit. only the niri-specific shell and services. Ghostty and Vicinae must not depend
on niri, and niri-specific keybindings remain owned by the niri unit.
## Profiles ## Profiles
@@ -329,6 +331,7 @@ modules/profiles/
├── base/ ├── base/
├── interface/ ├── interface/
│ ├── cli/ │ ├── cli/
│ ├── gui/
│ ├── macos/ │ ├── macos/
│ ├── linux-desktop/ │ ├── linux-desktop/
│ ├── gnome/ │ ├── gnome/
@@ -366,10 +369,13 @@ The profile layers have these responsibilities:
includes only `systems.nix`; optional secrets, interface, hardware, and includes only `systems.nix`; optional secrets, interface, hardware, and
workloads do not belong there. workloads do not belong there.
- `interface` describes how the host is operated. `interface.cli` is shared by - `interface` describes how the host is operated. `interface.cli` is shared by
NixOS and macOS and includes `tio`. `interface.macos` owns the macOS Dock and NixOS and macOS and includes `tio`. `interface.gui` owns cross-platform
trackpad defaults. `interface.linux-desktop` owns the common GNOME/niri graphical interface applications such as Vicinae. `interface.macos` owns the
desktop selection, including Ghostty, Nautilus, and Vicinae. GNOME and niri macOS Dock and trackpad defaults and includes `interface.gui`.
remain independently selectable and do not imply CLI or personal workloads. `interface.linux-desktop` owns the common GNOME/niri desktop selection,
including Ghostty and Nautilus, and also includes `interface.gui`. GNOME and
niri remain independently selectable and do not imply CLI or personal
workloads.
- `platform` describes NixOS foundations and physical or virtual form factors. - `platform` describes NixOS foundations and physical or virtual form factors.
macOS does not need an empty symmetric platform profile. macOS does not need an empty symmetric platform profile.
- `workload` describes optional host uses. `workload.development` and - `workload` describes optional host uses. `workload.development` and
+2
View File
@@ -12,6 +12,7 @@
"interface.niri" "interface.niri"
"platform.thinkpad-x1" "platform.thinkpad-x1"
"security.fingerprint" "security.fingerprint"
# "security.secrets"
"workload.personal" "workload.personal"
]; ];
}; };
@@ -27,6 +28,7 @@
"interface.cli" "interface.cli"
"interface.macos" "interface.macos"
"security.fingerprint" "security.fingerprint"
# "security.secrets"
"workload.development" "workload.development"
"workload.personal" "workload.personal"
]; ];
+5
View File
@@ -6,6 +6,7 @@
}: }:
let let
isLinux = pkgs.stdenv.hostPlatform.isLinux; isLinux = pkgs.stdenv.hostPlatform.isLinux;
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
extensions = inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system}; extensions = inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system};
in in
{ {
@@ -16,6 +17,10 @@ in
autoStart = true; autoStart = true;
environment.USE_LAYER_SHELL = 1; environment.USE_LAYER_SHELL = 1;
}; };
launchd = lib.mkIf isDarwin {
enable = true;
autoStart = true;
};
settings = { settings = {
font.size = 11; font.size = 11;
close_on_focus_loss = true; close_on_focus_loss = true;
+3 -1
View File
@@ -24,6 +24,7 @@ when removing it from any supported host would make that host invalid.
| ------------------------------------ | ------------------------------------- | | ------------------------------------ | ------------------------------------- |
| `base` | NixOS, macOS | | `base` | NixOS, macOS |
| `interface.cli` | NixOS, macOS with Home Manager | | `interface.cli` | NixOS, macOS with Home Manager |
| `interface.gui` | NixOS, macOS with Home Manager |
| `interface.macos` | macOS | | `interface.macos` | macOS |
| `interface.linux-desktop` | NixOS with Home Manager | | `interface.linux-desktop` | NixOS with Home Manager |
| `interface.gnome` | NixOS with Home Manager | | `interface.gnome` | NixOS with Home Manager |
@@ -46,7 +47,8 @@ when removing it from any supported host would make that host invalid.
Select independent concerns independently in `hosts/default.nix`. For example, Select independent concerns independently in `hosts/default.nix`. For example,
a NixOS desktop can combine `interface.gnome` and `interface.niri` to provide a NixOS desktop can combine `interface.gnome` and `interface.niri` to provide
both sessions while sharing `interface.linux-desktop`; niri supplies ly. A both sessions while sharing `interface.linux-desktop` and `interface.gui`; niri
supplies ly. A
daily-use macOS development machine can combine `interface.macos`, daily-use macOS development machine can combine `interface.macos`,
`workload.development`, and `workload.personal`. Hardware support does not `workload.development`, and `workload.personal`. Hardware support does not
implicitly select an interface or workload. implicitly select an interface or workload.
+5
View File
@@ -0,0 +1,5 @@
{
description = "Cross-platform graphical interface applications";
includes = [ "applications.vicinae" ];
}
@@ -2,11 +2,11 @@
description = "Shared NixOS graphical desktop foundation"; description = "Shared NixOS graphical desktop foundation";
includes = [ includes = [
"profiles.interface.gui"
"applications.fcitx5" "applications.fcitx5"
"applications.ghostty" "applications.ghostty"
"applications.gtk" "applications.gtk"
"applications.nautilus" "applications.nautilus"
"applications.vicinae"
"hardwares.graphics" "hardwares.graphics"
"systems.audio" "systems.audio"
"systems.fonts" "systems.fonts"
@@ -2,6 +2,7 @@
description = "macOS graphical interface defaults"; description = "macOS graphical interface defaults";
includes = [ includes = [
"profiles.interface.gui"
"systems.dock" "systems.dock"
"systems.trackpad" "systems.trackpad"
]; ];
+1
View File
@@ -2,6 +2,7 @@
description = "Foundation shared by all NixOS platforms"; description = "Foundation shared by all NixOS platforms";
includes = [ includes = [
"systems.disko"
"systems.boot.base" "systems.boot.base"
"systems.locale" "systems.locale"
"systems.networking.base" "systems.networking.base"
+10 -1
View File
@@ -1,4 +1,13 @@
{ lib, ... }: {
inputs,
lib,
pkgs,
...
}:
{ {
disko.enableConfig = lib.mkDefault false; disko.enableConfig = lib.mkDefault false;
environment.systemPackages = [
inputs.disko.packages.${pkgs.stdenv.hostPlatform.system}.disko
];
} }