Continue moving personal packages from overlays

Continue moving out of the overlay model for everything and into running
sutff directly out of the packages. This should give a cleaner
separation of the things that I don't need to maintain separately
This commit is contained in:
Greg Hellings
2024-10-11 12:58:03 -05:00
parent 8d752032ae
commit 6a3f482792
15 changed files with 190 additions and 159 deletions
+38
View File
@@ -0,0 +1,38 @@
{
writeShellApplication,
coreutils,
curl,
gnutar,
nix,
...
}:
writeShellApplication {
name = "inject-darwin";
runtimeInputs = [
coreutils
curl
gnutar
nix
];
text = ''
dir="$(mktemp -d)"
cd "''${dir}"
# Install nix-darwin
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
# Get my configuration
mkdir -p ~/.config/darwin
cd ~/.config/darwin
curl -O -L https://github.com/greg-hellings/nixos-config/archive/refs/heads/main.tar.gz
tar xvzf main.tar.gz --strip-components 1
# Build NixOS for this system
pushd "''${dir}"
nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system"
./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin
popd
rm -r "''${dir}"
'';
}