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

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
];
};
};
}