Trying something else
This commit is contained in:
21
flake.lock
generated
21
flake.lock
generated
@@ -1,5 +1,25 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"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": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -38,6 +58,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
|
|||||||
151
flake.nix
151
flake.nix
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "dart — system configuration via nix-darwin";
|
description = "dart";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
@@ -9,13 +9,18 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
rust-overlay = {
|
rust-overlay = {
|
||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nix-darwin, rust-overlay }:
|
outputs = { self, nixpkgs, nix-darwin, home-manager, rust-overlay }:
|
||||||
let
|
let
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
|
|
||||||
@@ -24,138 +29,32 @@
|
|||||||
overlays = [ rust-overlay.overlays.default ];
|
overlays = [ rust-overlay.overlays.default ];
|
||||||
config.allowUnfree = true;
|
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
|
in
|
||||||
{
|
{
|
||||||
darwinConfigurations."dart" = nix-darwin.lib.darwinSystem {
|
darwinConfigurations."dart" = nix-darwin.lib.darwinSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
specialArgs = { inherit rust-overlay; };
|
||||||
modules = [
|
modules = [
|
||||||
{
|
home-manager.darwinModules.home-manager
|
||||||
nix.settings = {
|
./modules/system.nix
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
./modules/packages/cli.nix
|
||||||
};
|
./modules/packages/languages.nix
|
||||||
|
./modules/packages/media.nix
|
||||||
nixpkgs = {
|
./modules/packages/security.nix
|
||||||
hostPlatform = system;
|
./modules/packages/networking.nix
|
||||||
config.allowUnfree = true;
|
./modules/homebrew.nix
|
||||||
overlays = [ rust-overlay.overlays.default ];
|
./modules/home/default.nix
|
||||||
};
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.${system} = {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
default = pkgs.mkShell {
|
packages = with pkgs; [
|
||||||
packages = allPackages;
|
(rust-bin.stable.latest.default.override {
|
||||||
};
|
extensions = [ "rust-src" "rust-analyzer" ];
|
||||||
|
targets = [ "aarch64-apple-darwin" ];
|
||||||
|
})
|
||||||
|
helix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
16
modules/home/default.nix
Normal file
16
modules/home/default.nix
Normal 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
51
modules/home/zed.nix
Normal 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
28
modules/homebrew.nix
Normal 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
26
modules/packages/cli.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
||||||
21
modules/packages/languages.nix
Normal file
21
modules/packages/languages.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
||||||
9
modules/packages/media.nix
Normal file
9
modules/packages/media.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ffmpeg
|
||||||
|
tesseract
|
||||||
|
tectonic
|
||||||
|
];
|
||||||
|
}
|
||||||
8
modules/packages/networking.nix
Normal file
8
modules/packages/networking.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
freerdp
|
||||||
|
openmpi
|
||||||
|
];
|
||||||
|
}
|
||||||
10
modules/packages/security.nix
Normal file
10
modules/packages/security.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nmap
|
||||||
|
nikto
|
||||||
|
john
|
||||||
|
rustscan
|
||||||
|
];
|
||||||
|
}
|
||||||
17
modules/system.nix
Normal file
17
modules/system.nix
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user