4 Commits
Author SHA1 Message Date
Greg Hellings c0a0c64425 feat: add ~/.local/bin/ to nushell PATH
buildbot/nix-eval Build done.
buildbot/nix-build gitea:greg/nixos#checks.x86_64-linux Build done.
buildbot/nix-build gitea:greg/nixos#checks.aarch64-darwin Build done.
buildbot/nix-build gitea:greg/nixos#checks.aarch64-linux Build done.
buildbot/nix-build Build done.
2026-04-06 16:50:06 -05:00
Greg Hellings 05f3f118ac fix: simplify inject-darwin 2026-04-06 16:24:53 -05:00
Greg Hellings 21dbcb3113 feat: aws-cli and cargo on lithic 2026-04-06 16:23:03 -05:00
Greg Hellings 6b7f54d0a2 feat: pull dynamic names for Darwin/Home 2026-04-06 16:21:02 -05:00
16 changed files with 68 additions and 49 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ in
nerd-fonts.hack nerd-fonts.hack
]; ];
launchd.daemons = lib.genAttrs' [ "x86" "aarch" ] (arch: lib.nameValuePair "builder-${arch}-machine" (builder arch)); #launchd.daemons = lib.genAttrs' [ "x86" "aarch" ] (arch: lib.nameValuePair "builder-${arch}-machine" (builder arch));
nix = { nix = {
enable = true; enable = true;
+8 -5
View File
@@ -37,8 +37,11 @@ let
++ lib.optionals (builtins.pathExists ./hosts/${name}) [ ./hosts/${name} ]; ++ lib.optionals (builtins.pathExists ./hosts/${name}) [ ./hosts/${name} ];
}; };
in in
{ (
"MacBook-Pro" = mac { name = "ivr"; }; lib.genAttrs
"MacBook-Prolocal" = mac { name = "ivr"; }; (builtins.attrNames (builtins.readDir ./hosts))
"li" = mac { name = "li"; }; (
} name:
mac { inherit name; }
)
)
+1
View File
@@ -0,0 +1 @@
gregory
+1
View File
@@ -0,0 +1 @@
gregory/
+1
View File
@@ -0,0 +1 @@
gregs-MacBook-Pro-16-inch-Nov-2024/
@@ -1,6 +1,6 @@
{ ... }: { ... }:
let let
username = "gregory.hellings"; username = "greg";
in in
{ {
greg = { greg = {
@@ -33,7 +33,6 @@ in
"podman-desktop" "podman-desktop"
"tabby" "tabby"
"zed" "zed"
"zoom"
]; ];
user = username; user = username;
}; };
+1
View File
@@ -72,3 +72,4 @@ def dc [ $cmd: string = "sh" ] {
if ("/usr/local/bin" | path exists) { if ("/usr/local/bin" | path exists) {
$env.PATH = $env.PATH | append "/usr/local/bin" $env.PATH = $env.PATH | append "/usr/local/bin"
} }
$env.PATH = $env.PATH | prepend "~/.local/bin"
+8 -17
View File
@@ -4,11 +4,13 @@
top, top,
}: }:
let let
inherit (top.nixunstable) lib;
user = user =
host: username: host:
let let
inherit (metadata.hosts.${host}) system; inherit (metadata.hosts.${host}) system;
pkgs = nixpkgs.${system}; pkgs = nixpkgs.${system};
username = if builtins.hasAttr "user" metadata.hosts.${host} then metadata.hosts.${host}.user else "greg";
in in
top.hmunstable.lib.homeManagerConfiguration { top.hmunstable.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
@@ -28,20 +30,9 @@ let
gnome = false; gnome = false;
}; };
}; };
greg = host: (user host "greg");
in in
{ (
"MacBook-Pro.local" = user "ivr" "gregory.hellings"; lib.genAttrs
"MacBook-Prolocal.local" = user "ivr" "gregory.hellings"; (builtins.attrNames (builtins.readDir ./hosts))
"MacBook-Pro.thehellings.lan" = user "ivr" "gregory.hellings"; user
"gregory.hellings-mbp" = user "ivr" "gregory.hellings"; )
genesis = greg "genesis";
exodus = greg "exodus";
zeke = greg "zeke";
isaiah = greg "isaiah";
jeremiah = greg "jeremiah";
li = user "li" "gregory.hellings";
linode = greg "linode";
hosea = greg "hosea";
gitlab = greg "gitlab";
}
@@ -1,11 +1,9 @@
{ {
pkgs, pkgs,
lib, lib,
username,
... ...
}: }:
let
username = "gregory.hellings";
in
{ {
# Disables hitting local cache # Disables hitting local cache
_module.args.cache = lib.mkForce false; _module.args.cache = lib.mkForce false;
+1
View File
@@ -0,0 +1 @@
gregory.hellings-mbp/
@@ -4,7 +4,7 @@
... ...
}: }:
let let
username = "gregory.hellings"; username = "greg";
in in
{ {
# Disables hitting local cache # Disables hitting local cache
@@ -13,18 +13,21 @@ in
development = true; development = true;
gui = true; gui = true;
nix.cache = false; nix.cache = false;
vscodium = false; zed = true;
}; };
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
ansible ansible
awscli2
cargo
direnv direnv
home-manager home-manager
python3Packages.ipython python3Packages.ipython
just just
nixVersions.stable nixVersions.stable
pre-commit pre-commit
rustc
]; ];
username = username; username = username;
homeDirectory = "/Users/${username}"; homeDirectory = "/Users/${username}";
BIN
View File
Binary file not shown.
+4 -3
View File
@@ -53,9 +53,10 @@
"external": true, "external": true,
"system": "x86_64-linux" "system": "x86_64-linux"
}, },
"ivr": { "gregory.hellings-mbp": {
"external": true, "external": true,
"system": "aarch64-darwin" "system": "aarch64-darwin",
"user": "gregory.hellings"
}, },
"jeremiah": { "jeremiah": {
"builder": true, "builder": true,
@@ -72,7 +73,7 @@
"ip": "10.42.0.4", "ip": "10.42.0.4",
"ts": null "ts": null
}, },
"li": { "lithic": {
"external": true, "external": true,
"system": "aarch64-darwin" "system": "aarch64-darwin"
}, },
+7 -16
View File
@@ -3,6 +3,7 @@
coreutils, coreutils,
curl, curl,
gnutar, gnutar,
inetutils,
nix, nix,
... ...
}: }:
@@ -12,27 +13,17 @@ writeShellApplication {
coreutils coreutils
curl curl
gnutar gnutar
inetutils
nix nix
]; ];
text = '' 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 # Get my configuration
mkdir -p ~/.config/darwin cd /etc/nix-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 # Build NixOS for this system
pushd "''${dir}" nix --extra-experimental-features "nix-command flakes" build ".#darwinConfigurations.$(hostname -s).system"
nix build "''${HOME}/.config/darwin#darwinConfigurations.$(hostname -s).system" sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin
./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin
popd sudo ./result/sw/bin/darwin-rebuild switch --flake .
rm -r "''${dir}"
''; '';
} }
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
host="$(hostname -s)"
# Install XCode tools
echo "Installing XCode Tools"
xcode-select --install
# Install Homebrew
echo "Installing Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo >> ~/.zprofile
echo >> 'eval "$(/opt/homebrew/bin/brew shellenv zsh)"' >> ~/.zprofile
# Install Nix
echo "Installing Nix"
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
sudo mkdir /etc/nix-darwin
sudo chown -R $USER /etc/nix-darwin
# Install my configurations
cd /etc/nix-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
mkdir -p "/etc/nix-darwin/darwin/hosts/${host}"
mkdir -p "/etc/nix-darwin/home/hosts/${host}"
/nix/var/nix/profiles/system/sw/bin/nix --extra-experimental-features "nix-command flakes" run greg-hellings/nixos-config#inject-darwin