Better handling of work/personal darwin machine, remove clang & -tools

from work and add llvm via brew instead.
This commit is contained in:
Martin Larsson 2025-04-16 22:56:54 +02:00
parent f15bbc57e2
commit 44e501b67f
8 changed files with 73 additions and 33 deletions

View file

@ -133,36 +133,54 @@
darwinConfigurations = darwinConfigurations =
let let
baseDarwinConfig = makeSystemConfig { makeDarwinSystem =
name = "darwin"; {
system = "aarch64-darwin"; name,
builder = nix-darwin.lib.darwinSystem; user,
extraModules = [ extraModules ? [ ],
./nix/system/darwin.nix }:
nix-homebrew.darwinModules.nix-homebrew makeSystemConfig {
{ inherit name;
nix-homebrew = { system = "aarch64-darwin";
enable = true; builder = nix-darwin.lib.darwinSystem;
enableRosetta = true;
user = "larssonmartin1998-mac"; extraModules = [
taps = { ./nix/system/darwin.nix
"homebrew/core" = homebrew-core; nix-homebrew.darwinModules.nix-homebrew
"homebrew/cask" = homebrew-cask; {
"homebrew/bundle" = homebrew-bundle; nix-homebrew = {
"nikitabobko/tap" = homebrew-nikitabobko; enable = true;
enableRosetta = true;
user = user; # pass the user parameter
taps = {
"homebrew/core" = homebrew-core;
"homebrew/cask" = homebrew-cask;
"homebrew/bundle" = homebrew-bundle;
"nikitabobko/tap" = homebrew-nikitabobko;
};
mutableTaps = false;
}; };
mutableTaps = false; }
}; ] ++ extraModules;
}
]; specialArgs = {
specialArgs = { self = self;
self = self; };
}; };
};
in in
{ {
"darwin" = baseDarwinConfig; darwin = makeDarwinSystem {
"darwin_work" = baseDarwinConfig; name = "darwin";
user = "larssonmartin1998-mac";
};
darwin_work = makeDarwinSystem {
name = "darwin_work";
user = "martin.larsson";
extraModules = [
./nix/system/darwin_work.nix
];
};
}; };
homeConfigurations = { homeConfigurations = {
@ -187,7 +205,10 @@
"darwin" = makeHomeConfig { "darwin" = makeHomeConfig {
name = "darwin"; name = "darwin";
system = "aarch64-darwin"; system = "aarch64-darwin";
extraModules = [ ./nix/pkgs/darwin.nix ]; extraModules = [
./nix/pkgs/darwin.nix
./nix/pkgs/darwin_personal.nix
];
}; };
"darwin_work" = makeHomeConfig { "darwin_work" = makeHomeConfig {

View file

@ -23,8 +23,6 @@
jq jq
starship starship
fastfetch fastfetch
clang
clang-tools
nixfmt-rfc-style nixfmt-rfc-style
luajit luajit
zoxide zoxide

View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
home = {
packages = with pkgs; [
clang
clang-tools
];
};
}

View file

@ -9,8 +9,6 @@
pcre pcre
ccache ccache
mkdocs mkdocs
# jdk
# jdk21
]; ];
}; };

View file

@ -112,8 +112,6 @@ in
ninja ninja
tldr tldr
nerd-fonts.caskaydia-mono nerd-fonts.caskaydia-mono
# clang
# clang-tools
lldb lldb
nodejs nodejs
tree-sitter tree-sitter

View file

@ -4,6 +4,8 @@
packages = with pkgs; [ packages = with pkgs; [
wl-clipboard-rs wl-clipboard-rs
sway sway
clang
clang-tools
]; ];
file = { file = {
".config/sway".source = ../sway; ".config/sway".source = ../sway;

View file

@ -3,6 +3,8 @@
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
wslu wslu
clang
clang-tools
]; ];
}; };
} }

View file

@ -0,0 +1,11 @@
{
...
}:
{
homebrew = {
brews = [
"openjdk"
"llvm"
];
};
}