Skip to content
60 changes: 60 additions & 0 deletions .config/starship.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
"$schema" = 'https://starship.rs/config-schema.json'

format = """
[░▒▓](#a3aed2)\
[  ](bg:#a3aed2 fg:#090c0c)\
[](bg:#769ff0 fg:#a3aed2)\
$directory\
[](fg:#769ff0 bg:#394260)\
$git_branch\
$git_status\
[](fg:#394260 bg:#212736)\
$fill\
$nodejs\
$rust\
$python\
$pulumi\
$golang\
$nix_shell\
\n$character"""

[directory]
style = "fg:#e3e5e5 bg:#769ff0"
truncate_to_repo = true
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"

[fill]
symbol = ' '

[pulumi]
format = '[$symbol$stack]($style) '

[git_branch]
symbol = ""
style = "bg:#394260"
format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'

[git_status]
style = "bg:#394260"
format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'

[nodejs]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'

[rust]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'

[golang]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'

[nix_shell]
symbol = '❄️'
format = '[$symbol $state]($style) '
42 changes: 24 additions & 18 deletions .config/zed/settings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"icon_theme": "VSCode Icons (Dark)",
{
"assistant": {
"context_servers": {
"mcp-server-github": {
"source": "extension",
"enabled": true,
"settings": {}
}
},
"icon_theme": "VSCode Icons for Zed (Dark Official Icons)",
"agent": {
"inline_assistant_model": {
"provider": "zed.dev",
"model": "claude-sonnet-4-latest"
},
"default_model": {
"provider": "google",
"model": "gemini-2.5-pro-exp-03-25"
"provider": "zed.dev",
"model": "claude-sonnet-4-thinking"
},
"always_allow_tool_actions": true,
"default_profile": "write",
"version": "2"
}
}
"default_profile": "write"
},
"features": {
"edit_prediction_provider": "zed"
},
"ui_font_size": 16,
"buffer_font_size": 17.0,
"buffer_font_size": 12.0,
"buffer_font_family": "MesloLGS Nerd Font Mono",
"theme": {
"mode": "system",
"light": "One Light",
"dark": "Tokyo Night Storm"
},
"agent_servers": {
"OpenCode": {
"command": "opencode",
"args": ["acp"]
}
}
}
14 changes: 8 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@
- **Check formatting (CI)**: `nix develop -c treefmt --ci`
- **Check for unused Nix code**: `nix run nixpkgs#deadnix -- --fail`
- **Show flake outputs**: `nix flake show`
- **Flake check**: `nix flake check --keep-going --print-build-logs`
- **Primary validation command**: `nix flake check --keep-going --print-build-logs`
- **Evaluate host config**: `nix eval --raw .#darwinConfigurations.<host>.config.system.build.toplevel.drvPath`
- **Build host config**: `nix build --keep-going --print-build-logs .#darwinConfigurations.<host>.config.system.build.toplevel`
- **Apply changes**: `sudo darwin-rebuild switch --flake .#<host>` (hosts: higgins, benson, spaceblack, dunston, mfourmax)
- **Update flake inputs**: `nix flake update` or `nix flake lock --update-input <input>`

## Testing Workflow
Before applying changes:
1. Check formatting: `treefmt --ci`
2. Check for dead code: `nix run nixpkgs#deadnix -- --fail`
3. Run flake check: `nix flake check --keep-going --print-build-logs`
4. Build specific host: `nix build .#darwinConfigurations.<host>.config.system.build.toplevel`
5. Apply if successful: `sudo darwin-rebuild switch --flake .#<host>`
1. Run the primary validation suite: `nix flake check --keep-going --print-build-logs`
2. Build the specific host when host changes are involved: `nix build .#darwinConfigurations.<host>.config.system.build.toplevel`
3. Apply if successful: `sudo darwin-rebuild switch --flake .#<host>`

Use targeted checks when you want faster feedback on a specific issue:
- `treefmt --ci`
- `nix run nixpkgs#deadnix -- --fail`

## Code Style
- **Language**: Nix using RFC-style formatting (nixfmt)
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,15 @@ Install Nix using [Determinate Systems Installer](https://github.com/Determinate

`sudo darwin-rebuild switch --flake .#<host_name>`

## Validate

Run this first for the standard repo checks:

`nix flake check --keep-going --print-build-logs`

Optional targeted checks:

- `treefmt --ci`
- `nix run nixpkgs#deadnix -- --fail`
- `nix build .#darwinConfigurations.<host>.config.system.build.toplevel`

2 changes: 2 additions & 0 deletions darwin/darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
./modules/base.nix
./modules/packages.nix
./modules/fonts.nix
./modules/nerd-fonts.nix
./modules/homebrew.nix
./modules/defaults.nix
./modules/dock.nix
./modules/activation.nix
./modules/determinate-nix.nix
./modules/profiles.nix
./modules/wallpaper.nix
./audio.nix
Expand Down
10 changes: 4 additions & 6 deletions darwin/hosts/benson.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{ ... }:

{
profiles = {
audio.enable = true;
gaming.enable = true;
photography.enable = true;
video.enable = true;
};
imports = [
./shared/media.nix
./shared/gaming.nix
];
}
17 changes: 9 additions & 8 deletions darwin/hosts/dunston.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{ pkgs, lib, ... }:
{ ... }:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Keep host module signatures explicit.

Line 1 uses { ... }:; please use explicit destructuring per repo convention.

Suggested change
-{ ... }:
+{ pkgs, lib, config, ... }:

As per coding guidelines: Use attribute sets with destructuring in function signatures: { pkgs, lib, config, ... }:.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{ ... }:
{ pkgs, lib, config, ... }:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@darwin/hosts/dunston.nix` at line 1, The module currently uses a catch-all
signature "{ ... }:" which hides expected inputs; update the function signature
in dunston.nix to explicitly destructure the standard host module attributes
(e.g. use "{ pkgs, lib, config, ... }:"), ensuring pkgs/lib/config are available
for use in the file and preserving the rest via "...".


{
profiles = {
audio.enable = true;
gaming.enable = true;
photography.enable = true;
video.enable = true;
};
imports = [
./shared/media.nix
./shared/gaming.nix
];

fonts.packages = lib.mkAfter [ pkgs.nerd-fonts.fira-code ];
wallpaper = {
enable = true;
image = ../../wallpapers/deeptwilight.png;
};
}
10 changes: 4 additions & 6 deletions darwin/hosts/higgins.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{ ... }:

{
profiles = {
audio.enable = true;
gaming.enable = true;
photography.enable = true;
video.enable = true;
};
imports = [
./shared/media.nix
./shared/gaming.nix
];
}
9 changes: 5 additions & 4 deletions darwin/hosts/mfourmax.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{ pkgs, lib, ... }:
{ ... }:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use the standard explicit signature form here too.

Line 1 should follow the repo’s destructured function signature convention.

Suggested change
-{ ... }:
+{ pkgs, lib, config, ... }:

As per coding guidelines: Use attribute sets with destructuring in function signatures: { pkgs, lib, config, ... }:.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{ ... }:
{ pkgs, lib, config, ... }:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@darwin/hosts/mfourmax.nix` at line 1, The file currently uses a generic
anonymous argument signature "{ ... }:"; update it to the repo's destructured
attribute-set form by replacing that with an explicit destructured signature
such as "{ pkgs, lib, config, ... }:" so callers and internal references clearly
see the provided attributes; locate the top-level function signature in
mfourmax.nix and adjust it to the explicit destructured form (e.g., include
pkgs, lib, config) to match the repository convention.


{
fonts.packages = lib.mkAfter [ pkgs.nerd-fonts.fira-code ];

wallpaper = ../../wallpapers/deeptwilight.png;
wallpaper = {
enable = true;
image = ../../wallpapers/deeptwilight.png;
};

dock.extraApps = [
"/Applications/Figma.app"
Expand Down
5 changes: 5 additions & 0 deletions darwin/hosts/shared/gaming.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ ... }:

{
profiles.gaming.enable = true;
}
9 changes: 9 additions & 0 deletions darwin/hosts/shared/media.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{ ... }:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align module signature with repo convention.

Line 1 should use explicit destructuring instead of { ... }:.

Suggested change
-{ ... }:
+{ pkgs, lib, config, ... }:

As per coding guidelines: Use attribute sets with destructuring in function signatures: { pkgs, lib, config, ... }:.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{ ... }:
{ pkgs, lib, config, ... }:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@darwin/hosts/shared/media.nix` at line 1, Replace the generic module
signature "{ ... }:" with an explicit destructured attribute set (for example "{
pkgs, lib, config, ... }:"), updating the function parameter list in this
module's top-level signature so it follows the repo convention and makes
required inputs (pkgs, lib, config) explicit.


{
profiles = {
audio.enable = true;
photography.enable = true;
video.enable = true;
};
}
6 changes: 2 additions & 4 deletions darwin/hosts/spaceblack.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{ pkgs, lib, ... }:
{ ... }:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use explicit module arg destructuring for host modules.

Line 1 currently uses { ... }:. Please switch to the repo-standard explicit destructuring form for consistency.

Suggested change
-{ ... }:
+{ pkgs, lib, config, ... }:

As per coding guidelines: Use attribute sets with destructuring in function signatures: { pkgs, lib, config, ... }:.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{ ... }:
{ pkgs, lib, config, ... }:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@darwin/hosts/spaceblack.nix` at line 1, The module currently accepts a
catch-all argument set "{ ... }:"; change it to explicit module arg
destructuring like "{ pkgs, lib, config, ... }:" so the host module exposes
standard attributes (pkgs, lib, config) per repo convention; update the function
signature in the top-level of spaceblack.nix to replace "{ ... }:" with the
explicit destructured form and keep the trailing "...": to preserve additional
args.


{
fonts.packages = lib.mkAfter [ pkgs.nerd-fonts.fira-code ];
}
{ }
7 changes: 0 additions & 7 deletions darwin/modules/activation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
# Show Library folder
chflags nohidden "/Users/${config.system.primaryUser}/Library"

# Configure trusted-users for Determinate Nix
if [ -f /etc/nix/nix.custom.conf ]; then
if ! grep -q "trusted-users.*${config.system.primaryUser}" /etc/nix/nix.custom.conf; then
echo "trusted-users = root ${config.system.primaryUser}" >> /etc/nix/nix.custom.conf
fi
fi

# TODO: Disable until I can determine why this inverts natural scrolling option
# Following line should allow us to avoid a logout/login cycle to see changes
# /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
Expand Down
1 change: 1 addition & 0 deletions darwin/modules/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# Since we are using determinate nix distribution
nix.enable = false;
determinateNix.enable = true;

programs = {
gnupg.agent.enable = true;
Expand Down
4 changes: 2 additions & 2 deletions darwin/modules/defaults.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ ... }:
{ config, ... }:

{
system.defaults = {
Expand Down Expand Up @@ -37,7 +37,7 @@
# Current Folder
FXDefaultSearchScope = "SCcf";
NewWindowTarget = "Other";
NewWindowTargetPath = "file://${builtins.getEnv "HOME"}";
NewWindowTargetPath = "file://${config.users.users.${config.system.primaryUser}.home}";
};

dock = {
Expand Down
32 changes: 32 additions & 0 deletions darwin/modules/determinate-nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
config,
lib,
...
}:

let
cfg = config.determinateNix;
trustedUsers = lib.concatStringsSep " " cfg.trustedUsers;
in
{
options.determinateNix = {
enable = lib.mkEnableOption "Determinate Nix compatibility tweaks";

trustedUsers = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ config.system.primaryUser ];
description = "Users that should be written to /etc/nix/nix.custom.conf.";
};
};

config = lib.mkIf cfg.enable {
system.activationScripts.determinateNix.text = ''
if [ -f /etc/nix/nix.custom.conf ]; then
tmp="$(mktemp)"
grep -Ev '^[[:space:]]*trusted-users[[:space:]]*=.*$' /etc/nix/nix.custom.conf > "$tmp" || true
echo "trusted-users = root ${trustedUsers}" >> "$tmp"
mv "$tmp" /etc/nix/nix.custom.conf
fi
'';
};
}
4 changes: 1 addition & 3 deletions darwin/modules/homebrew.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@
"crystalfetch"
"codex"
"cursor"
"desktoppr"
"discord"
"docker-desktop"
"dropbox"
"expo-orbit"
"figma"
"firefox"
"font-bitstream-vera-sans-mono-nerd-font"
"font-hack-nerd-font"
"font-meslo-lg-nerd-font"
"ghostty"
"gitkraken"
"gitkraken-cli"
Expand Down
10 changes: 10 additions & 0 deletions darwin/modules/nerd-fonts.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ ... }:

{
homebrew.casks = [
"font-bitstream-vera-sans-mono-nerd-font"
"font-fira-code-nerd-font"
"font-hack-nerd-font"
"font-meslo-lg-nerd-font"
];
}
24 changes: 17 additions & 7 deletions darwin/modules/wallpaper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,27 @@ let
cfg = config.wallpaper;
in
{
options.wallpaper = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = "Path to wallpaper image file";
options.wallpaper = {
enable = lib.mkEnableOption "Apply a wallpaper for the primary user";

image = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
description = "Path to wallpaper image file";
};
};

config = lib.mkIf (cfg != null) {
homebrew.casks = [ "desktoppr" ];
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = cfg.image != null;
message = "wallpaper.image must be set when wallpaper.enable is true.";
}
];

system.activationScripts.postActivation.text = ''
sudo -u ${config.system.primaryUser} /usr/local/bin/desktoppr "${cfg}"
# desktoppr cask installs the CLI at /usr/local/bin/desktoppr
sudo -u ${config.system.primaryUser} /usr/local/bin/desktoppr "${cfg.image}"
Comment thread
csamuel marked this conversation as resolved.
'';
};
}
Loading
Loading