aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Cuny <59291+fcuny@users.noreply.github.com>2025-02-06 08:19:52 -0800
committerFranck Cuny <59291+fcuny@users.noreply.github.com>2025-02-06 08:19:52 -0800
commit01b9f1a2c03cefc7b3164aeaa23c81c19207bb54 (patch)
treebf4dcf5d68c9f8e1e7eda6e3e5ade0826ed969af
parentMerge pull request #6 from fcuny/update_flake_lock_action (diff)
downloadinfra-01b9f1a2c03cefc7b3164aeaa23c81c19207bb54.tar.gz
new work laptop
-rw-r--r--README.md28
-rw-r--r--flake.nix7
-rw-r--r--nix/machines/hq-kwny2vh41p/default.nix9
3 files changed, 44 insertions, 0 deletions
diff --git a/README.md b/README.md
index 154709f..b46de11 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,29 @@
Tools, scripts, and configurations for my machines.
+
+## Steps for a new Darwin machine
+
+Start by installing nix, using [nix-installer](https://github.com/DeterminateSystems/nix-installer) from [DeterminateSystems](https://determinate.systems).
+
+```sh
+curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
+```
+
+Next, we need to install [homebrew](https://brew.sh):
+```sh
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+```
+
+Finally, we need a [GitHub personal access token](https://github.com/settings/personal-access-tokens). Create one with an expiration time, and renew it when ever it's about to expire (we will get an email about this). The token needs to be stored in `~/.config/nix/nix.conf`:
+
+```
+access-tokens = github.com=****
+```
+
+Now you can build the configuration (remember, the host name is in lower case) :
+```sh
+nix run nix-darwin -- switch --flake .#hostname
+```
+
+Finally, switch the default shell via `chsh`, and set it to `/run/current-system/sw/bin/fish`.
+
+Best to reboot to complete the installation.
diff --git a/flake.nix b/flake.nix
index 83aad41..0ed623b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -133,6 +133,13 @@
user = "fcuny";
darwin = true;
};
+
+ # new work laptop
+ darwinConfigurations.hq-kwny2vh41p = mkSystem "hq-kwny2vh41p" {
+ system = "aarch64-darwin";
+ user = "fcuny";
+ darwin = true;
+ };
}
));
}
diff --git a/nix/machines/hq-kwny2vh41p/default.nix b/nix/machines/hq-kwny2vh41p/default.nix
new file mode 100644
index 0000000..5910d09
--- /dev/null
+++ b/nix/machines/hq-kwny2vh41p/default.nix
@@ -0,0 +1,9 @@
+{ pkgs, ... }:
+{
+ imports = [ ../darwin-shared.nix ];
+
+ system.stateVersion = 5;
+
+ programs.fish.enable = true;
+ environment.shells = [ pkgs.fish ];
+}