Compare commits

...
Author SHA1 Message Date
Olaf f923fb7717 emacs Sha 2026-09-16 14:23:19 +02:00
kolkman 969e5e5dd3 excluded nightsky on x86 2026-09-15 20:55:37 +02:00
kolkman 3e6a7391df Architecture split. 2026-09-15 20:46:52 +02:00
kolkman 1fdb0cdc3e mlx-lm - aarch- only 2026-09-15 20:19:48 +02:00
kolkman c0392c8366 Catpuccin exluded for x86_64_darwin 2026-09-15 18:15:47 +02:00
Olaf e782f238ed Afinity replacement 2026-09-15 14:59:11 +02:00
Olaf Kolkman cac3b86098 platformio and vscode mods (using AI) 2026-09-13 14:19:11 +02:00
Olaf Kolkman 56b4fd88c0 Added Affinity App 2026-09-13 09:30:13 +02:00
6 changed files with 107 additions and 39 deletions
+2 -1
View File
@@ -4,4 +4,5 @@ result
dump.txt dump.txt
flake.lock flake.lock
*~ *~
Platformio - NixOS Wiki*
.platformio/
+89 -31
View File
@@ -2,23 +2,36 @@
description = "Starter configuration for macOS with nix-darwin"; description = "Starter configuration for macOS with nix-darwin";
inputs = { inputs = {
nixpkgs = { nixpkgsAarch64 = {
url = "github:nixos/nixpkgs//nixpkgs-26.05-darwin"; url = "github:nixos/nixpkgs/nixpkgs-unstable";
# url = "github:nixos/nixpkgs/nixpkgs-unstable";
}; };
home-manager = { nixpkgsX86 = {
url = "github:nixos/nixpkgs//nixpkgs-26.05-darwin";
};
homeManagerAarch64 = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgsAarch64";
};
homeManagerX86 = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgsX86";
}; };
nixd = { nixd = {
url = "github:nix-community/nixd"; url = "github:nix-community/nixd";
}; };
darwin = { darwinAarch64 = {
# url = "github:nix-darwin/nix-darwin"; url = "github:nix-darwin/nix-darwin";
inputs.nixpkgs.follows = "nixpkgsAarch64";
};
darwinX86 = {
url = "github:nix-darwin/nix-darwin/nix-darwin-26.05"; url = "github:nix-darwin/nix-darwin/nix-darwin-26.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgsX86";
}; };
brew-src = { brew-src = {
@@ -43,7 +56,7 @@
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgsAarch64";
}; };
nix-vscode-extensions = { nix-vscode-extensions = {
@@ -67,12 +80,15 @@
outputs = outputs =
{ {
self, self,
darwin, darwinAarch64,
darwinX86,
nix-homebrew, nix-homebrew,
homebrew-core, homebrew-core,
homebrew-cask, homebrew-cask,
home-manager, homeManagerAarch64,
nixpkgs, homeManagerX86,
nixpkgsAarch64,
nixpkgsX86,
nixd, nixd,
sops-nix, sops-nix,
nix-vscode-extensions, nix-vscode-extensions,
@@ -82,17 +98,33 @@
}@inputs: }@inputs:
let let
user = "olaf"; user = "olaf";
lib = nixpkgsAarch64.lib;
darwinSystems = [ darwinSystems = [
"aarch64-darwin" "aarch64-darwin"
"x86_64-darwin" "x86_64-darwin"
]; ];
forAllSystems = f: nixpkgs.lib.genAttrs darwinSystems f; perSystem = {
aarch64-darwin = {
nixpkgs = nixpkgsAarch64;
darwin = darwinAarch64;
home-manager = homeManagerAarch64;
pkgs = nixpkgsAarch64.legacyPackages.aarch64-darwin;
};
x86_64-darwin = {
nixpkgs = nixpkgsX86;
darwin = darwinX86;
home-manager = homeManagerX86;
pkgs = nixpkgsX86.legacyPackages.x86_64-darwin;
};
};
forAllSystems = f: lib.genAttrs darwinSystems f;
devShell = devShell =
system: system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = perSystem.${system}.pkgs;
in in
{ {
default = default =
@@ -101,30 +133,47 @@
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
bashInteractive bashInteractive
git git
pkgs.nixd
];
packages = with pkgs; [
platformio-core
(writeShellScriptBin "python" ''
if [ "$1" = "-m" ] && [ "$2" = "platformio" ]; then
shift 2
exec ${platformio-core}/bin/platformio "$@"
fi
exec ${python3}/bin/python3 "$@"
'')
openocd
avrdude
]; ];
shellHook = '' shellHook = ''
export EDITOR=vim export EDITOR=vim
export PLATFORMIO_CORE_DIR="$PWD/.platformio"
''; '';
buildInputs = with pkgs; [
rnix-lsp
];
}; };
}; };
mkApp = scriptName: system: { mkApp =
type = "app"; scriptName: system:
program = "${ let
(nixpkgs.legacyPackages.${system}.writeScriptBin scriptName '' pkgs = perSystem.${system}.pkgs;
in
{
type = "app";
program = "${
(pkgs.writeScriptBin scriptName ''
#!/usr/bin/env bash #!/usr/bin/env bash
PATH=${nixpkgs.legacyPackages.${system}.git}/bin:$PATH PATH=${pkgs.git}/bin:$PATH
echo "Running ${scriptName} for ${system}" echo "Running ${scriptName} for ${system}"
sudo chmod +x ${self}/apps/${system}/${scriptName} sudo chmod +x ${self}/apps/${system}/${scriptName}
exec ${self}/apps/${system}/${scriptName} exec ${self}/apps/${system}/${scriptName}
'') '')
}/bin/${scriptName}"; }/bin/${scriptName}";
}; };
mkDarwinApps = system: { mkDarwinApps = system: {
"apply" = mkApp "apply" system; "apply" = mkApp "apply" system;
@@ -135,15 +184,23 @@
in in
{ {
devShells = forAllSystems devShell; devShells = forAllSystems devShell;
apps = nixpkgs.lib.genAttrs darwinSystems mkDarwinApps; apps = lib.genAttrs darwinSystems mkDarwinApps;
darwinConfigurations = nixpkgs.lib.genAttrs darwinSystems ( darwinConfigurations = lib.genAttrs darwinSystems (
system: system:
darwin.lib.darwinSystem { let
systemConfig = perSystem.${system};
in
systemConfig.darwin.lib.darwinSystem {
inherit system; inherit system;
specialArgs = inputs; specialArgs = inputs // {
inherit system;
nixpkgs = systemConfig.nixpkgs;
darwin = systemConfig.darwin;
home-manager = systemConfig.home-manager;
};
modules = [ modules = [
home-manager.darwinModules.home-manager systemConfig.home-manager.darwinModules.home-manager
nix-homebrew.darwinModules.nix-homebrew nix-homebrew.darwinModules.nix-homebrew
{ {
nix-homebrew = { nix-homebrew = {
@@ -157,9 +214,10 @@
autoMigrate = true; autoMigrate = true;
}; };
home-manager.sharedModules = [ home-manager.sharedModules =
catppuccin.homeModules.catppuccin lib.optionals (system != "x86_64-darwin") [
]; catppuccin.homeModules.catppuccin
];
} }
./hosts/darwin ./hosts/darwin
+1 -3
View File
@@ -13,9 +13,7 @@ _:
"gimp" "gimp"
"inkscape" "inkscape"
"vcv-rack" "vcv-rack"
#"affinity-designer" "affinity"
#"affinity-photo"
#"affinity-publisher"
# Communication Tools # Communication Tools
"adium" "adium"
+1 -1
View File
@@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
emacsOverlaySha256 = "0a130q51cc35hzaz1clj0l9d7xwn13mgrlbxqi4jaxpma2ir27lb"; emacsOverlaySha256 = "0h15850dpx3p2jr5g4nv0gir0w9dgml1mqzc5yq8686y246r33br";
in in
{ {
home-manager.backupFileExtension = "nix-backup"; home-manager.backupFileExtension = "nix-backup";
+9 -1
View File
@@ -4,6 +4,7 @@
lib, lib,
home-manager, home-manager,
llm-agents, llm-agents,
system,
... ...
}: }:
@@ -67,7 +68,6 @@ in
"LibreOffice" = 1630474372; "LibreOffice" = 1630474372;
"Monal - XMPP Chatting " = 1637078500; "Monal - XMPP Chatting " = 1637078500;
"MQTT Explorer" = 1455214828; # (0.3.5) "MQTT Explorer" = 1455214828; # (0.3.5)
"Night Sky" = 475772902; # 475772902
"Native SQLite Manager" = 1416282836; # (1.31.0) "Native SQLite Manager" = 1416282836; # (1.31.0)
"Remarkable Desktop" = 1276493162; # (3.19.0) "Remarkable Desktop" = 1276493162; # (3.19.0)
"Slack for Desktop" = 803453959; # (4.45.60) "Slack for Desktop" = 803453959; # (4.45.60)
@@ -75,6 +75,9 @@ in
"Windows App Installer" = 1295203466; # (1.0.16) "Windows App Installer" = 1295203466; # (1.0.16)
"Wireguard" = 1451685025; # (1.0.16) "Wireguard" = 1451685025; # (1.0.16)
### "1Password: Password Manager" = 1511601750; # (8.11.0) Does not seem to insta ### "1Password: Password Manager" = 1511601750; # (8.11.0) Does not seem to insta
}
// lib.optionalAttrs (system != "x86_64-darwin") {
"Night Sky" = 475772902; # 475772902
}; };
}; };
@@ -98,11 +101,15 @@ in
}; };
stateVersion = "23.11"; stateVersion = "23.11";
}; };
}
// lib.optionalAttrs (system != "x86_64-darwin") {
catppuccin = { catppuccin = {
autoEnable = true; autoEnable = true;
enable = true; enable = true;
flavor = "mocha"; flavor = "mocha";
}; };
}
// {
programs = { programs = {
alacritty = { alacritty = {
enable = true; enable = true;
@@ -578,6 +585,7 @@ in
{ path = "/Applications/Microsoft Word.app/"; } { path = "/Applications/Microsoft Word.app/"; }
{ path = "/Applications/Microsoft PowerPoint.app/"; } { path = "/Applications/Microsoft PowerPoint.app/"; }
{ path = "/Applications/Microsoft Teams.app/"; } { path = "/Applications/Microsoft Teams.app/"; }
{ path = "/Applications/Affinity.app/"; }
{ path = "/Applications/Monal.app/"; } { path = "/Applications/Monal.app/"; }
{ path = "/System/Applications/Utilities/Screen Sharing.app/"; } { path = "/System/Applications/Utilities/Screen Sharing.app/"; }
{ path = "/run/current-system/Applications/Emacs.app/"; } { path = "/run/current-system/Applications/Emacs.app/"; }
+4 -1
View File
@@ -80,6 +80,7 @@ with pkgs;
fd fd
ffmpeg ffmpeg
imagemagick imagemagick
scour
# Text and terminal utilities # Text and terminal utilities
hunspell hunspell
@@ -110,7 +111,6 @@ with pkgs;
jinja2 jinja2
markupsafe markupsafe
mercantile mercantile
mlx-lm
numpy numpy
pandas pandas
pillow pillow
@@ -126,6 +126,9 @@ with pkgs;
wsproto wsproto
zipp zipp
] ]
++ lib.optionals pkgs.stdenv.hostPlatform.isAarch64 [
mlx-lm
]
)) ))
# LLM # LLM