mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-09-06 10:50:38 +00:00
Compare commits
69 Commits
35bcf9f534
...
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 | ||
ed7696d7a3 | |||
89d8728118 | |||
c001acbb04 | |||
|
35e8d233b0 | ||
|
a92e8912e7 | ||
|
225846e2e2 | ||
3b500da3a4 | |||
4031657854 | |||
bb9aa33132 | |||
309c4c8d02 | |||
e746a81578 | |||
3a7470cce7 | |||
a4d815202e | |||
1dc5eb19f5 | |||
5708bd1509 | |||
faf04c3311 | |||
a31c089055 | |||
f50908d358 | |||
58f2f67260 | |||
899ab0658f | |||
205b4b8c9c | |||
e01a71ece0 | |||
1c20a73d19 | |||
a1ad0fa815 | |||
9c14f17cd8 | |||
00c61fe4a1 | |||
4ec39b7ab3 | |||
5231444833 | |||
d831b73833 | |||
a54fb3c474 | |||
6a0a5d4f35 | |||
1a2957f9e9 | |||
ef1c057bd9 | |||
a054d3b712 | |||
09e8beaf49 | |||
c11ea192cb | |||
c05ec2c48e | |||
0772bbbf50 | |||
4c50216342 | |||
d8dbea94c1 | |||
b0c3e9e512 | |||
2d309816ff | |||
3b76820774 | |||
0d0baa3b60 | |||
e96cac4f4b | |||
7a1676b0ea | |||
f32120de52 |
2
.envrc
2
.envrc
@@ -1,2 +0,0 @@
|
|||||||
# export SOPS_AGE_KEY_FILE=${HOME}/.config/sops/age/keys.txt
|
|
||||||
export SOPS_AGE_KEY_FILE=$(pwd)/.keys.txt
|
|
@@ -1,4 +0,0 @@
|
|||||||
creation_rules:
|
|
||||||
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
|
|
||||||
age: >-
|
|
||||||
age1fwwfdh3np846pcwlsre2d8py3a8z5gfltx3jcyghdfx9esn6a40sm60mdj
|
|
21
README.md
21
README.md
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install nix [without the --determinate flag]
|
# Install nix [without the --determinate flag]
|
||||||
|
# ⚠️ When asked if install the determinate version say no
|
||||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||||
|
|
||||||
# Install brew [for casks]
|
# Install brew [for casks]
|
||||||
@@ -19,12 +20,16 @@ git-crypt unlock .key
|
|||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
# Available hosts can be found in the ./hosts directory
|
# Available hosts can be found in the ./hosts directory
|
||||||
nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host>
|
sudo nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host>
|
||||||
|
|
||||||
# After installation simply use the provided alias to rebuild
|
# After installation simply use the provided alias to rebuild
|
||||||
vai
|
vai
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
- [nix-darwin](https://daiderd.com/nix-darwin/manual/index.html)
|
||||||
|
|
||||||
## Crypt
|
## Crypt
|
||||||
|
|
||||||
Files under `secrets` are encrypted using `git-crypt`.
|
Files under `secrets` are encrypted using `git-crypt`.
|
||||||
@@ -37,3 +42,17 @@ git-crypt export-key - | base64 > .key.b64
|
|||||||
cat .key.b64 | base64 --decode > .key
|
cat .key.b64 | base64 --decode > .key
|
||||||
git-crypt unlock .key
|
git-crypt unlock .key
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 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
|
||||||
|
21
cask.nix
21
cask.nix
@@ -1,8 +1,10 @@
|
|||||||
[
|
[
|
||||||
|
# Objective See
|
||||||
"knockknock"
|
"knockknock"
|
||||||
"lulu"
|
"lulu"
|
||||||
"oversight"
|
"oversight"
|
||||||
|
|
||||||
|
# Utility
|
||||||
"aldente"
|
"aldente"
|
||||||
"alt-tab"
|
"alt-tab"
|
||||||
"keka"
|
"keka"
|
||||||
@@ -13,28 +15,25 @@
|
|||||||
"lihaoyun6/tap/quickrecorder"
|
"lihaoyun6/tap/quickrecorder"
|
||||||
|
|
||||||
# Dev
|
# Dev
|
||||||
"docker"
|
"docker-desktop"
|
||||||
"sloth"
|
"sloth"
|
||||||
"vscodium"
|
"vscodium"
|
||||||
"hoppscotch"
|
"visual-studio-code"
|
||||||
"utm"
|
"utm"
|
||||||
"balenaetcher"
|
"balenaetcher"
|
||||||
|
"outerbase-studio"
|
||||||
|
"hoppscotch"
|
||||||
|
|
||||||
# Apps
|
# Base
|
||||||
|
"obsidian"
|
||||||
"figma"
|
"figma"
|
||||||
"arc"
|
"zen"
|
||||||
"firefox"
|
"ungoogled-chromium"
|
||||||
"bitwarden"
|
"bitwarden"
|
||||||
"spotify"
|
"spotify"
|
||||||
"vlc"
|
|
||||||
"slack"
|
"slack"
|
||||||
"yubico-authenticator"
|
"yubico-authenticator"
|
||||||
"suspicious-package"
|
|
||||||
"mediahuman-audio-converter"
|
"mediahuman-audio-converter"
|
||||||
"imageoptim"
|
"imageoptim"
|
||||||
"appcleaner"
|
"appcleaner"
|
||||||
"daisydisk"
|
|
||||||
"discord"
|
|
||||||
"signal"
|
|
||||||
"vlc"
|
|
||||||
]
|
]
|
||||||
|
88
darwin.nix
88
darwin.nix
@@ -6,7 +6,11 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
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.
|
# Set Git commit hash for darwin-version.
|
||||||
system.configurationRevision = flake.rev or flake.dirtyRev or null;
|
system.configurationRevision = flake.rev or flake.dirtyRev or null;
|
||||||
@@ -20,36 +24,61 @@
|
|||||||
# Nix Darwin
|
# Nix Darwin
|
||||||
# https://daiderd.com/nix-darwin/manual/index.html
|
# https://daiderd.com/nix-darwin/manual/index.html
|
||||||
|
|
||||||
# Security
|
system.primaryUser = host.username;
|
||||||
system.defaults.screensaver.askForPassword = true;
|
|
||||||
system.defaults.screensaver.askForPasswordDelay = 0;
|
|
||||||
system.defaults.loginwindow.GuestEnabled = false;
|
|
||||||
|
|
||||||
# Dock
|
system.defaults = {
|
||||||
system.defaults.dock.autohide = true;
|
# Security
|
||||||
system.defaults.dock.orientation = "left";
|
screensaver.askForPassword = true;
|
||||||
system.defaults.dock.show-recents = false;
|
screensaver.askForPasswordDelay = 0;
|
||||||
system.defaults.dock.persistent-apps = [
|
loginwindow.GuestEnabled = false;
|
||||||
"/Applications/Arc.app"
|
|
||||||
"/Applications/Ghostty.app"
|
# Dock
|
||||||
"/Applications/VSCodium.app"
|
dock = {
|
||||||
"/Applications/Spotify.app"
|
autohide = true;
|
||||||
"/System/Applications/System Settings.app"
|
orientation = "left";
|
||||||
];
|
show-recents = false;
|
||||||
system.defaults.dock.persistent-others = [ ];
|
persistent-apps = [
|
||||||
|
"/Applications/Zen.app"
|
||||||
|
"/Applications/Ghostty.app"
|
||||||
|
"/Applications/Visual Studio Code.app"
|
||||||
|
"/Applications/Spotify.app"
|
||||||
|
"/System/Applications/System Settings.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
|
# Input devices
|
||||||
system.keyboard.enableKeyMapping = true;
|
system.keyboard = {
|
||||||
system.keyboard.remapCapsLockToEscape = true;
|
enableKeyMapping = true;
|
||||||
system.defaults.NSGlobalDomain.InitialKeyRepeat = 25;
|
remapCapsLockToEscape = true;
|
||||||
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
|
# Power
|
||||||
system.defaults.finder.AppleShowAllExtensions = true;
|
power = {
|
||||||
system.defaults.finder.ShowPathbar = true;
|
sleep = {
|
||||||
|
computer = "never";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
system.startup.chime = false;
|
system.startup.chime = false;
|
||||||
@@ -59,13 +88,18 @@
|
|||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
environment.shells = [ pkgs.fish ];
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
casks = (import ./cask.nix) ++ (lib.attrByPath [ "extras" "casks" ] [ ] host);
|
casks = (import ./cask.nix) ++ (lib.attrByPath [ "extras" "casks" ] [ ] host);
|
||||||
taps = [ "lihaoyun6/tap" ];
|
taps = [ "lihaoyun6/tap" ];
|
||||||
|
global = {
|
||||||
|
autoUpdate = true;
|
||||||
|
};
|
||||||
onActivation = {
|
onActivation = {
|
||||||
autoUpdate = true;
|
autoUpdate = true;
|
||||||
|
upgrade = true;
|
||||||
cleanup = "zap";
|
cleanup = "zap";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = cupcakearmy
|
|
||||||
email = hi@nicco.io
|
|
||||||
signingkey = 3235314B4D31232F
|
|
@@ -1,4 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = Niccolo Borgioli
|
|
||||||
email = hi@nicco.io
|
|
||||||
signingkey = 4897ACD13A65977C
|
|
@@ -4,15 +4,15 @@
|
|||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
required = true
|
required = true
|
||||||
[core]
|
[core]
|
||||||
|
pager = delta
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
ignorecase=false
|
ignorecase=false
|
||||||
[commit]
|
[interactive]
|
||||||
gpgsign = false
|
diffFilter = delta --color-only
|
||||||
|
|
||||||
[pull]
|
[pull]
|
||||||
rebase = false
|
rebase = false
|
||||||
|
|
||||||
[push]
|
[push]
|
||||||
autoSetupRemote = true
|
autoSetupRemote = true
|
||||||
[branch]
|
[branch]
|
||||||
@@ -20,5 +20,16 @@
|
|||||||
[alias]
|
[alias]
|
||||||
fpush = push --force-with-lease
|
fpush = push --force-with-lease
|
||||||
|
|
||||||
|
# Signing
|
||||||
|
[tag]
|
||||||
|
gpgsign = true
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
[gpg]
|
||||||
|
format = ssh
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
path = ~/.gitconfig.local
|
path = ~/.gitconfig.local
|
||||||
|
|
||||||
|
[delta]
|
||||||
|
navigate = true
|
||||||
|
1
files/omp/colors/.gitignore
vendored
1
files/omp/colors/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
node_modules
|
|
Binary file not shown.
@@ -1,106 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
@@ -1,21 +0,0 @@
|
|||||||
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))
|
|
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "module",
|
|
||||||
"main": "index.js",
|
|
||||||
"dependencies": {
|
|
||||||
"@k-vyn/coloralgorithm": "^1.0.0",
|
|
||||||
"yaml": "^2.2.1"
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,159 +0,0 @@
|
|||||||
# 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
|
|
18
flake.lock
generated
18
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741543064,
|
"lastModified": 1756579987,
|
||||||
"narHash": "sha256-AjXyS3ACxWAd+h3NSkrflN+uC0Tq1XFqox472RF6yh0=",
|
"narHash": "sha256-duCce8zGsaMsrqqOmLOsuaV1PVIw/vXWnKuLKZClsGg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "db4386d686fb0b2788e7422e6a2299deace9c4b1",
|
"rev": "99a69bdf8a3c6bf038c4121e9c4b6e99706a187a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741229100,
|
"lastModified": 1755825449,
|
||||||
"narHash": "sha256-0HwrTDXp9buEwal/1ymK9uQmzUD5ozIA7CJGqnT/gLs=",
|
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "adf5c88ba1fe21af5c083b4d655004431f20c5ab",
|
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -42,11 +42,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741402956,
|
"lastModified": 1756536218,
|
||||||
"narHash": "sha256-y2hByvBM03s9T2fpeLjW6iprbxnhV9mJMmSwCHc41ZQ=",
|
"narHash": "sha256-ynQxPVN2FIPheUgTFhv01gYLbaiSOS7NgWJPm9LF9D0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ed0b1881565c1ffef490c10d663d4f542031dad3",
|
"rev": "a918bb3594dd243c2f8534b3be01b3cb4ed35fd1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@@ -32,6 +32,9 @@
|
|||||||
flake = self;
|
flake = self;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ (import ./overlay.nix) ];
|
||||||
|
}
|
||||||
(import ./darwin.nix)
|
(import ./darwin.nix)
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
sops-nix,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -26,26 +25,39 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
file = {
|
file = {
|
||||||
".config/omp/config.yaml".source = ../files/omp/config.yaml;
|
|
||||||
".config/ghostty/config".source = ../files/ghostty/config;
|
".config/ghostty/config".source = ../files/ghostty/config;
|
||||||
".gitconfig".source = ../files/git/gitconfig;
|
".gitconfig".source = ../files/git/gitconfig;
|
||||||
".gitignore_global".source = ../files/git/gitignore_global;
|
".gitignore_global".source = ../files/git/gitignore_global;
|
||||||
".gitconfig.local".source = ../files/git/config.work;
|
".gitconfig.local".source = ../secrets/git/config.${host.hostName};
|
||||||
".config/nvim".source = ../files/nvim;
|
".config/nvim".source = ../files/nvim;
|
||||||
|
|
||||||
# Secrets
|
# Secrets
|
||||||
".ssh/config".source = ../secrets/ssh/config;
|
".ssh/config".text = builtins.replaceStrings [ "@SSH_KEY@" ] [ host.sshKey ] (
|
||||||
|
builtins.readFile ../secrets/ssh/config.template
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
l = "ls -hal";
|
# Rust re-maps
|
||||||
|
l = "eza -a1lh";
|
||||||
|
ls = "eza";
|
||||||
|
cat = "bat";
|
||||||
|
cd = "z";
|
||||||
|
|
||||||
|
# QOL
|
||||||
dc = "docker compose";
|
dc = "docker compose";
|
||||||
rsync = "rsync -az --info=progress2";
|
rsync = "rsync -az --info=progress2";
|
||||||
t = "tmux new-session -A -s main";
|
t = "tmux new-session -A -s main";
|
||||||
e = "nvim";
|
e = "nvim";
|
||||||
g = "lazygit";
|
g = "lazygit";
|
||||||
d = "lazydocker";
|
d = "lazydocker";
|
||||||
vai = "darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
|
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}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -56,12 +68,15 @@
|
|||||||
fish = {
|
fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
if type -q oh-my-posh
|
if type -q starship
|
||||||
oh-my-posh init fish --config ~/.config/omp/config.yaml | source
|
starship init fish | source
|
||||||
end
|
end
|
||||||
if type -q fnm
|
if type -q fnm
|
||||||
fnm env --use-on-cd | source
|
fnm env --use-on-cd | source
|
||||||
end
|
end
|
||||||
|
if type -q nvs
|
||||||
|
nvs env --source | source
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
bash = {
|
bash = {
|
||||||
|
@@ -3,7 +3,6 @@ with pkgs;
|
|||||||
[
|
[
|
||||||
# Base
|
# Base
|
||||||
tmux
|
tmux
|
||||||
oh-my-posh
|
|
||||||
git
|
git
|
||||||
git-lfs
|
git-lfs
|
||||||
git-crypt
|
git-crypt
|
||||||
@@ -19,9 +18,21 @@ with pkgs;
|
|||||||
tree
|
tree
|
||||||
wget
|
wget
|
||||||
woff2
|
woff2
|
||||||
bat
|
|
||||||
rsync
|
rsync
|
||||||
sops
|
yq
|
||||||
|
delta
|
||||||
|
|
||||||
|
# Rust utils
|
||||||
|
bat
|
||||||
|
eza
|
||||||
|
fd
|
||||||
|
ripgrep
|
||||||
|
ripgrep-all
|
||||||
|
zoxide
|
||||||
|
uutils-coreutils-noprefix
|
||||||
|
dust
|
||||||
|
yazi
|
||||||
|
starship
|
||||||
|
|
||||||
# Dev
|
# Dev
|
||||||
devenv
|
devenv
|
||||||
@@ -30,15 +41,19 @@ with pkgs;
|
|||||||
colima
|
colima
|
||||||
lazydocker
|
lazydocker
|
||||||
exercism
|
exercism
|
||||||
|
posting
|
||||||
|
terraform
|
||||||
|
k9s
|
||||||
|
kubectl
|
||||||
|
|
||||||
# Editor
|
# Editor
|
||||||
|
nvs
|
||||||
neovim
|
neovim
|
||||||
fzf
|
fzf
|
||||||
lazygit
|
lazygit
|
||||||
lua
|
lua
|
||||||
luajitPackages.luarocks
|
luajitPackages.luarocks
|
||||||
ast-grep
|
ast-grep
|
||||||
ripgrep
|
|
||||||
|
|
||||||
# Language specific
|
# Language specific
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
@@ -52,10 +67,9 @@ with pkgs;
|
|||||||
tex-fmt
|
tex-fmt
|
||||||
rustup
|
rustup
|
||||||
shfmt
|
shfmt
|
||||||
ruby
|
go
|
||||||
ruby-lsp
|
|
||||||
rubyPackages.prism
|
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
|
karla
|
||||||
]
|
]
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
[
|
[
|
||||||
(import ./mac14.nix)
|
(import ./mac14.nix)
|
||||||
(import ./mac16.nix)
|
(import ./ordio.nix)
|
||||||
]
|
]
|
||||||
|
@@ -2,4 +2,24 @@
|
|||||||
username = "cupcakearmy";
|
username = "cupcakearmy";
|
||||||
hostName = "mac14";
|
hostName = "mac14";
|
||||||
platform = "aarch64-darwin";
|
platform = "aarch64-darwin";
|
||||||
|
sshKey = "legba";
|
||||||
|
|
||||||
|
extras = {
|
||||||
|
casks = [
|
||||||
|
"surfshark"
|
||||||
|
"visual-studio-code"
|
||||||
|
"signal"
|
||||||
|
"discord"
|
||||||
|
"daisydisk"
|
||||||
|
"blender"
|
||||||
|
"bambu-studio"
|
||||||
|
];
|
||||||
|
pkgs =
|
||||||
|
pkgs: with pkgs; [
|
||||||
|
biome
|
||||||
|
infisical
|
||||||
|
ffmpeg
|
||||||
|
pulumi
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
username = "niccoloborgioli";
|
|
||||||
hostName = "mac16";
|
|
||||||
platform = "aarch64-darwin";
|
|
||||||
|
|
||||||
extras = {
|
|
||||||
casks = [
|
|
||||||
"phpstorm"
|
|
||||||
"datagrip"
|
|
||||||
"tailscale"
|
|
||||||
"android-studio"
|
|
||||||
];
|
|
||||||
pkgs =
|
|
||||||
pkgs: with pkgs; [
|
|
||||||
vault
|
|
||||||
cocoapods
|
|
||||||
phrase-cli
|
|
||||||
boundary
|
|
||||||
awscli2
|
|
||||||
fastlane
|
|
||||||
jdk
|
|
||||||
android-tools
|
|
||||||
sdkmanager
|
|
||||||
_1password-cli
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
33
hosts/ordio.nix
Normal file
33
hosts/ordio.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
username = "nicco";
|
||||||
|
hostName = "ordio";
|
||||||
|
platform = "aarch64-darwin";
|
||||||
|
sshKey = "ordio";
|
||||||
|
|
||||||
|
extras = {
|
||||||
|
casks = [
|
||||||
|
"tableplus"
|
||||||
|
"http-toolkit"
|
||||||
|
"phpstorm"
|
||||||
|
"notion"
|
||||||
|
];
|
||||||
|
pkgs =
|
||||||
|
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)
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
27
scripts/plist/backup.sh
Executable file
27
scripts/plist/backup.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/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!"
|
38
scripts/plist/restore.sh
Executable file
38
scripts/plist/restore.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/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!"
|
BIN
secrets/configs/Raycast 2025-03-10 22.24.34.rayconfig
Normal file
BIN
secrets/configs/Raycast 2025-03-10 22.24.34.rayconfig
Normal file
Binary file not shown.
BIN
secrets/configs/Raycast 2025-07-01 13.33.23.rayconfig
Normal file
BIN
secrets/configs/Raycast 2025-07-01 13.33.23.rayconfig
Normal file
Binary file not shown.
BIN
secrets/configs/vscodium-sync.yaml
Normal file
BIN
secrets/configs/vscodium-sync.yaml
Normal file
Binary file not shown.
BIN
secrets/git/config.mac14
Normal file
BIN
secrets/git/config.mac14
Normal file
Binary file not shown.
BIN
secrets/git/config.ordio
Normal file
BIN
secrets/git/config.ordio
Normal file
Binary file not shown.
BIN
secrets/licenses/aldente.txt
Normal file
BIN
secrets/licenses/aldente.txt
Normal file
Binary file not shown.
BIN
secrets/plist/com.apphousekitchen.aldente-pro.plist.plist
Normal file
BIN
secrets/plist/com.apphousekitchen.aldente-pro.plist.plist
Normal file
Binary file not shown.
BIN
secrets/plist/com.jordanbaird.Ice.plist
Normal file
BIN
secrets/plist/com.jordanbaird.Ice.plist
Normal file
Binary file not shown.
BIN
secrets/plist/com.lihaoyun6.QuickRecorder.plist.plist
Normal file
BIN
secrets/plist/com.lihaoyun6.QuickRecorder.plist.plist
Normal file
Binary file not shown.
BIN
secrets/plist/com.lwouis.alt-tab-macos.plist
Normal file
BIN
secrets/plist/com.lwouis.alt-tab-macos.plist
Normal file
Binary file not shown.
Binary file not shown.
BIN
secrets/ssh/config.template
Normal file
BIN
secrets/ssh/config.template
Normal file
Binary file not shown.
Reference in New Issue
Block a user