initial commit
This commit is contained in:
5
README.md
Normal file
5
README.md
Normal file
@@ -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.
|
||||||
64
configuration.nix
Normal file
64
configuration.nix
Normal file
@@ -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
|
||||||
|
'';
|
||||||
|
}
|
||||||
27
flake.nix
Normal file
27
flake.nix
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user