From c9cd61f74abcab1da9fc07a7dce3d79ce669ada3 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sun, 17 Dec 2023 13:13:52 -0500 Subject: [PATCH 1/2] Add AirPuppet --- flake.nix | 1 + modules/home-manager/hosts/AirPuppet/gene.nix | 9 +++++++++ modules/hosts/darwin/AirPuppet/default.nix | 10 ++++++++++ 3 files changed, 20 insertions(+) create mode 100644 modules/home-manager/hosts/AirPuppet/gene.nix create mode 100644 modules/hosts/darwin/AirPuppet/default.nix diff --git a/flake.nix b/flake.nix index 178f18f..27018a0 100644 --- a/flake.nix +++ b/flake.nix @@ -100,6 +100,7 @@ in { darwinConfigurations = { + AirPuppet = darwinHostConfig "x86_64-darwin" "AirPuppet" "gene"; Blue-Rock = darwinHostConfig "x86_64-darwin" "Blue-Rock" "gene.liverman"; }; diff --git a/modules/home-manager/hosts/AirPuppet/gene.nix b/modules/home-manager/hosts/AirPuppet/gene.nix new file mode 100644 index 0000000..12d0ec2 --- /dev/null +++ b/modules/home-manager/hosts/AirPuppet/gene.nix @@ -0,0 +1,9 @@ +{ pkgs, genebean-omp-themes, ... }: { + home.stateVersion = "23.11"; + imports = [ + ../../common/all-cli.nix + ../../common/all-gui.nix + ../../common/all-darwin.nix + ]; + +} diff --git a/modules/hosts/darwin/AirPuppet/default.nix b/modules/hosts/darwin/AirPuppet/default.nix new file mode 100644 index 0000000..1913280 --- /dev/null +++ b/modules/hosts/darwin/AirPuppet/default.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: { + system.stateVersion = 4; + + homebrew = { + # used to have tap sandreas/tap and program m4b-tool + masApps = { + "HomeCam" = 1292995895; + }; + }; +} From 303a19d305d5ef1ff7a5a8a29960c7c4201a79c0 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Sun, 17 Dec 2023 13:26:05 -0500 Subject: [PATCH 2/2] Add docs on adding a new Mac --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index c28c3e2..0177651 100644 --- a/README.md +++ b/README.md @@ -89,3 +89,33 @@ $ tree . -I legacy* -I link* --gitignore --dirsfirst ## Historical bits This repo historically contained my dot files. Historically symlinked files are still in `link/`. Most all the other old stuff is now tucked away under `legacy/` to get it out of the way until I decide what is and isn't needed. + +## Adding a new macOS host + +1. clone this repo +2. add entry to `flake.nix` +3. add file at `modules/home-manager/hosts/< hostname >/< username >.nix` +4. add file at `modules/hosts/< system >/< hostname >/default.nix` + - run brew leaves and look for things installed from taps you don't want any more + - uninstall the program and the tap if not adding it to nix +5. run macOS installer from https://determinate.systems/posts/graphical-nix-installer +6. run `nix run nix-darwin -- check --flake ~/repos/dots` +7. run `sudo mv /etc/shells{,.before-nix-darwin}` +8. run `sudo mv /etc/zshenv{,.before-nix-darwin}` +9. Note that you may also have to move or remove `~/.zshrc` +10. Run `nix run nix-darwin -- switch --flake ~/repos/dots` + 1. first (or several) run(s) through homebrew may well fail due to previously installed casks in `/Applications`. You may have to run brew with `--force` to fix this + 2. you may have to run brew multiple times to fix things + 3. in Settings > Privacy & Security > App Management you will need to allow iTerm + 4. **Note:** ensure `firefox-profile-switcher-connector` is linked: +11. After the nix command finally works, open a new shell and it should have all the nixified settings in it. +12. Go into iTerm2 and use the Hack Nerd Mono font so that the prompt and other things look right. You will likely also want to adjust the size of the font. + +Now that that is done, setup Atuin: + +```bash +atuin import auto +read -s ak +read -s ap +atuin login --key $ak --password $ap --username gene +```