Trying something else

This commit is contained in:
2026-02-16 13:36:17 -07:00
parent 5db8d35a2f
commit c2694f46a2
11 changed files with 232 additions and 126 deletions

21
flake.lock generated
View File

@@ -1,5 +1,25 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1771269455,
"narHash": "sha256-BZ31eN5F99YH6vkc4AhzKGE+tJgJ52kl8f01K7wCs8w=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5f1d42a97b19803041434f66681d5c44c9ae62e3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@@ -38,6 +58,7 @@
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"

151
flake.nix
View File

@@ -1,5 +1,5 @@
{
description = "dart system configuration via nix-darwin";
description = "dart";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@@ -9,13 +9,18 @@
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nix-darwin, rust-overlay }:
outputs = { self, nixpkgs, nix-darwin, home-manager, rust-overlay }:
let
system = "aarch64-darwin";
@@ -24,138 +29,32 @@
overlays = [ rust-overlay.overlays.default ];
config.allowUnfree = true;
};
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
targets = [ "aarch64-apple-darwin" ];
};
# CLI
cliTools = with pkgs; [
# Editors
helix
micro
lazygit
ripgrep
# Build/dev tools
fnm
cmake
ninja
gradle
# Network
netcat-gnu
# Misc
bitwarden-cli
pwgen
qrencode
sl
upx
wakeonlan
magic-wormhole
httpie
gh
doctl
qemu
];
# Languages
languages = with pkgs; [
rustToolchain
python313
openjdk
openjdk17
lua
luajit
perl
ruby
go
];
# Media
media = with pkgs; [
ffmpeg
tesseract
tectonic
];
# Security
security = with pkgs; [
nmap
nikto
john
rustscan
];
# Networking
networking = with pkgs; [
freerdp
openmpi
];
allPackages =
cliTools
++ languages
++ media
++ security
++ networking;
in
{
darwinConfigurations."dart" = nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = { inherit rust-overlay; };
modules = [
{
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
};
nixpkgs = {
hostPlatform = system;
config.allowUnfree = true;
overlays = [ rust-overlay.overlays.default ];
};
environment.systemPackages = allPackages;
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
cleanup = "zap";
};
brews = [
"gamdl"
"knock"
"snort"
];
casks = [
"android-platform-tools"
"flutter"
"ghostty"
"librewolf"
"ngrok"
"pearcleaner"
"zulu@17"
];
};
programs.zsh.enable = true;
system.primaryUser = "atridad";
system.stateVersion = 6;
}
home-manager.darwinModules.home-manager
./modules/system.nix
./modules/packages/cli.nix
./modules/packages/languages.nix
./modules/packages/media.nix
./modules/packages/security.nix
./modules/packages/networking.nix
./modules/homebrew.nix
./modules/home/default.nix
];
};
devShells.${system} = {
default = pkgs.mkShell {
packages = allPackages;
};
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
targets = [ "aarch64-apple-darwin" ];
})
helix
];
};
};
}

16
modules/home/default.nix Normal file
View File

@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.atridad = { pkgs, ... }: {
imports = [
./zed.nix
];
home.stateVersion = "25.11";
};
};
}

51
modules/home/zed.nix Normal file
View File

@@ -0,0 +1,51 @@
{ pkgs, ... }:
{
programs.zed-editor = {
enable = true;
extensions = [
"nix"
"catppuccin"
"catppuccin-icons"
"toml"
"elixir"
"make"
"astro"
"vue"
"latex"
"mermaid"
];
userSettings = {
icon_theme = "Catppuccin Macchiato";
title_bar = {
show_sign_in = false;
};
collaboration_panel = {
button = false;
};
status_bar = {
cursor_position_button = false;
};
disable_ai = true;
telemetry = {
diagnostics = false;
metrics = false;
};
ui_font_size = 16;
buffer_font_size = 15;
theme = {
mode = "system";
light = "One Light";
dark = "Catppuccin Macchiato";
};
languages = {
"Nix" = {
language_servers = [ "nil" "nixd" ];
format_on_save = "on";
};
};
};
};
}

28
modules/homebrew.nix Normal file
View File

@@ -0,0 +1,28 @@
{ ... }:
{
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
cleanup = "zap";
};
brews = [
"gamdl"
"knock"
"snort"
];
casks = [
"android-platform-tools"
"flutter"
"ghostty"
"librewolf"
"ngrok"
"pearcleaner"
"zulu@17"
];
};
}

26
modules/packages/cli.nix Normal file
View File

@@ -0,0 +1,26 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
helix
micro
lazygit
ripgrep
fnm
cmake
ninja
gradle
netcat-gnu
bitwarden-cli
pwgen
qrencode
sl
upx
wakeonlan
magic-wormhole
httpie
gh
doctl
qemu
];
}

View File

@@ -0,0 +1,21 @@
{ pkgs, ... }:
let
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
targets = [ "aarch64-apple-darwin" ];
};
in
{
environment.systemPackages = with pkgs; [
rustToolchain
python313
openjdk
openjdk17
lua
luajit
perl
ruby
go
];
}

View File

@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
ffmpeg
tesseract
tectonic
];
}

View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
freerdp
openmpi
];
}

View File

@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
nmap
nikto
john
rustscan
];
}

17
modules/system.nix Normal file
View File

@@ -0,0 +1,17 @@
{ rust-overlay, ... }:
{
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
};
nixpkgs = {
hostPlatform = "aarch64-darwin";
config.allowUnfree = true;
overlays = [ rust-overlay.overlays.default ];
};
programs.zsh.enable = true;
system.primaryUser = "atridad";
system.stateVersion = 6;
}