darwin compatibility logic & darwin mcp

This commit is contained in:
Danilo Reyes
2026-03-18 15:58:19 -06:00
parent 9c6f17f113
commit 29bb85b5c9
6 changed files with 93 additions and 47 deletions

View File

@@ -1,11 +1,22 @@
{ {
inputs, inputs,
pkgs,
... ...
}: }:
{ {
home = { home = {
username = "cdreyes"; username = "carlosdaniloreyesmartinez";
homeDirectory = "/Users/cdreyes"; homeDirectory = "/Users/carlosdaniloreyesmartinez";
packages = [ pkgs.google-cloud-sdk ];
};
programs = {
starship.enable = true;
kitty = {
enable = true;
shellIntegration.enableBashIntegration = false;
shellIntegration.enableZshIntegration = true;
settings.term = "xterm-256color";
};
}; };
my = import ./toggles.nix { inherit inputs; }; my = import ./toggles.nix { inherit inputs; };
} }

View File

@@ -5,13 +5,32 @@
emacsExtraConfig, emacsExtraConfig,
emacsExtraPackages, emacsExtraPackages,
}: }:
{ let
packages = builtins.attrValues { clipboardPackages =
inherit (pkgs.xorg) xwininfo; if pkgs.stdenv.isDarwin then
builtins.attrValues {
inherit (pkgs) pngpaste;
}
else
builtins.attrValues {
inherit (pkgs) inherit (pkgs)
xdotool
xclip xclip
wl-clipboard-rs wl-clipboard-rs
;
};
linuxWindowPackages = lib.optionals pkgs.stdenv.isLinux (
builtins.attrValues {
inherit (pkgs.xorg) xwininfo;
inherit (pkgs) xdotool;
}
);
in
{
packages =
linuxWindowPackages
++ clipboardPackages
++ builtins.attrValues {
inherit (pkgs)
fd fd
fzf fzf
ripgrep ripgrep

View File

@@ -111,9 +111,11 @@ in
fi fi
'' ''
'' ''
if command -v fzf-share >/dev/null; then if [ -f "${pkgs.fzf}/share/fzf/key-bindings.zsh" ]; then
source "$(fzf-share)/key-bindings.bash" source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
source "$(fzf-share)/completion.bash" fi
if [ -f "${pkgs.fzf}/share/fzf/completion.zsh" ]; then
source "${pkgs.fzf}/share/fzf/completion.zsh"
fi fi
''; '';
}; };

View File

@@ -9,7 +9,10 @@ let
}; };
in in
{ {
systems = [ system ]; systems = [
system
"aarch64-darwin"
];
flake = { flake = {
lib = { lib = {
commonOverlays = mkpkgs: inputs: [ commonOverlays = mkpkgs: inputs: [

View File

@@ -1,7 +1,10 @@
{ inputs, ... }: { inputs, ... }:
{ {
perSystem = _: { perSystem =
{ pkgs, ... }:
{
devShells = devShells =
if pkgs.stdenv.isLinux then
let let
hostShells = inputs.self.nixosConfigurations.emacs.config.devShells; hostShells = inputs.self.nixosConfigurations.emacs.config.devShells;
in in
@@ -11,6 +14,10 @@
inherit name; inherit name;
value = hostShells.${name}; value = hostShells.${name};
}) })
|> builtins.listToAttrs; |> builtins.listToAttrs
else
{
mcp = (import ../modules/dev/mcp/common.nix { inherit pkgs inputs; }).devShell;
};
}; };
} }

View File

@@ -52,12 +52,16 @@
}; };
in in
{ {
packages = (inputs.jawz-scripts.packages.${system} or { }) // { packages =
emacs-vm = inputs.self.nixosConfigurations.emacs.config.system.build.vm; (inputs.jawz-scripts.packages.${system} or { })
vps-linode = vpsLinodeConfig.config.system.build.images.linode; // {
mcp-tests = mcpTests; mcp-tests = mcpTests;
nixos-mcp = nixosMcp; nixos-mcp = nixosMcp;
nixos-mcp-server = mcpServerPkg; nixos-mcp-server = mcpServerPkg;
}
// pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
emacs-vm = inputs.self.nixosConfigurations.emacs.config.system.build.vm;
vps-linode = vpsLinodeConfig.config.system.build.images.linode;
}; };
}; };
} }