mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2026-05-26 13:55:25 +00:00
Compare commits
25 Commits
main
..
4c0a3b5794
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c0a3b5794 | |||
| f61d7eff44 | |||
| ce8dfa8ca9 | |||
| 7000d01f6b | |||
| 84b5e059b9 | |||
| 5a8ffc855a | |||
| f9ca5a8461 | |||
| 0783fe9244 | |||
| 69e65afcf6 | |||
| 4f4ea06219 | |||
| cd4a3e0dd1 | |||
| b05c52dd0a | |||
| 5527e3284b | |||
| 0cb436f5c3 | |||
| 5b9da5812d | |||
| 49f5c8447d | |||
| 1bd9497b1b | |||
| 8d257bdf08 | |||
| a1ab5a5a27 | |||
| f1bebdcb4e | |||
| 5090638625 | |||
| 90bd763b13 | |||
| f5dfcecb7d | |||
| e0a1f04b0f | |||
| 0e6ea24079 |
@@ -1 +0,0 @@
|
||||
secrets/** filter=git-crypt diff=git-crypt
|
||||
@@ -1 +0,0 @@
|
||||
.key*
|
||||
@@ -1,80 +1,17 @@
|
||||
# Dotfiles with Nix on macOS
|
||||
|
||||
<!--toc:start-->
|
||||
|
||||
- [Dotfiles with Nix on macOS](#dotfiles-with-nix-on-macos)
|
||||
- [Installation](#installation)
|
||||
- [Documentation](#documentation)
|
||||
- [Crypt](#crypt)
|
||||
- [CLI](#cli)
|
||||
- [TODO](#todo)
|
||||
<!--toc:end-->
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Install nix
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate
|
||||
# Install nix [without the --determinate flag]
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||
|
||||
# Install brew [for casks]
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
|
||||
# Get repo
|
||||
git clone https://github.com/cupcakearmy/nix-macos ~/.config/dotfiles
|
||||
|
||||
# Unlock (Given that the base64 key is in your clipboard)
|
||||
nix shell nixpkgs#git nixpkgs#git-crypt nixpkgs#coreutils
|
||||
pbpaste | base64 --decode > .key
|
||||
git-crypt unlock .key
|
||||
git clone https://github.com/cupcakearmy/nix-macos ~/.config/nix-darwin
|
||||
|
||||
# Installation
|
||||
# Available hosts can be found in the ./hosts directory
|
||||
sudo nix run nix-darwin -- switch --flake ~/.config/dotfiles#<host>
|
||||
|
||||
# After installation simply use the provided alias to rebuild
|
||||
vai
|
||||
nix run nix-darwin -- switch --flake ~/.config/nix-darwin#mbp
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
- [nix-darwin](https://daiderd.com/nix-darwin/manual/index.html)
|
||||
|
||||
## Crypt
|
||||
|
||||
Files under `secrets` are encrypted using `git-crypt`.
|
||||
|
||||
```bash
|
||||
# Save the key, when the repo is unlocked
|
||||
git-crypt export-key - | base64 > .key.b64
|
||||
|
||||
# Decode (Given the base64 key is written to .key.b64)
|
||||
cat .key.b64 | base64 --decode > .key
|
||||
git-crypt unlock .key
|
||||
```
|
||||
|
||||
## CLI
|
||||
|
||||
The repo also includes a setup that I use on servers which is a toned down version. It lives under `./cli`.
|
||||
|
||||
```bash
|
||||
# Install nix & the CLI
|
||||
curl -sSL https://raw.githubusercontent.com/cupcakearmy/nix/refs/heads/main/cli/install.sh | bash
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
Stuff that I would like to automate, but have not found a way/time
|
||||
|
||||
- Disable the default Spotlight keyboard shortcut. For now manually go to Settings -> Keyboard Shortcuts -> Spotlight -> Untick
|
||||
- `chsh -s /run/current-system/sw/bin/fish`
|
||||
- vscodium settings (download `zokugun.sync-settings` -> open repository settings -> paste secrets/configs/vscodium-sync.yaml -> download config)
|
||||
- browser extensions
|
||||
- bitwarden
|
||||
- canvas blocker
|
||||
- surfshark
|
||||
- ublock origin
|
||||
- vimium
|
||||
|
||||
@@ -1,37 +1,40 @@
|
||||
[
|
||||
# Objective See
|
||||
"knockknock"
|
||||
"lulu"
|
||||
"oversight"
|
||||
|
||||
# Utility
|
||||
"aldente"
|
||||
"alt-tab"
|
||||
"keka"
|
||||
"jordanbaird-ice"
|
||||
"keycastr"
|
||||
"raycast"
|
||||
"ghostty"
|
||||
"lihaoyun6/tap/quickrecorder"
|
||||
"iina"
|
||||
"shutter-encoder"
|
||||
|
||||
# Dev
|
||||
"docker"
|
||||
"sloth"
|
||||
"vscodium"
|
||||
"visual-studio-code"
|
||||
"hoppscotch"
|
||||
"tailscale"
|
||||
"utm"
|
||||
"bruno"
|
||||
"zed"
|
||||
|
||||
|
||||
# Base
|
||||
"obsidian"
|
||||
# Apps
|
||||
"figma"
|
||||
"zen"
|
||||
"ungoogled-chromium"
|
||||
"arc"
|
||||
"zen-browser"
|
||||
"bitwarden"
|
||||
"spotify"
|
||||
"vlc"
|
||||
"slack"
|
||||
"yubico-authenticator"
|
||||
"suspicious-package"
|
||||
"mediahuman-audio-converter"
|
||||
"imageoptim"
|
||||
"appcleaner"
|
||||
"daisydisk"
|
||||
"discord"
|
||||
"signal"
|
||||
"vlc"
|
||||
]
|
||||
|
||||
Generated
-48
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774715571,
|
||||
"narHash": "sha256-MMjHif46sc/iLF9JqxBhFaueSPRcjPeP9AiujERH6N0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "557f5e38ce94ef0f02f05de7ae65057d4b2a89a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1774386573,
|
||||
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
description = "Server Shell";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
let
|
||||
profiles = import ./profiles.nix;
|
||||
in
|
||||
{
|
||||
homeConfigurations = nixpkgs.lib.genAttrs (builtins.map (p: p.name) profiles) (
|
||||
profile:
|
||||
let
|
||||
p = (nixpkgs.lib.findFirst (p: p.name == profile) null profiles);
|
||||
system = p.architecture;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [ ./home.nix ];
|
||||
|
||||
extraSpecialArgs = {
|
||||
username = p.username;
|
||||
homeDirectory = p.homeDirectory;
|
||||
name = p.name;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
name,
|
||||
homeDirectory,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
common = (import ../common/home.nix) { inherit pkgs; };
|
||||
overwrite = {
|
||||
home.username = username;
|
||||
home.homeDirectory = homeDirectory;
|
||||
home = {
|
||||
shellAliases = {
|
||||
hm = "nix run home-manager/master -- switch --flake github:cupcakearmy/nix?dir=cli#${name} -b backup";
|
||||
};
|
||||
# Lists are not recursively updated, need to do by hand
|
||||
packages = common.home.packages ++ [ ];
|
||||
};
|
||||
};
|
||||
merged = lib.recursiveUpdate common overwrite;
|
||||
in
|
||||
merged
|
||||
@@ -1,87 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "=== Nix Home Manager Setup ==="
|
||||
echo
|
||||
|
||||
# Check if Nix is installed
|
||||
if ! command -v nix &>/dev/null; then
|
||||
echo "Nix is not installed. Installing Nix..."
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate
|
||||
|
||||
# Source nix profile
|
||||
if [ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
fi
|
||||
|
||||
echo "Nix installed successfully!"
|
||||
echo
|
||||
else
|
||||
echo "Nix is already installed."
|
||||
echo
|
||||
fi
|
||||
|
||||
# Detect architecture
|
||||
ARCH=$(uname -m)
|
||||
case "$ARCH" in
|
||||
x86_64)
|
||||
ARCH_NAME="x86"
|
||||
;;
|
||||
aarch64 | arm64)
|
||||
ARCH_NAME="arm"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: $ARCH"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Detect OS
|
||||
OS=$(uname -s)
|
||||
case "$OS" in
|
||||
Linux)
|
||||
OS_NAME="linux"
|
||||
;;
|
||||
Darwin)
|
||||
OS_NAME="darwin"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported OS: $OS"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Detected: $ARCH_NAME / $OS_NAME"
|
||||
echo
|
||||
|
||||
# Clear any remaining input and prompt for user
|
||||
read -t 0.1 -n 10000 discard 2>/dev/null || true
|
||||
echo "Select user:"
|
||||
echo "1) root"
|
||||
read -p "Enter choice [1]: " USER_CHOICE
|
||||
USER_CHOICE=${USER_CHOICE:-1}
|
||||
|
||||
case "$USER_CHOICE" in
|
||||
1)
|
||||
USER_NAME="root"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid choice. Defaulting to root."
|
||||
USER_NAME="root"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Build flake configuration name
|
||||
FLAKE_CONFIG="${USER_NAME}_${ARCH_NAME}_${OS_NAME}"
|
||||
|
||||
echo
|
||||
echo "Configuration: $FLAKE_CONFIG"
|
||||
echo "Running Home Manager..."
|
||||
echo
|
||||
|
||||
# Run home-manager
|
||||
nix run home-manager/master -- switch --flake "github:cupcakearmy/nix?dir=cli#${FLAKE_CONFIG}" -b backup
|
||||
|
||||
echo
|
||||
echo "=== Setup complete! ==="
|
||||
@@ -1,26 +0,0 @@
|
||||
[
|
||||
{
|
||||
name = "root_x86_linux";
|
||||
username = "root";
|
||||
architecture = "x86_64-linux";
|
||||
homeDirectory = "/root";
|
||||
}
|
||||
{
|
||||
name = "root_x86_macos";
|
||||
username = "root";
|
||||
architecture = "x86_64-darwin";
|
||||
homeDirectory = "/root";
|
||||
}
|
||||
{
|
||||
name = "root_arm_linux";
|
||||
username = "root";
|
||||
architecture = "aarch64-linux";
|
||||
homeDirectory = "/root";
|
||||
}
|
||||
{
|
||||
name = "root_arm_macos";
|
||||
username = "root";
|
||||
architecture = "aarch64-darwin";
|
||||
homeDirectory = "/root";
|
||||
}
|
||||
]
|
||||
-136
@@ -1,136 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Base
|
||||
tmux
|
||||
git
|
||||
git-lfs
|
||||
git-crypt
|
||||
gnutar
|
||||
gnupg
|
||||
htop
|
||||
btop
|
||||
rclone
|
||||
rename
|
||||
tree
|
||||
wget
|
||||
rsync
|
||||
moreutils
|
||||
jq
|
||||
yq-go
|
||||
kubectl
|
||||
croc
|
||||
asciinema_3
|
||||
grex
|
||||
mise
|
||||
|
||||
# Rust utils
|
||||
bat
|
||||
eza
|
||||
fd
|
||||
ripgrep
|
||||
ripgrep-all
|
||||
zoxide
|
||||
uutils-coreutils-noprefix
|
||||
dust
|
||||
yazi
|
||||
starship
|
||||
ouch
|
||||
difftastic
|
||||
|
||||
# TUI
|
||||
lazydocker
|
||||
lazygit
|
||||
k9s
|
||||
|
||||
# Editor
|
||||
neovim
|
||||
fzf
|
||||
|
||||
# Fonts
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
# Rust re-maps
|
||||
l = "eza -a1lh";
|
||||
ls = "eza";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
cdi = "zi";
|
||||
|
||||
# QOL
|
||||
dc = "docker compose";
|
||||
dcl = "dc logs -f";
|
||||
dclt = "dcl --tail 100";
|
||||
dcln = "dcl --since 1m";
|
||||
rsync = "rsync -az --info=progress2";
|
||||
t = "tmux new-session -A -s main";
|
||||
e = "nvim";
|
||||
g = "lazygit";
|
||||
d = "lazydocker";
|
||||
k = "kubectl";
|
||||
colima-start = "colima start --cpu 4 --memory 8 --vm-type=vz --vz-rosetta";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
direnv.enable = true;
|
||||
zoxide.enable = true;
|
||||
|
||||
fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
if type -q starship
|
||||
starship init fish | source
|
||||
end
|
||||
if type -q fnm
|
||||
fnm env --use-on-cd | source
|
||||
end
|
||||
if type -q nvs
|
||||
nvs env --source | source
|
||||
end
|
||||
if type -q mise
|
||||
mise activate fish | source
|
||||
end
|
||||
'';
|
||||
};
|
||||
bash = {
|
||||
enable = true;
|
||||
};
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
mouse = true;
|
||||
extraConfig = ''
|
||||
# switch panes using Alt-arrow without prefix
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# switch panes using jkhl
|
||||
bind h select-pane -L
|
||||
bind l select-pane -R
|
||||
bind j select-pane -U
|
||||
bind k select-pane -D
|
||||
'';
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
terminal = "tmux-256color";
|
||||
};
|
||||
};
|
||||
}
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
host,
|
||||
flake,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix.enable = false;
|
||||
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;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 5;
|
||||
nixpkgs.hostPlatform = host.platform;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Nix Darwin
|
||||
# https://daiderd.com/nix-darwin/manual/index.html
|
||||
|
||||
system.primaryUser = host.username;
|
||||
|
||||
system.defaults = {
|
||||
# Security
|
||||
screensaver.askForPassword = true;
|
||||
screensaver.askForPasswordDelay = 0;
|
||||
loginwindow.GuestEnabled = false;
|
||||
|
||||
# Dock
|
||||
dock = {
|
||||
autohide = true;
|
||||
orientation = "left";
|
||||
show-recents = false;
|
||||
persistent-apps = [
|
||||
"/Applications/Zen.app"
|
||||
"/Applications/Ghostty.app"
|
||||
"/Applications/Zed.app"
|
||||
"/Applications/Spotify.app"
|
||||
];
|
||||
persistent-others = [ ];
|
||||
};
|
||||
|
||||
# Finder
|
||||
finder = {
|
||||
AppleShowAllExtensions = true;
|
||||
ShowPathbar = true;
|
||||
};
|
||||
|
||||
# Trackpad
|
||||
NSGlobalDomain = {
|
||||
InitialKeyRepeat = 25;
|
||||
KeyRepeat = 2;
|
||||
"com.apple.mouse.tapBehavior" = 1;
|
||||
"com.apple.trackpad.scaling" = 0.875;
|
||||
};
|
||||
trackpad = {
|
||||
Dragging = true;
|
||||
Clicking = true;
|
||||
TrackpadRightClick = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Input devices
|
||||
system.keyboard = {
|
||||
enableKeyMapping = true;
|
||||
remapCapsLockToEscape = true;
|
||||
};
|
||||
|
||||
# Power
|
||||
power = {
|
||||
sleep = {
|
||||
computer = "never";
|
||||
};
|
||||
};
|
||||
|
||||
# Other
|
||||
system.startup.chime = false;
|
||||
|
||||
users.users.${host.username} = {
|
||||
home = "/Users/${host.username}";
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
programs.fish.enable = true;
|
||||
environment.shells = [ pkgs.fish ];
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
casks = (import ./cask.nix) ++ (lib.attrByPath [ "extras" "casks" ] [ ] host);
|
||||
taps = [ "lihaoyun6/tap" ];
|
||||
global = {
|
||||
autoUpdate = true;
|
||||
};
|
||||
onActivation = {
|
||||
autoUpdate = true;
|
||||
upgrade = true;
|
||||
cleanup = "zap";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
font-family = "JetBrainsMono Nerd Font"
|
||||
quit-after-last-window-closed=true
|
||||
theme = "dark:Rose Pine,light:Rose Pine Dawn"
|
||||
theme = "rose-pine"
|
||||
window-save-state = "always"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
[user]
|
||||
name = cupcakearmy
|
||||
email = hi@nicco.io
|
||||
signingkey = 3235314B4D31232F
|
||||
@@ -0,0 +1,4 @@
|
||||
[user]
|
||||
name = Niccolo Borgioli
|
||||
email = hi@nicco.io
|
||||
signingkey = 4897ACD13A65977C
|
||||
+9
-14
@@ -7,26 +7,21 @@
|
||||
excludesfile = ~/.gitignore_global
|
||||
autocrlf = input
|
||||
ignorecase=false
|
||||
[commit]
|
||||
gpgsign = false
|
||||
|
||||
[includeIf "gitdir:/Users/nicco/"]
|
||||
path = "~/.dotfiles/files/git/config.personal"
|
||||
|
||||
[includeIf "gitdir:/Users/niccoloborgioli/"]
|
||||
path = "~/.dotfiles/files/git/config.work"
|
||||
|
||||
[pull]
|
||||
rebase = false
|
||||
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
[branch]
|
||||
sort = -committerdate
|
||||
[alias]
|
||||
fpush = push --force-with-lease
|
||||
|
||||
# Signing
|
||||
[tag]
|
||||
gpgsign = true
|
||||
[commit]
|
||||
gpgsign = true
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[include]
|
||||
path = ~/.gitconfig.local
|
||||
|
||||
[diff]
|
||||
external = difft
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
gui:
|
||||
returnImmediately: true
|
||||
|
||||
customCommands:
|
||||
containers:
|
||||
- name: "spawn sh"
|
||||
attach: true
|
||||
command: 'docker run -it --rm {{ .Container.ID }} sh'
|
||||
- name: "spawn ash"
|
||||
attach: true
|
||||
command: 'docker run -it --rm {{ .Container.ID }} ash'
|
||||
- name: "spawn bash"
|
||||
attach: true
|
||||
command: 'docker run -it --rm {{ .Container.ID }} bash'
|
||||
@@ -1,5 +0,0 @@
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json
|
||||
|
||||
git:
|
||||
pagers:
|
||||
- externalDiffCommand: difft --color=always
|
||||
@@ -24,9 +24,8 @@
|
||||
"lazyvim.plugins.extras.util.dot",
|
||||
"lazyvim.plugins.extras.util.startuptime"
|
||||
],
|
||||
"install_version": 7,
|
||||
"news": {
|
||||
"NEWS.md": "11866"
|
||||
"NEWS.md": "7429"
|
||||
},
|
||||
"version": 8
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
Executable
BIN
Binary file not shown.
@@ -0,0 +1,106 @@
|
||||
[
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 209,
|
||||
"end": 259,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.03,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.03,
|
||||
"curve": "easeInQuart"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Main",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.75,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.2,
|
||||
"curve": "linear"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Error",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 60,
|
||||
"end": 70,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.75,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.2,
|
||||
"curve": "linear"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Warning",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 122,
|
||||
"end": 146,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.75,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.2,
|
||||
"curve": "linear"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Success",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
import color from '@k-vyn/coloralgorithm'
|
||||
import colors from './colors.json' assert { type: 'json' }
|
||||
import fs from 'fs'
|
||||
import yaml from 'yaml'
|
||||
|
||||
const offset = 10
|
||||
const palette = {}
|
||||
for (const { properties, options } of colors) {
|
||||
const result = color.generate(properties, options)
|
||||
const name = result[0].name
|
||||
for (const color of result[0].colors) {
|
||||
palette[`${name.toLowerCase()}-${color.step * offset}`] = color.hex
|
||||
}
|
||||
}
|
||||
|
||||
const configFile = '../main.omp.yaml'
|
||||
const config = fs.readFileSync(configFile, 'utf8')
|
||||
// config.palette = palette
|
||||
const output = yaml.stringify({ palette })
|
||||
|
||||
fs.writeFileSync(configFile, config.replace(/palette:(.|\s)*$/, output))
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@k-vyn/coloralgorithm": "^1.0.0",
|
||||
"yaml": "^2.2.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||
|
||||
palette:
|
||||
error-0: '#ff4040'
|
||||
error-10: '#e23629'
|
||||
error-15: '#d33220'
|
||||
error-20: '#c52e18'
|
||||
error-30: '#a8280d'
|
||||
error-40: '#8a2106'
|
||||
error-5: '#f03a34'
|
||||
error-50: '#6d1b02'
|
||||
error-60: '#501401'
|
||||
error-70: '#330d00'
|
||||
main-0: '#f7fbff'
|
||||
main-10: '#b4cafd'
|
||||
main-15: '#95a9fc'
|
||||
main-20: '#7783fa'
|
||||
main-30: '#5348f4'
|
||||
main-40: '#4826e8'
|
||||
main-5: '#d6e6fe'
|
||||
main-50: '#3e10ca'
|
||||
main-60: '#22036e'
|
||||
main-70: '#020008'
|
||||
success-0: '#40ff46'
|
||||
success-10: '#29e243'
|
||||
success-15: '#20d342'
|
||||
success-20: '#18c541'
|
||||
success-30: '#0da83d'
|
||||
success-40: '#068a36'
|
||||
success-5: '#34f044'
|
||||
success-50: '#026d2d'
|
||||
success-60: '#015022'
|
||||
success-70: '#003316'
|
||||
warning-0: '#ffff40'
|
||||
warning-10: '#dae229'
|
||||
warning-15: '#c8d320'
|
||||
warning-20: '#b6c518'
|
||||
warning-30: '#96a80d'
|
||||
warning-40: '#788a06'
|
||||
warning-5: '#ecf034'
|
||||
warning-50: '#5d6d02'
|
||||
warning-60: '#435001'
|
||||
warning-70: '#2a3300'
|
||||
blocks:
|
||||
- type: prompt
|
||||
alignment: left
|
||||
segments:
|
||||
- leading_diamond:
|
||||
foreground: p:main-70
|
||||
background: p:main-5
|
||||
type: os
|
||||
style: diamond
|
||||
- properties:
|
||||
style: full
|
||||
template: " \uf0e7 "
|
||||
foreground: p:main-70
|
||||
powerline_symbol:
|
||||
background: p:error-15
|
||||
type: root
|
||||
style: powerline
|
||||
- properties:
|
||||
style: full
|
||||
template: ' {{ .Path }} '
|
||||
foreground: p:main-0
|
||||
powerline_symbol:
|
||||
background: p:main-40
|
||||
type: path
|
||||
style: powerline
|
||||
- template: ' {{ .HEAD }} '
|
||||
foreground: p:main-70
|
||||
powerline_symbol:
|
||||
background: p:warning-10
|
||||
type: git
|
||||
style: powerline
|
||||
- type: prompt
|
||||
alignment: right
|
||||
segments:
|
||||
- leading_diamond:
|
||||
trailing_diamond:
|
||||
foreground: p:main-70
|
||||
background: p:main-10
|
||||
type: python
|
||||
style: dynamic
|
||||
- leading_diamond:
|
||||
trailing_diamond:
|
||||
foreground: p:main-70
|
||||
background: p:main-10
|
||||
type: go
|
||||
style: dynamic
|
||||
- leading_diamond:
|
||||
trailing_diamond:
|
||||
foreground: p:main-70
|
||||
background: p:main-10
|
||||
type: node
|
||||
style: dynamic
|
||||
- leading_diamond:
|
||||
trailing_diamond:
|
||||
template: '{{ .Context }}{{ if .Namespace }}::{{ .Namespace }}{{ end }}'
|
||||
foreground: p:main-70
|
||||
background: p:main-10
|
||||
type: kubectl
|
||||
style: dynamic
|
||||
- leading_diamond:
|
||||
trailing_diamond:
|
||||
template: '{{ .Icon }} {{ .Server }}'
|
||||
foreground: p:main-70
|
||||
background: p:main-10
|
||||
type: docker
|
||||
style: dynamic
|
||||
- leading_diamond:
|
||||
trailing_diamond:
|
||||
foreground: p:main-70
|
||||
background: p:main-10
|
||||
type: rust
|
||||
style: dynamic
|
||||
- leading_diamond:
|
||||
trailing_diamond:
|
||||
foreground: p:main-70
|
||||
background: p:main-10
|
||||
type: battery
|
||||
style: dynamic
|
||||
- properties:
|
||||
always_enabled: true
|
||||
leading_diamond:
|
||||
template: "{{ if gt .Code 0 }}\uf00d {{ .Code }} {{ .Meaning }}{{ else }}\uf42e{{ end }}"
|
||||
foreground: p:main-70
|
||||
type: status
|
||||
style: diamond
|
||||
background_templates:
|
||||
- '{{ if gt .Code 0 }}p:error-0{{ else }}p:main-10{{ end }}'
|
||||
- properties:
|
||||
always_enabled: true
|
||||
style: round
|
||||
foreground: p:main-70
|
||||
powerline_symbol:
|
||||
background: p:main-5
|
||||
type: executiontime
|
||||
style: powerline
|
||||
- properties:
|
||||
time_format: '15:04:05'
|
||||
template: ' {{ .CurrentDate | date .Format }} '
|
||||
foreground: p:main-70
|
||||
powerline_symbol:
|
||||
background: p:main-0
|
||||
type: time
|
||||
style: powerline
|
||||
- type: prompt
|
||||
alignment: left
|
||||
segments:
|
||||
- properties:
|
||||
always_enabled: true
|
||||
template: '❯ '
|
||||
foreground: p:main-15
|
||||
type: status
|
||||
style: plain
|
||||
foreground_templates:
|
||||
- '{{ if gt .Code 0 }}p:error-15{{ end }}'
|
||||
newline: true
|
||||
version: 3
|
||||
Generated
+9
-9
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779678629,
|
||||
"narHash": "sha256-gHcIFg0mm+KFsg7iZQt67kni3+qR5U3PhEC9P7vKlZ4=",
|
||||
"lastModified": 1737461688,
|
||||
"narHash": "sha256-zQCFe5FcSSGzY3qauAAHZcPt7Ej4WSGo78ShSTCSBvU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "612bbe3b405ad5f71d7bf9edecc04b678a061652",
|
||||
"rev": "bb14224f51ae4caed12a7b26f245d042c8cf8553",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -27,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779036909,
|
||||
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
|
||||
"lastModified": 1737423230,
|
||||
"narHash": "sha256-WEOiNmkcmlaeXy2HGW1PYxYmCPiHdsI7a7SpjhBYxRg=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "56c666e108467d87d13508936aade6d567f2a501",
|
||||
"rev": "46d0fa4ded0a7532f19870f9bbedaf62269fe3f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -42,11 +42,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1779536132,
|
||||
"narHash": "sha256-q+fF42iv/geEbHfgSzy3tS0FF/EyD6XTZ98E6yxiBO8=",
|
||||
"lastModified": 1737370608,
|
||||
"narHash": "sha256-hFA6SmioeqvGW/XvZa9bxniAeulksCOcj3kokdNT/YE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3d8f0f3f72a6cd4d93d0ad13203f2ea1cb7e1456",
|
||||
"rev": "300081d0cc72df578b02d914df941b8ec62240e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "Personal Nix configuration";
|
||||
description = "Example nix-darwin system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
@@ -12,40 +12,97 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
inputs@{
|
||||
self,
|
||||
nix-darwin,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
}:
|
||||
let
|
||||
hosts = import ./hosts;
|
||||
inherit (builtins) listToAttrs;
|
||||
configuration =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
# Set Git commit hash for darwin-version.
|
||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 5;
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Nix Darwin
|
||||
# https://daiderd.com/nix-darwin/manual/index.html
|
||||
environment.systemPackages = [ ];
|
||||
|
||||
# Security
|
||||
system.defaults.screensaver.askForPassword = true;
|
||||
system.defaults.screensaver.askForPasswordDelay = 0;
|
||||
system.defaults.loginwindow.GuestEnabled = false;
|
||||
|
||||
# Dock
|
||||
system.defaults.dock.autohide = true;
|
||||
system.defaults.dock.orientation = "left";
|
||||
system.defaults.dock.show-recents = false;
|
||||
system.defaults.dock.persistent-apps = [
|
||||
"/Applications/Arc.app"
|
||||
"/Applications/Ghostty.app"
|
||||
"/Applications/VSCodium.app"
|
||||
"/Applications/Spotify.app"
|
||||
"/System/Applications/System Settings.app"
|
||||
];
|
||||
system.defaults.dock.persistent-others = [ ];
|
||||
|
||||
# Input devices
|
||||
system.keyboard.enableKeyMapping = true;
|
||||
system.keyboard.remapCapsLockToEscape = true;
|
||||
system.defaults.NSGlobalDomain.InitialKeyRepeat = 25;
|
||||
system.defaults.NSGlobalDomain.KeyRepeat = 2;
|
||||
system.defaults.NSGlobalDomain."com.apple.mouse.tapBehavior" = 1;
|
||||
system.defaults.NSGlobalDomain."com.apple.trackpad.scaling" = 0.875;
|
||||
system.defaults.trackpad.Dragging = true;
|
||||
|
||||
# Finder
|
||||
system.defaults.finder.AppleShowAllExtensions = true;
|
||||
system.defaults.finder.ShowPathbar = true;
|
||||
|
||||
# Other
|
||||
system.startup.chime = false;
|
||||
|
||||
users.users."niccoloborgioli" = {
|
||||
home = "/Users/niccoloborgioli";
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
programs.fish.enable = true;
|
||||
|
||||
homebrew.enable = true;
|
||||
homebrew.casks = import ./cask.nix;
|
||||
homebrew.taps = [ "lihaoyun6/tap" ];
|
||||
homebrew.onActivation.autoUpdate = true;
|
||||
homebrew.onActivation.cleanup = "zap";
|
||||
|
||||
# Home Manager
|
||||
home-manager.backupFileExtension = "backup";
|
||||
};
|
||||
in
|
||||
{
|
||||
darwinConfigurations = listToAttrs (
|
||||
map (host: {
|
||||
name = host.hostName;
|
||||
value = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {
|
||||
inherit host;
|
||||
flake = self;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = [ (import ./overlay.nix) ];
|
||||
}
|
||||
(import ./darwin.nix)
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${host.username} = import ./home/home.nix { inherit host; };
|
||||
}
|
||||
];
|
||||
};
|
||||
}) hosts
|
||||
);
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake .#Niccolo-Borgioli-s-MacBook-Pro
|
||||
darwinConfigurations."mbp" = nix-darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
configuration
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.niccoloborgioli = import ./home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
darwinPackages = self.darwinConfigurations."mbp".pkgs;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# https://nix-community.github.io/home-manager
|
||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.username = "niccoloborgioli";
|
||||
home.homeDirectory = "/Users/niccoloborgioli";
|
||||
|
||||
home.packages = [
|
||||
pkgs.tmux
|
||||
pkgs.oh-my-posh
|
||||
pkgs.git
|
||||
pkgs.git-lfs
|
||||
pkgs.git-crypt
|
||||
pkgs.bfg-repo-cleaner
|
||||
pkgs.gnutar
|
||||
pkgs.gnupg
|
||||
pkgs.htop
|
||||
pkgs.rclone
|
||||
pkgs.rename
|
||||
pkgs.tmux
|
||||
pkgs.tree
|
||||
pkgs.wget
|
||||
pkgs.woff2
|
||||
pkgs.bat
|
||||
pkgs.rsync
|
||||
pkgs.direnv
|
||||
pkgs.zoxide
|
||||
pkgs.devenv
|
||||
#pkgs.bitwarden-cli
|
||||
|
||||
# Editor
|
||||
pkgs.neovim
|
||||
pkgs.fzf
|
||||
pkgs.lazygit
|
||||
pkgs.lua
|
||||
pkgs.luajitPackages.luarocks
|
||||
pkgs.ast-grep
|
||||
pkgs.ripgrep
|
||||
|
||||
# Language specific
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.fnm
|
||||
pkgs.bun
|
||||
pkgs.deno
|
||||
pkgs.zig
|
||||
pkgs.uv
|
||||
pkgs.ruff
|
||||
pkgs.tectonic
|
||||
pkgs.tex-fmt
|
||||
pkgs.rustup
|
||||
|
||||
# Codding
|
||||
pkgs.nixpacks
|
||||
|
||||
# sflx
|
||||
pkgs.vault
|
||||
pkgs.cocoapods
|
||||
pkgs.phrase-cli
|
||||
pkgs.boundary
|
||||
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".config/omp/config.yaml".source = ./files/omp/config.yaml;
|
||||
".config/ghostty/config".source = ./files/ghostty/config;
|
||||
".gitconfig".source = ./files/git/gitconfig;
|
||||
".gitignore_global".source = ./files/git/gitignore_global;
|
||||
".config/nvim".source = ./files/nvim;
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
l = "ls -hal";
|
||||
dc = "docker compose";
|
||||
rsync = "rsync -az --info=progress2";
|
||||
t = "tmux new-session -A -s main";
|
||||
e = "nvim";
|
||||
hms = "home-manager switch --flake ~/nix#root -b backup";
|
||||
snd = "darwin-rebuild switch --flake ~/.config/nix-darwin#mbp";
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
if type -q oh-my-posh
|
||||
oh-my-posh init fish --config ~/.config/omp/config.yaml | source
|
||||
end
|
||||
if type -q fnm
|
||||
fnm env --use-on-cd | source
|
||||
end
|
||||
if type -q direnv
|
||||
direnv hook fish | source
|
||||
end
|
||||
if type -q zoxide
|
||||
zoxide init fish | source
|
||||
end
|
||||
'';
|
||||
};
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
mouse = true;
|
||||
extraConfig = ''
|
||||
# switch panes using Alt-arrow without prefix
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# switch panes using jkhl
|
||||
bind h select-pane -L
|
||||
bind l select-pane -R
|
||||
bind j select-pane -U
|
||||
bind k select-pane -D
|
||||
'';
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
terminal = "tmux-256color";
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{ host }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
common = (import ../common/home.nix) { inherit pkgs; };
|
||||
overwrite = {
|
||||
home.username = host.username;
|
||||
home.homeDirectory = "/Users/${host.username}";
|
||||
|
||||
home.packages =
|
||||
common.home.packages
|
||||
++ (import ./pkgs.nix { inherit pkgs; })
|
||||
++ ((lib.attrByPath [ "extras" "pkgs" ] (pkgs: [ ]) host) pkgs);
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home = {
|
||||
|
||||
activation.zedConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p ~/.config
|
||||
if [ ! -L ~/.config/zed ]; then
|
||||
rm -rf ~/.config/zed
|
||||
ln -sf ~/.config/dotfiles/secrets/zed ~/.config/zed
|
||||
fi
|
||||
'';
|
||||
|
||||
file = {
|
||||
".config/ghostty/config".source = ../files/ghostty/config;
|
||||
".gitconfig".source = ../files/git/gitconfig;
|
||||
".gitignore_global".source = ../files/git/gitignore_global;
|
||||
".gitconfig.local".source = ../secrets/git/config.${host.hostName};
|
||||
".config/lazygit/config.yml".source = ../files/lazygit/config.yaml;
|
||||
".config/lazydocker/config.yml".source = ../files/lazydocker/config.yml;
|
||||
|
||||
# Secrets
|
||||
".ssh/config".text = builtins.replaceStrings [ "@SSH_KEY@" ] [ host.sshKey ] (
|
||||
builtins.readFile ../secrets/ssh/config.template
|
||||
);
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
p = "pnpm";
|
||||
px = "pnpm -s dlx";
|
||||
n = "fnm use --install-if-missing";
|
||||
c = "pwd | pbcopy";
|
||||
|
||||
vai = "sudo darwin-rebuild switch --flake ~/.config/dotfiles#${host.hostName}";
|
||||
clean = "nix-collect-garbage -d";
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
merged = lib.recursiveUpdate common overwrite;
|
||||
in
|
||||
merged
|
||||
@@ -1,38 +0,0 @@
|
||||
{ pkgs }:
|
||||
with pkgs;
|
||||
[
|
||||
# Base
|
||||
gh
|
||||
bfg-repo-cleaner
|
||||
woff2
|
||||
|
||||
# Dev
|
||||
devenv
|
||||
nixpacks
|
||||
posting
|
||||
opencode
|
||||
|
||||
# Editor
|
||||
nvs
|
||||
lua
|
||||
luajitPackages.luarocks
|
||||
ast-grep
|
||||
|
||||
# Language specific
|
||||
nixfmt-rfc-style
|
||||
nil
|
||||
nixd
|
||||
fnm
|
||||
bun
|
||||
zig
|
||||
uv
|
||||
ruff
|
||||
tectonic
|
||||
tex-fmt
|
||||
rustup
|
||||
shfmt
|
||||
go
|
||||
|
||||
# Fonts
|
||||
karla
|
||||
]
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
username = "nicco";
|
||||
hostName = "1k5";
|
||||
platform = "aarch64-darwin";
|
||||
sshKey = "1k5";
|
||||
|
||||
extras = {
|
||||
casks = [
|
||||
"notion"
|
||||
"linear-linear"
|
||||
"miro"
|
||||
"loom"
|
||||
"cursor"
|
||||
];
|
||||
pkgs =
|
||||
pkgs: with pkgs; [
|
||||
docker-client
|
||||
colima
|
||||
google-cloud-sdk
|
||||
gemini-cli
|
||||
terramate
|
||||
ffmpeg-full
|
||||
stripe-cli
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
[
|
||||
(import ./mac14.nix)
|
||||
(import ./1k5.nix)
|
||||
]
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
username = "cupcakearmy";
|
||||
hostName = "mac14";
|
||||
platform = "aarch64-darwin";
|
||||
sshKey = "legba";
|
||||
|
||||
extras = {
|
||||
casks = [
|
||||
"surfshark"
|
||||
"signal"
|
||||
"discord"
|
||||
"daisydisk"
|
||||
"bambu-studio"
|
||||
"cyberduck"
|
||||
"balenaetcher"
|
||||
"datagrip"
|
||||
"transmission"
|
||||
"steam"
|
||||
"android-studio"
|
||||
];
|
||||
pkgs =
|
||||
pkgs: with pkgs; [
|
||||
docker-client
|
||||
colima
|
||||
docker-buildx
|
||||
biome
|
||||
infisical
|
||||
ffmpeg
|
||||
mkcert
|
||||
];
|
||||
};
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
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)
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Set Chromium on exit
|
||||
FILE="$HOME/Library/Application Support/Chromium/Local State"
|
||||
jq '.browser.enabled_labs_experiments //= [] | .browser.enabled_labs_experiments |= map(select(startswith("clear-data-on-exit") | not)) + ["clear-data-on-exit@1"]' "$FILE" | sponge "$FILE"
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create secrets directory if it doesn't exist
|
||||
mkdir -p secrets/plist
|
||||
|
||||
# Array of app IDs to export
|
||||
APP_IDS=(
|
||||
"com.lwouis.alt-tab-macos"
|
||||
"com.jordanbaird.Ice"
|
||||
"com.apphousekitchen.aldente-pro.plist"
|
||||
"com.lihaoyun6.QuickRecorder.plist"
|
||||
)
|
||||
|
||||
# Export each plist
|
||||
for APP_ID in "${APP_IDS[@]}"; do
|
||||
echo "Exporting $APP_ID..."
|
||||
defaults export "$APP_ID" - >"secrets/plist/$APP_ID.plist"
|
||||
|
||||
# Check if export was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Successfully exported $APP_ID to secrets/$APP_ID.plist"
|
||||
else
|
||||
echo "Failed to export $APP_ID"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "All exports completed!"
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Path to the plist directory
|
||||
PLIST_DIR="secrets/plist"
|
||||
|
||||
# Check if the plist directory exists
|
||||
if [ ! -d "$PLIST_DIR" ]; then
|
||||
echo "Error: Directory $PLIST_DIR does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get all plist files in the directory
|
||||
PLIST_FILES=("$PLIST_DIR"/*.plist)
|
||||
|
||||
# Check if there are any plist files
|
||||
if [ ${#PLIST_FILES[@]} -eq 0 ] || [ "${PLIST_FILES[0]}" = "$PLIST_DIR/*.plist" ]; then
|
||||
echo "No plist files found in $PLIST_DIR."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Import each plist
|
||||
for PLIST_PATH in "${PLIST_FILES[@]}"; do
|
||||
# Extract app ID from filename (remove path and .plist extension)
|
||||
FILENAME=$(basename "$PLIST_PATH")
|
||||
APP_ID="${FILENAME%.plist}"
|
||||
|
||||
echo "Importing $APP_ID..."
|
||||
cat "$PLIST_PATH" | defaults import "$APP_ID" -
|
||||
|
||||
# Check if import was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Successfully imported $APP_ID from $PLIST_PATH"
|
||||
else
|
||||
echo "Failed to import $APP_ID"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "All imports completed!"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user