mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2026-05-26 13:55:25 +00:00
Compare commits
4 Commits
main
..
90bd763b13
| Author | SHA1 | Date | |
|---|---|---|---|
| 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#sflx
|
||||
```
|
||||
|
||||
## 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,30 @@
|
||||
[
|
||||
# Objective See
|
||||
"knockknock"
|
||||
"lulu"
|
||||
"oversight"
|
||||
|
||||
# Utility
|
||||
"aldente"
|
||||
"alt-tab"
|
||||
"keka"
|
||||
"knockknock"
|
||||
"lulu"
|
||||
"kap"
|
||||
"keycastr"
|
||||
"raycast"
|
||||
"ghostty"
|
||||
"lihaoyun6/tap/quickrecorder"
|
||||
"iina"
|
||||
"shutter-encoder"
|
||||
"kitty"
|
||||
|
||||
# Dev
|
||||
"docker"
|
||||
"sloth"
|
||||
"vscodium"
|
||||
"visual-studio-code"
|
||||
"utm"
|
||||
"bruno"
|
||||
"zed"
|
||||
"httpie"
|
||||
|
||||
|
||||
# Base
|
||||
"obsidian"
|
||||
"figma"
|
||||
"zen"
|
||||
"ungoogled-chromium"
|
||||
# Apps
|
||||
"arc"
|
||||
"bitwarden"
|
||||
"spotify"
|
||||
"vlc"
|
||||
"slack"
|
||||
"yubico-authenticator"
|
||||
"suspicious-package"
|
||||
"mediahuman-audio-converter"
|
||||
"imageoptim"
|
||||
"appcleaner"
|
||||
|
||||
]
|
||||
|
||||
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 +0,0 @@
|
||||
font-family = "JetBrainsMono Nerd Font"
|
||||
quit-after-last-window-closed=true
|
||||
theme = "dark:Rose Pine,light:Rose Pine Dawn"
|
||||
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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
+17
-17
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"LazyVim": { "branch": "main", "commit": "4d596cf4b4dcb369b2aef7e4d09635416b6c5a3f" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "291b15c6a03d8f859da8d83f46ed41ae6bb0ea8d" },
|
||||
"auto-session": { "branch": "main", "commit": "8d2eddb14ef66ed1019c92251e2d31bb7a2a2f87" },
|
||||
"bg.nvim": { "branch": "main", "commit": "18b4161e22decab29fa8705c174bb29b5b39be36" },
|
||||
"LazyVim": { "branch": "main", "commit": "704c29110d578186f0ca3eac67b753ddf52541fc" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "f8d6e9068861888651f68958521b1958314aac41" },
|
||||
"bg.nvim": { "branch": "main", "commit": "00a12555962047b71ccb1a724eaf3293d3e995de" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" },
|
||||
"catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-git": { "branch": "main", "commit": "ec049036e354ed8ed0215f2427112882e1ea7051" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"conform.nvim": { "branch": "master", "commit": "62d5accad8b29d6ba9b58d3dff90c43a55621c60" },
|
||||
"conform.nvim": { "branch": "master", "commit": "023f795dbcf32d4351b6a9ed2e613d471b5bb812" },
|
||||
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "ae309606940d26d8c9df8b048a6e136b6bbec478" },
|
||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||
"fzf-lua": { "branch": "main", "commit": "9427dc65afaa7972fb20fc52280cd1449f691928" },
|
||||
"fzf-lua": { "branch": "main", "commit": "2a7eb32871a131e24021dd1756865e475fe7e274" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "9a2f78219390b47d67795ab09390d7f092e23976" },
|
||||
"hop.nvim": { "branch": "master", "commit": "08ddca799089ab96a6d1763db0b8adc5320bf050" },
|
||||
@@ -21,9 +21,9 @@
|
||||
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
|
||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "cab00668464d2914d0752b86168b4a431cc93eb2" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.ai": { "branch": "main", "commit": "31c149067d38b97720d2a179619f7745a0006ecc" },
|
||||
"mini.animate": { "branch": "main", "commit": "d33ddf0eefee6338bbd95805c4595c1b34e6bfe2" },
|
||||
@@ -32,24 +32,24 @@
|
||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||
"mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
"noice.nvim": { "branch": "main", "commit": "203f74adaae11d47440a667555b4af9156be807b" },
|
||||
"noice.nvim": { "branch": "main", "commit": "221ffbc499d322699ea079fcd878a2399529e775" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "40a03dc225383c4f6256596c2cdf27e03b8119b5" },
|
||||
"nvim-lint": { "branch": "master", "commit": "8e9562de7261e5b862c631958df616e1a65552cd" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "291a8f1a319dc712db85bcc174b0cf406f0a5b69" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
|
||||
"nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "87c7c83ce62971e0bdb29bb32b8ad2b19c8f95d0" },
|
||||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "a3a732107f8b529f97bf4921b3e1af5dcc756bb6" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "20e10ca6914f65cf1410232433fb58de70ab6b39" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "d6a82d70765aa238b7ea48d257a1d57a92501423" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "6e742b9fc6a37e46181879f6c32cecfa8cd2cebf" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "a365d3e854641ad9a5b362d35cc13e0fb8032e88" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "82184c4a3c3580a7a859b2cb7e58f16c10fd29ef" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "8ece53be36515cb9e76f3d03511643636469502d" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "313954efdfb064a85df731b29fa9b86bc711044a" },
|
||||
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "9758827c3b380ba89da4a2212b6255d01afbcf08" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" },
|
||||
"vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" },
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
"lazyvim.plugins.extras.util.dot",
|
||||
"lazyvim.plugins.extras.util.startuptime"
|
||||
],
|
||||
"install_version": 7,
|
||||
"news": {
|
||||
"NEWS.md": "11866"
|
||||
"NEWS.md": "7107"
|
||||
},
|
||||
"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
+10
-10
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779678629,
|
||||
"narHash": "sha256-gHcIFg0mm+KFsg7iZQt67kni3+qR5U3PhEC9P7vKlZ4=",
|
||||
"lastModified": 1731786860,
|
||||
"narHash": "sha256-130gQ5k8kZlxjBEeLpE+SvWFgSOFgQFeZlqIik7KgtQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "612bbe3b405ad5f71d7bf9edecc04b678a061652",
|
||||
"rev": "1bd5616e33c0c54d7a5b37db94160635a9b27aeb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -27,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779036909,
|
||||
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
|
||||
"lastModified": 1731768170,
|
||||
"narHash": "sha256-9Zj2baKY3KaKzs5+nqZgIwr/o/iibhENFxjOnpU+IOU=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "56c666e108467d87d13508936aade6d567f2a501",
|
||||
"rev": "2bcef10f4319f34ddebadb5f37eaa81ca2510730",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -42,17 +42,17 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1779536132,
|
||||
"narHash": "sha256-q+fF42iv/geEbHfgSzy3tS0FF/EyD6XTZ98E6yxiBO8=",
|
||||
"lastModified": 1731676161,
|
||||
"narHash": "sha256-R0HVwLNR6/a7tonc/7ChJIRB8fJ0dyQmJYH4lOU1Zm0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3d8f0f3f72a6cd4d93d0ad13203f2ea1cb7e1456",
|
||||
"rev": "8809585e6937d0b07fc066792c8c9abf9c3fe5c4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8809585e6937d0b07fc066792c8c9abf9c3fe5c4",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{
|
||||
description = "Personal Nix configuration";
|
||||
description = "Example nix-darwin system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
# https://github.com/LnL7/nix-darwin/issues/1176
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/8809585e6937d0b07fc066792c8c9abf9c3fe5c4";
|
||||
|
||||
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -12,40 +14,77 @@
|
||||
};
|
||||
|
||||
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 = [ ];
|
||||
|
||||
system.defaults.dock.autohide = true;
|
||||
system.defaults.dock.orientation = "left";
|
||||
system.defaults.finder.AppleShowAllExtensions = true;
|
||||
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;
|
||||
|
||||
users.users."niccoloborgioli" = {
|
||||
home = "/Users/niccoloborgioli";
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
programs.fish.enable = true;
|
||||
|
||||
homebrew.enable = true;
|
||||
homebrew.casks = import ./cask.nix;
|
||||
# homebrew.taps = [
|
||||
# "hashicorp/tap"
|
||||
# ];
|
||||
# homebrew.brews = [
|
||||
# "hashicorp/tap/vault"
|
||||
# ];
|
||||
|
||||
# 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."sflx" = 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."sflx".pkgs;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
{ 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.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
|
||||
|
||||
# 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
|
||||
|
||||
# sflx
|
||||
pkgs.vault
|
||||
|
||||
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".config/omp/config.yaml".source = ./files/omp/config.yaml;
|
||||
".config/kitty".source = ./files/kitty;
|
||||
".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#sflx";
|
||||
};
|
||||
|
||||
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