mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-09-06 02:40:39 +00:00
Compare commits
22 Commits
ed7696d7a3
...
main
Author | SHA1 | Date | |
---|---|---|---|
dde705cf76 | |||
1cb2aa0a04 | |||
|
6946fcb6fe | ||
|
6425ba60eb | ||
|
246ec2c64c | ||
6cf8fc5ef5 | |||
0e9cccf82e | |||
|
8a51c74620 | ||
|
2f0d9a097e | ||
|
f797752d8c | ||
aaec06be58 | |||
a345a227aa | |||
b712b580a9 | |||
|
8d79067cb2 | ||
|
86e48260f6 | ||
b986b3a6c5 | |||
|
3f30b041c7 | ||
|
412d5200f2 | ||
|
c4e7214a17 | ||
|
03098ec5d9 | ||
a62a663a1e | |||
|
2edba6eac8 |
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install nix [without the --determinate flag]
|
# Install nix [without the --determinate flag]
|
||||||
|
# ⚠️ When asked if install the determinate version say no
|
||||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||||
|
|
||||||
# Install brew [for casks]
|
# Install brew [for casks]
|
||||||
@@ -19,7 +20,7 @@ git-crypt unlock .key
|
|||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
# Available hosts can be found in the ./hosts directory
|
# Available hosts can be found in the ./hosts directory
|
||||||
nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host>
|
sudo nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host>
|
||||||
|
|
||||||
# After installation simply use the provided alias to rebuild
|
# After installation simply use the provided alias to rebuild
|
||||||
vai
|
vai
|
||||||
@@ -55,5 +56,3 @@ Stuff that I would like to automate, but have not found a way/time
|
|||||||
- surfshark
|
- surfshark
|
||||||
- ublock origin
|
- ublock origin
|
||||||
- vimium
|
- vimium
|
||||||
|
|
||||||
|
|
||||||
|
4
cask.nix
4
cask.nix
@@ -18,15 +18,17 @@
|
|||||||
"docker-desktop"
|
"docker-desktop"
|
||||||
"sloth"
|
"sloth"
|
||||||
"vscodium"
|
"vscodium"
|
||||||
"bruno"
|
"visual-studio-code"
|
||||||
"utm"
|
"utm"
|
||||||
"balenaetcher"
|
"balenaetcher"
|
||||||
"outerbase-studio"
|
"outerbase-studio"
|
||||||
|
"hoppscotch"
|
||||||
|
|
||||||
# Base
|
# Base
|
||||||
"obsidian"
|
"obsidian"
|
||||||
"figma"
|
"figma"
|
||||||
"zen"
|
"zen"
|
||||||
|
"ungoogled-chromium"
|
||||||
"bitwarden"
|
"bitwarden"
|
||||||
"spotify"
|
"spotify"
|
||||||
"slack"
|
"slack"
|
||||||
|
@@ -6,8 +6,11 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# nix.enable = false;
|
nix.settings = {
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
|
substituters = [ "https://devenv.cachix.org" ];
|
||||||
|
trusted-public-keys = [ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" ];
|
||||||
|
};
|
||||||
|
|
||||||
# Set Git commit hash for darwin-version.
|
# Set Git commit hash for darwin-version.
|
||||||
system.configurationRevision = flake.rev or flake.dirtyRev or null;
|
system.configurationRevision = flake.rev or flake.dirtyRev or null;
|
||||||
@@ -37,7 +40,7 @@
|
|||||||
persistent-apps = [
|
persistent-apps = [
|
||||||
"/Applications/Zen.app"
|
"/Applications/Zen.app"
|
||||||
"/Applications/Ghostty.app"
|
"/Applications/Ghostty.app"
|
||||||
"/Applications/VSCodium.app"
|
"/Applications/Visual Studio Code.app"
|
||||||
"/Applications/Spotify.app"
|
"/Applications/Spotify.app"
|
||||||
"/System/Applications/System Settings.app"
|
"/System/Applications/System Settings.app"
|
||||||
];
|
];
|
||||||
|
@@ -4,9 +4,12 @@
|
|||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
required = true
|
required = true
|
||||||
[core]
|
[core]
|
||||||
|
pager = delta
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
ignorecase=false
|
ignorecase=false
|
||||||
|
[interactive]
|
||||||
|
diffFilter = delta --color-only
|
||||||
|
|
||||||
[pull]
|
[pull]
|
||||||
rebase = false
|
rebase = false
|
||||||
@@ -27,3 +30,6 @@
|
|||||||
|
|
||||||
[include]
|
[include]
|
||||||
path = ~/.gitconfig.local
|
path = ~/.gitconfig.local
|
||||||
|
|
||||||
|
[delta]
|
||||||
|
navigate = true
|
||||||
|
18
flake.lock
generated
18
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751473516,
|
"lastModified": 1756579987,
|
||||||
"narHash": "sha256-nJFR4f4hh879Mm7ne4SaUihxQAwu1FdnRCaA/8pHc1k=",
|
"narHash": "sha256-duCce8zGsaMsrqqOmLOsuaV1PVIw/vXWnKuLKZClsGg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "bafcf336870c9daca80df1c4a09ef926fc497016",
|
"rev": "99a69bdf8a3c6bf038c4121e9c4b6e99706a187a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751313918,
|
"lastModified": 1755825449,
|
||||||
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -42,11 +42,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751382304,
|
"lastModified": 1756536218,
|
||||||
"narHash": "sha256-p+UruOjULI5lV16FkBqkzqgFasLqfx0bihLBeFHiZAs=",
|
"narHash": "sha256-ynQxPVN2FIPheUgTFhv01gYLbaiSOS7NgWJPm9LF9D0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d31a91c9b3bee464d054633d5f8b84e17a637862",
|
"rev": "a918bb3594dd243c2f8534b3be01b3cb4ed35fd1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@@ -32,6 +32,9 @@
|
|||||||
flake = self;
|
flake = self;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ (import ./overlay.nix) ];
|
||||||
|
}
|
||||||
(import ./darwin.nix)
|
(import ./darwin.nix)
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
|
@@ -42,6 +42,7 @@
|
|||||||
l = "eza -a1lh";
|
l = "eza -a1lh";
|
||||||
ls = "eza";
|
ls = "eza";
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
|
cd = "z";
|
||||||
|
|
||||||
# QOL
|
# QOL
|
||||||
dc = "docker compose";
|
dc = "docker compose";
|
||||||
@@ -52,6 +53,9 @@
|
|||||||
d = "lazydocker";
|
d = "lazydocker";
|
||||||
p = "pnpm";
|
p = "pnpm";
|
||||||
px = "pnpm -s dlx";
|
px = "pnpm -s dlx";
|
||||||
|
n = "fnm use --install-if-missing";
|
||||||
|
c = "pwd | pbcopy";
|
||||||
|
k = "kubectl";
|
||||||
|
|
||||||
vai = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
|
vai = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
|
||||||
};
|
};
|
||||||
@@ -70,6 +74,9 @@
|
|||||||
if type -q fnm
|
if type -q fnm
|
||||||
fnm env --use-on-cd | source
|
fnm env --use-on-cd | source
|
||||||
end
|
end
|
||||||
|
if type -q nvs
|
||||||
|
nvs env --source | source
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
bash = {
|
bash = {
|
||||||
|
@@ -20,6 +20,7 @@ with pkgs;
|
|||||||
woff2
|
woff2
|
||||||
rsync
|
rsync
|
||||||
yq
|
yq
|
||||||
|
delta
|
||||||
|
|
||||||
# Rust utils
|
# Rust utils
|
||||||
bat
|
bat
|
||||||
@@ -40,8 +41,13 @@ with pkgs;
|
|||||||
colima
|
colima
|
||||||
lazydocker
|
lazydocker
|
||||||
exercism
|
exercism
|
||||||
|
posting
|
||||||
|
terraform
|
||||||
|
k9s
|
||||||
|
kubectl
|
||||||
|
|
||||||
# Editor
|
# Editor
|
||||||
|
nvs
|
||||||
neovim
|
neovim
|
||||||
fzf
|
fzf
|
||||||
lazygit
|
lazygit
|
||||||
@@ -65,4 +71,5 @@ with pkgs;
|
|||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
|
karla
|
||||||
]
|
]
|
||||||
|
@@ -7,12 +7,9 @@
|
|||||||
extras = {
|
extras = {
|
||||||
casks = [
|
casks = [
|
||||||
"surfshark"
|
"surfshark"
|
||||||
"raspberry-pi-imager"
|
|
||||||
"visual-studio-code"
|
"visual-studio-code"
|
||||||
"signal"
|
"signal"
|
||||||
"discord"
|
"discord"
|
||||||
"vlc"
|
|
||||||
"handbrake"
|
|
||||||
"daisydisk"
|
"daisydisk"
|
||||||
"blender"
|
"blender"
|
||||||
"bambu-studio"
|
"bambu-studio"
|
||||||
@@ -22,6 +19,7 @@
|
|||||||
biome
|
biome
|
||||||
infisical
|
infisical
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
pulumi
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,19 @@
|
|||||||
pkgs: with pkgs; [
|
pkgs: with pkgs; [
|
||||||
mkcert
|
mkcert
|
||||||
dnsmasq
|
dnsmasq
|
||||||
|
awscli2
|
||||||
|
mysql84
|
||||||
|
cocoapods
|
||||||
|
xcodes
|
||||||
|
|
||||||
|
# For projects
|
||||||
|
pixman
|
||||||
|
pkg-config
|
||||||
|
pango
|
||||||
|
libpng
|
||||||
|
giflib
|
||||||
|
librsvg
|
||||||
|
python313Packages.setuptools
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
27
overlay.nix
Normal file
27
overlay.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
final: prev: {
|
||||||
|
nvs = prev.buildGoModule rec {
|
||||||
|
pname = "nvs";
|
||||||
|
version = "1.10.5";
|
||||||
|
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "cupcakearmy";
|
||||||
|
repo = pname;
|
||||||
|
# tag = "v${version}";
|
||||||
|
rev = "1700f2751e969b77b7f7ab3cc16a4e0f3955ce14";
|
||||||
|
sha256 = "sha256-RScXYxkrfLJp1nAgN2YgSRC4mLGK4yXsYjGBrDR00b8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-l2FdnXA+vKVRekcIKt1R+MxppraTsmo0b/B7RNqnxjA=";
|
||||||
|
|
||||||
|
# Completions
|
||||||
|
nativeBuildInputs = [ prev.installShellFiles ];
|
||||||
|
postInstall = ''
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
installShellCompletion --cmd nvs \
|
||||||
|
--bash <($out/bin/nvs completion bash) \
|
||||||
|
--fish <($out/bin/nvs completion fish) \
|
||||||
|
--zsh <($out/bin/nvs completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user