commit b6711ec221e5fe932b07ebfacb477e5b4595f64d Author: Brian Nelson Date: Tue Oct 20 09:46:14 2026 -0400 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..04933eb --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# My nix-darwin Configuration +This repo is meant to be a declarative setup for new macOS devices, specifically focused on the application installs. All GUI applications will be handled by homebrew and some brews or CLI tools. The more stable and maintained CLI tools are installed via nixpkgs. + +## Homebrew +I like using homebrew as my package manager for most apps as its really easy and convienent to run `brew upgrade` to update all apps in 1 go. I love nix for many other reasons but some of the packages on the stable branch aren't always up-to-date and take a while to update. diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..2354b92 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,64 @@ +{ config, pkgs, ... }: + +{ + nixpkgs.hostPlatform = "aarch64-darwin"; + + nix.enable = false; + + nix.settings.experimental-features = "nix-command flakes"; + + system.stateVersion = 6; + system.primaryUser = "briannelson"; + + environment.systemPackages = with pkgs; [ + ffmpeg + flac + helix + tea + yt-dlp + ]; + + homebrew = { + enable = true; + onActivation = { + autoUpdate = true; + cleanup = "none"; + }; + + brews = [ + "bun" + "harper" + ]; + + casks = [ + "bitwarden" + "cap" + "discord" + "harper-desktop" + "librewolf" + "nextcloud" + "protonvpn" + "rustdesk" + "signal" + "twingate" + "vlc" + "vscodium" + "firefox" + ]; + }; + + environment.shellAliases = { + yt = "yt-dlp"; + ll = "ls -la"; + }; + + environment.etc."yt-dlp.conf".text = '' + -o /Users/briannelson/Downloads/yt-dlp/%(title)s.%(ext)s + --no-mtime + --restrict-filenames + --embed-thumbnails + --embed-metadata + --format "bestvideo[height<=1080]+bestaudio/best[height<=1080]" + --merge-output-format mp4 + ''; +} \ No newline at end of file diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..dfd6172 --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "Brian's macOS nix-darwin configuration"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nix-darwin.url = "github:nix-darwin/nix-darwin"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + nix-homebrew.url = "github:zhaofengli/nix-homebrew"; + }; + + outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew, ... }: { + darwinConfigurations."YOUR-HOSTNAME" = nix-darwin.lib.darwinSystem { + modules = [ + ./configuration.nix + nix-homebrew.darwinModules.nix-homebrew + { + nix-homebrew = { + enable = true; + enableRosetta = true; + user = "briannelson"; + autoMigrate = true; + }; + } + ]; + }; + }; +} \ No newline at end of file