Compare commits

..

38 Commits

Author SHA1 Message Date
228e26c760 Update homebrew.nix 2026-03-06 11:46:31 -07:00
5ec65a4cb3 Update flake.lock 2026-03-05 10:43:45 -07:00
186d3e8215 Updated to fix "Broken" librewolf 2026-03-05 10:41:57 -07:00
d96734a5d5 updates 2026-03-04 09:32:47 -07:00
8cdc437607 Update homebrew.nix 2026-03-02 00:04:42 -07:00
dfd71d36f9 Update homebrew.nix 2026-03-02 00:03:12 -07:00
96f57cadc7 Oops 2026-02-23 15:00:03 -07:00
e4a7b92aa8 Updated lockfile 2026-02-23 14:51:01 -07:00
661d5c6a96 Fix 2026-02-22 11:11:25 -07:00
69c5cc9060 Update flake.lock 2026-02-22 11:04:59 -07:00
4f3d072474 Update librewolf.nix 2026-02-22 11:04:03 -07:00
32616dbb8d Disable auto update for Zed 2026-02-17 18:34:44 -07:00
062dd6fc45 Added zed plugins 2026-02-16 23:53:39 -07:00
27d15ba706 Added nixd 2026-02-16 23:36:45 -07:00
dfd6f9a8c1 Added nil 2026-02-16 23:36:04 -07:00
0acff538a3 Update librewolf.nix 2026-02-16 23:33:55 -07:00
d93b8d58c8 Added background for librewolf 2026-02-16 23:32:09 -07:00
7885e7090c Cleaned up old packages I dont need 2026-02-16 23:26:37 -07:00
0191b8e1e5 Update search engines 2026-02-16 20:33:51 -07:00
13eabb2a4e Changed the command to match lavitz 2026-02-16 16:20:48 -07:00
5ee18a2d47 Librewolf is complete! 2026-02-16 16:19:02 -07:00
a558c558f0 Ok finally 2026-02-16 16:08:23 -07:00
ba6d171055 Update librewolf.nix 2026-02-16 15:57:13 -07:00
7b87de4700 Update librewolf.nix 2026-02-16 15:53:48 -07:00
7faa4d57b3 Finally 2026-02-16 15:45:20 -07:00
2edea89fd8 Update librewolf.nix 2026-02-16 15:32:23 -07:00
02fe38c5f1 Last try 2026-02-16 15:24:59 -07:00
68f6a120d4 Finally 2026-02-16 15:23:43 -07:00
715bc0b493 ????!!!! 2026-02-16 15:22:46 -07:00
144da5d7d7 ?!?!?!?! 2026-02-16 15:22:05 -07:00
b65e4cbdae ??? 2026-02-16 15:18:42 -07:00
1a03da12c3 Add a makefile 2026-02-16 14:34:22 -07:00
77e4eb75fa Update zed.nix 2026-02-16 14:28:10 -07:00
3a19bb1dda Swap theme 2026-02-16 14:27:03 -07:00
caae54f948 Moved zed to homebrew 2026-02-16 14:19:47 -07:00
b2410a98b6 ... 2026-02-16 13:37:57 -07:00
11a7ea8112 Oops... 2026-02-16 13:37:00 -07:00
c2694f46a2 Trying something else 2026-02-16 13:36:17 -07:00
16 changed files with 446 additions and 135 deletions

10
Makefile Normal file
View File

@@ -0,0 +1,10 @@
.PHONY: build update lock
build:
sudo darwin-rebuild switch --flake .#dart
update:
nix flake update
lock:
nix flake lock

6
README.md Normal file
View File

@@ -0,0 +1,6 @@
# Lavitz - My NixOS desktop configuration named after Dart from the PS1 classic The Legend of Dragoon
- Nix Version: 25.11
- OS: MacOS
- Browser: Librewolf
- Terminal: Ghostty

39
flake.lock generated
View File

@@ -1,5 +1,25 @@
{ {
"nodes": { "nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1772633327,
"narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nix-darwin": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -7,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1770922915, "lastModified": 1772379624,
"narHash": "sha256-6J/JoK9iL7sHvKJcGW2KId2agaKv1OGypsa7kN+ZBD4=", "narHash": "sha256-NG9LLTWlz4YiaTAiRGChbrzbVxBfX+Auq4Ab/SWmk4A=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "6c5a56295d2a24e43bcd8af838def1b9a95746b2", "rev": "52d061516108769656a8bd9c6e811c677ec5b462",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -22,11 +42,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1771177547, "lastModified": 1772674223,
"narHash": "sha256-trTtk3WTOHz7hSw89xIIvahkgoFJYQ0G43IlqprFoMA=", "narHash": "sha256-/suKbHSaSmuC9UY7G0VRQ3aO+QKqxAQPQ19wG7QNkF8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ac055f38c798b0d87695240c7b761b82fc7e5bc2", "rev": "66d9241e3dc2296726dc522e62dbfe89c7b449f3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -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"
@@ -50,11 +71,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771211437, "lastModified": 1772679930,
"narHash": "sha256-lcNK438i4DGtyA+bPXXyVLHVmJjYpVKmpux9WASa3ro=", "narHash": "sha256-FxYmdacqrdDVeE9QqZKTIpNLjv2B8GSKssgwlZuTR98=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "c62195b3d6e1bb11e0c2fb2a494117d3b55d410f", "rev": "9b741db17141331fdb26270a1b66b81be8be9edd",
"type": "github" "type": "github"
}, },
"original": { "original": {

149
flake.nix
View File

@@ -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/networking.nix
hostPlatform = system; ./modules/homebrew.nix
config.allowUnfree = true; ./modules/librewolf.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; devShells.${system}.default = pkgs.mkShell {
system.primaryUser = "atridad"; packages = with pkgs; [
system.stateVersion = 6; (rust-bin.stable.latest.default.override {
} extensions = [ "rust-src" "rust-analyzer" ];
targets = [ "aarch64-apple-darwin" ];
})
helix
]; ];
}; };
devShells.${system} = {
default = pkgs.mkShell {
packages = allPackages;
};
};
}; };
} }

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

@@ -0,0 +1,24 @@
{ pkgs, lib, ... }:
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "bak";
users.atridad = { pkgs, lib, ... }: {
imports = [
./zed.nix
./ssh.nix
./git.nix
./ghostty.nix
];
home = {
username = "atridad";
homeDirectory = lib.mkForce "/Users/atridad";
stateVersion = "25.11";
};
};
};
}

20
modules/home/ghostty.nix Normal file
View File

@@ -0,0 +1,20 @@
{ pkgs, lib, ... }:
let
ghosttyStub = (pkgs.runCommand "ghostty-stub" { } "mkdir -p $out/bin")
// { meta.mainProgram = "ghostty"; };
in
{
programs.ghostty = {
enable = true;
package = lib.mkForce ghosttyStub;
enableZshIntegration = false;
enableBashIntegration = false;
settings = {
theme = "Catppuccin Macchiato";
background-opacity = "0.95";
};
};
}

20
modules/home/git.nix Normal file
View File

@@ -0,0 +1,20 @@
{ ... }:
{
programs.git = {
enable = true;
signing = {
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILKb+pDgkHEKI7LDWvZbhoLJ11uJMaCmVyAqotDxNOI7 me@atri.dad";
signByDefault = true;
format = "ssh";
};
settings = {
user = {
name = "Atridad Lahiji";
email = "me@atri.dad";
};
};
};
}

31
modules/home/ssh.nix Normal file
View File

@@ -0,0 +1,31 @@
{ ... }:
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
extraOptions = {
IdentityAgent = "/Users/atridad/.bitwarden-ssh-agent.sock";
};
};
"localhost" = {
userKnownHostsFile = "/dev/null";
};
"tux" = {
hostname = "tuxworld.usask.ca";
user = "atl175";
};
"haschel" = {
hostname = "haschel";
user = "root";
};
"lloyd" = {
hostname = "lloyd";
user = "truenas_admin";
};
};
};
}

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

@@ -0,0 +1,58 @@
{ pkgs, lib, ... }:
{
programs.zed-editor = {
enable = true;
package = lib.mkForce (pkgs.runCommand "zed-stub" { } "mkdir -p $out");
extensions = [
"nix"
"dracula"
"catppuccin-icons"
"toml"
"elixir"
"make"
"astro"
"vue"
"latex"
"mermaid"
"docker"
"docker-compose"
];
userSettings = {
auto_update = false;
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 = "Dracula";
};
languages = {
"Nix" = {
language_servers = [
"nil"
"nixd"
];
format_on_save = "on";
};
};
};
};
}

35
modules/homebrew.nix Normal file
View File

@@ -0,0 +1,35 @@
{ ... }:
{
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
upgrade = true;
cleanup = "zap";
};
taps = [
"supersonic-app/supersonic"
];
brews = [
"gamdl"
"knock"
"snort"
];
casks = [
"android-platform-tools"
"flutter"
"ghostty"
"librewolf"
"ngrok"
"pearcleaner"
"zed"
"supersonic"
"calibre"
];
};
}

113
modules/librewolf.nix Normal file
View File

@@ -0,0 +1,113 @@
{ pkgs, ... }:
let
policies = {
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableFirefoxAccounts = true;
OfferToSaveLogins = false;
EnableTrackingProtection = true;
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
SponsoredPocket = false;
};
SanitizeOnShutdown = {
Cache = true;
Cookies = false;
History = false;
Sessions = true;
SiteSettings = false;
OfflineApps = true;
};
SearchEngines = {
Default = "Searx Search";
Remove = [
"Google"
"Bing"
"Perplexity"
"Wikipedia (en)"
];
Add = [
{
Name = "Searx Search";
URLTemplate = "https://search.atri.dad/search?q={searchTerms}";
Method = "GET";
IconURL = "https://search.atri.dad/favicon.ico";
Alias = "searx";
Description = "Searx (search.atri.dad)";
}
{
Name = "DuckDuckGo";
URLTemplate = "https://duckduckgo.com/?q={searchTerms}";
SuggestURLTemplate = "https://duckduckgo.com/ac/?q={searchTerms}&type=list";
Method = "GET";
IconURL = "https://duckduckgo.com/favicon.ico";
Alias = "ddg";
Description = "DuckDuckGo";
}
];
};
ExtensionSettings = {
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
installation_mode = "force_installed";
};
"floccus@handmadeideas.org" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi";
installation_mode = "force_installed";
};
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
};
Preferences = {
"browser.startup.homepage" = "about:home";
"extensions.autoDisableScopes" = 0;
"browser.toolbars.bookmarks.visibility" = "always";
"network.cookie.cookieBehavior" = 1;
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
"privacy.resistFingerprinting" = true;
"browser.ml.chat.enabled" = false;
"browser.ml.chat.sidebar" = false;
"browser.tabs.groups.smart.userEnabled" = false;
"browser.safebrowsing.malware.enabled" = false;
"browser.safebrowsing.phishing.enabled" = false;
"browser.safebrowsing.blockedURIs.enabled" = false;
"browser.safebrowsing.downloads.enabled" = false;
"browser.safebrowsing.provider.google4.gethashURL" = "";
"browser.safebrowsing.provider.google4.updateURL" = "";
"browser.safebrowsing.provider.google.gethashURL" = "";
"browser.safebrowsing.provider.google.updateURL" = "";
"browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "dark-mountain";
};
};
};
policiesFile = pkgs.writeText "librewolf-policies.json" (builtins.toJSON policies);
in
{
system.activationScripts.postActivation.text = ''
for APP_DIR in "/Applications/LibreWolf.app" "$HOME/Applications/LibreWolf.app"; do
if [ -d "$APP_DIR" ]; then
DIST_DIR="$APP_DIR/Contents/Resources/distribution"
mkdir -p "$DIST_DIR"
cp -f ${policiesFile} "$DIST_DIR/policies.json"
chmod 644 "$DIST_DIR/policies.json"
echo "Applied LibreWolf policies to $APP_DIR"
xattr -dr com.apple.quarantine /Applications/LibreWolf.app
fi
done
'';
}

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

@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
helix
micro
fnm
cmake
gradle
netcat-gnu
bitwarden-cli
qrencode
sl
upx
];
}

View File

@@ -0,0 +1,23 @@
{ 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
ruby
go
nil
nixd
];
}

View File

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

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