aboutsummaryrefslogtreecommitdiff
path: root/nix/hosts/darwin
diff options
context:
space:
mode:
Diffstat (limited to 'nix/hosts/darwin')
-rw-r--r--nix/hosts/darwin/default.nix1
-rw-r--r--nix/hosts/darwin/homebrew.nix36
-rw-r--r--nix/hosts/darwin/macos.nix39
-rw-r--r--nix/hosts/darwin/mba/default.nix13
-rw-r--r--nix/hosts/darwin/work/default.nix11
5 files changed, 100 insertions, 0 deletions
diff --git a/nix/hosts/darwin/default.nix b/nix/hosts/darwin/default.nix
new file mode 100644
index 0000000..2da9dbc
--- /dev/null
+++ b/nix/hosts/darwin/default.nix
@@ -0,0 +1 @@
+{ ... }: { imports = [ ./homebrew.nix ./macos.nix ]; }
diff --git a/nix/hosts/darwin/homebrew.nix b/nix/hosts/darwin/homebrew.nix
new file mode 100644
index 0000000..0840b06
--- /dev/null
+++ b/nix/hosts/darwin/homebrew.nix
@@ -0,0 +1,36 @@
+{ ... }: {
+ # Required for homebrew on aarch64
+ environment.systemPath = [ "/opt/homebrew/bin" "/opt/homebrew/sbin" ];
+
+ homebrew = {
+ enable = true;
+ onActivation.autoUpdate = true;
+ onActivation.upgrade = true;
+
+ brews = [
+ "go" # it's also installed by nix, but this is a fallback, just in case
+
+ # various hashicorp related tools
+ "hashicorp/tap/boundary" # https://www.boundaryproject.io/
+ "hashicorp/tap/nomad-pack"
+
+ # kubernetes stuff
+ "kind" # to run local k8s cluster
+ "kubebuilder"
+ ];
+
+ taps = [ "hashicorp/tap" ];
+
+ casks = [
+ "1password-cli"
+ "docker"
+ "element"
+ "emacs"
+ "iterm2"
+ "transmission"
+ "vlc"
+ "wireshark"
+ "zoom"
+ ];
+ };
+}
diff --git a/nix/hosts/darwin/macos.nix b/nix/hosts/darwin/macos.nix
new file mode 100644
index 0000000..36f680a
--- /dev/null
+++ b/nix/hosts/darwin/macos.nix
@@ -0,0 +1,39 @@
+{ pkgs, ... }: {
+ system.defaults.dock.autohide = true;
+ system.defaults.dock.orientation = "left";
+ system.defaults.dock.showhidden = false;
+ system.defaults.dock.show-recents = false;
+ # don’t rearrange spaces based on the most recent use
+ system.defaults.dock.mru-spaces = false;
+ system.defaults.finder.AppleShowAllExtensions = true;
+ system.defaults.screencapture.location = "~/Documents/screenshots";
+ system.defaults.SoftwareUpdate.AutomaticallyInstallMacOSUpdates = true;
+
+ fonts.packages = with pkgs; [
+ emacs-all-the-icons-fonts
+ google-fonts
+ roboto
+ source-code-pro
+ source-serif-pro
+ source-sans-pro
+ go-font
+ ];
+
+ system.keyboard = {
+ enableKeyMapping = true;
+ remapCapsLockToControl = true;
+ };
+
+ # Touch ID for sudo auth
+ security.pam.enableSudoTouchIdAuth = true;
+
+ services.nix-daemon.enable = true;
+
+ system.defaults.CustomUserPreferences = {
+ "com.apple.desktopservices" = {
+ # Avoid creating .DS_Store files on network or USB volumes
+ DSDontWriteNetworkStores = true;
+ DSDontWriteUSBStores = true;
+ };
+ };
+}
diff --git a/nix/hosts/darwin/mba/default.nix b/nix/hosts/darwin/mba/default.nix
new file mode 100644
index 0000000..0a5caac
--- /dev/null
+++ b/nix/hosts/darwin/mba/default.nix
@@ -0,0 +1,13 @@
+{ pkgs, self, ... }: {
+ networking.hostName = "mba-fcuny";
+
+ users.users.fcuny.home = "/Users/fcuny";
+ users.users.fcuny.shell = pkgs.fish;
+ programs.fish.enable = true;
+ environment.shells = [ pkgs.fish ];
+
+ system.stateVersion = 5;
+
+ home-manager.users.fcuny =
+ import "${self}/nix/profiles/home-manager/personal.nix";
+}
diff --git a/nix/hosts/darwin/work/default.nix b/nix/hosts/darwin/work/default.nix
new file mode 100644
index 0000000..9d5f2c0
--- /dev/null
+++ b/nix/hosts/darwin/work/default.nix
@@ -0,0 +1,11 @@
+{ pkgs, self, ... }: {
+ users.users.fcuny.home = "/Users/fcuny";
+ users.users.fcuny.shell = pkgs.fish;
+ programs.fish.enable = true;
+ environment.shells = [ pkgs.fish ];
+
+ system.stateVersion = 5;
+
+ home-manager.users.fcuny =
+ import "${self}/nix/profiles/home-manager/work.nix";
+}