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
|
||||
# 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
|
||||
|
||||
# Install brew [for casks]
|
||||
@@ -19,7 +20,7 @@ git-crypt unlock .key
|
||||
|
||||
# Installation
|
||||
# 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
|
||||
vai
|
||||
@@ -55,5 +56,3 @@ Stuff that I would like to automate, but have not found a way/time
|
||||
- surfshark
|
||||
- ublock origin
|
||||
- vimium
|
||||
|
||||
|
||||
|
4
cask.nix
4
cask.nix
@@ -18,15 +18,17 @@
|
||||
"docker-desktop"
|
||||
"sloth"
|
||||
"vscodium"
|
||||
"bruno"
|
||||
"visual-studio-code"
|
||||
"utm"
|
||||
"balenaetcher"
|
||||
"outerbase-studio"
|
||||
"hoppscotch"
|
||||
|
||||
# Base
|
||||
"obsidian"
|
||||
"figma"
|
||||
"zen"
|
||||
"ungoogled-chromium"
|
||||
"bitwarden"
|
||||
"spotify"
|
||||
"slack"
|
||||
|
@@ -6,8 +6,11 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
# nix.enable = false;
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
nix.settings = {
|
||||
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.
|
||||
system.configurationRevision = flake.rev or flake.dirtyRev or null;
|
||||
@@ -37,7 +40,7 @@
|
||||
persistent-apps = [
|
||||
"/Applications/Zen.app"
|
||||
"/Applications/Ghostty.app"
|
||||
"/Applications/VSCodium.app"
|
||||
"/Applications/Visual Studio Code.app"
|
||||
"/Applications/Spotify.app"
|
||||
"/System/Applications/System Settings.app"
|
||||
];
|
||||
|
@@ -4,9 +4,12 @@
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[core]
|
||||
pager = delta
|
||||
excludesfile = ~/.gitignore_global
|
||||
autocrlf = input
|
||||
ignorecase=false
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[pull]
|
||||
rebase = false
|
||||
@@ -27,3 +30,6 @@
|
||||
|
||||
[include]
|
||||
path = ~/.gitconfig.local
|
||||
|
||||
[delta]
|
||||
navigate = true
|
||||
|
18
flake.lock
generated
18
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751473516,
|
||||
"narHash": "sha256-nJFR4f4hh879Mm7ne4SaUihxQAwu1FdnRCaA/8pHc1k=",
|
||||
"lastModified": 1756579987,
|
||||
"narHash": "sha256-duCce8zGsaMsrqqOmLOsuaV1PVIw/vXWnKuLKZClsGg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "bafcf336870c9daca80df1c4a09ef926fc497016",
|
||||
"rev": "99a69bdf8a3c6bf038c4121e9c4b6e99706a187a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -27,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751313918,
|
||||
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
||||
"lastModified": 1755825449,
|
||||
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
||||
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -42,11 +42,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1751382304,
|
||||
"narHash": "sha256-p+UruOjULI5lV16FkBqkzqgFasLqfx0bihLBeFHiZAs=",
|
||||
"lastModified": 1756536218,
|
||||
"narHash": "sha256-ynQxPVN2FIPheUgTFhv01gYLbaiSOS7NgWJPm9LF9D0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d31a91c9b3bee464d054633d5f8b84e17a637862",
|
||||
"rev": "a918bb3594dd243c2f8534b3be01b3cb4ed35fd1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@@ -32,6 +32,9 @@
|
||||
flake = self;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = [ (import ./overlay.nix) ];
|
||||
}
|
||||
(import ./darwin.nix)
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
|
@@ -42,6 +42,7 @@
|
||||
l = "eza -a1lh";
|
||||
ls = "eza";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
|
||||
# QOL
|
||||
dc = "docker compose";
|
||||
@@ -52,6 +53,9 @@
|
||||
d = "lazydocker";
|
||||
p = "pnpm";
|
||||
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}";
|
||||
};
|
||||
@@ -70,6 +74,9 @@
|
||||
if type -q fnm
|
||||
fnm env --use-on-cd | source
|
||||
end
|
||||
if type -q nvs
|
||||
nvs env --source | source
|
||||
end
|
||||
'';
|
||||
};
|
||||
bash = {
|
||||
|
@@ -20,6 +20,7 @@ with pkgs;
|
||||
woff2
|
||||
rsync
|
||||
yq
|
||||
delta
|
||||
|
||||
# Rust utils
|
||||
bat
|
||||
@@ -40,8 +41,13 @@ with pkgs;
|
||||
colima
|
||||
lazydocker
|
||||
exercism
|
||||
posting
|
||||
terraform
|
||||
k9s
|
||||
kubectl
|
||||
|
||||
# Editor
|
||||
nvs
|
||||
neovim
|
||||
fzf
|
||||
lazygit
|
||||
@@ -65,4 +71,5 @@ with pkgs;
|
||||
|
||||
# Fonts
|
||||
nerd-fonts.jetbrains-mono
|
||||
karla
|
||||
]
|
||||
|
@@ -7,12 +7,9 @@
|
||||
extras = {
|
||||
casks = [
|
||||
"surfshark"
|
||||
"raspberry-pi-imager"
|
||||
"visual-studio-code"
|
||||
"signal"
|
||||
"discord"
|
||||
"vlc"
|
||||
"handbrake"
|
||||
"daisydisk"
|
||||
"blender"
|
||||
"bambu-studio"
|
||||
@@ -22,6 +19,7 @@
|
||||
biome
|
||||
infisical
|
||||
ffmpeg
|
||||
pulumi
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -15,6 +15,19 @@
|
||||
pkgs: with pkgs; [
|
||||
mkcert
|
||||
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