Compare commits

..

36 Commits

Author SHA1 Message Date
dde705cf76 update flake 2025-08-31 15:45:46 +02:00
1cb2aa0a04 Merge pull request #5 from ordionary/main
back
2025-08-18 12:04:27 +02:00
nicco
6946fcb6fe update and remove tidal 2025-08-18 09:59:20 +02:00
nicco
6425ba60eb Merge branch 'main' of github.com:ordionary/nix 2025-08-18 09:53:11 +02:00
nicco
246ec2c64c remove bruno and replace cd 2025-08-18 09:53:05 +02:00
6cf8fc5ef5 add nvs overlay 2025-08-08 19:59:01 +02:00
0e9cccf82e Merge pull request #4 from ordionary/main
Back back
2025-08-08 19:15:08 +02:00
nicco
8a51c74620 add nvs package 2025-08-08 19:12:36 +02:00
nicco
2f0d9a097e add project deps 2025-08-08 19:11:26 +02:00
nicco
f797752d8c add posting 2025-08-01 18:48:44 +02:00
aaec06be58 Merge branch 'main' of github.com:cupcakearmy/nix 2025-07-31 11:11:55 +02:00
a345a227aa update nix 2025-07-31 11:11:43 +02:00
b712b580a9 Merge pull request #3 from ordionary/main
sync back
2025-07-31 11:10:38 +02:00
nicco
8d79067cb2 remove zen 2025-07-31 11:10:10 +02:00
Nicco
86e48260f6 Merge branch 'cupcakearmy:main' into main 2025-07-31 10:48:05 +02:00
b986b3a6c5 add font and update packages 2025-07-31 10:47:46 +02:00
nicco
3f30b041c7 add ios stuff 2025-07-31 10:45:42 +02:00
nicco
412d5200f2 switch back to vscode 2025-07-31 10:45:32 +02:00
nicco
c4e7214a17 cli tools 2025-07-21 18:01:06 +02:00
nicco
03098ec5d9 add delta for git 2025-07-21 18:01:00 +02:00
a62a663a1e Merge pull request #2 from ordionary/main
enable cachex and fnm shortcut
2025-07-09 21:35:16 +02:00
nicco
2edba6eac8 enable cachex and fnm shortcut 2025-07-07 17:26:37 +02:00
ed7696d7a3 update commit 2025-07-02 18:43:32 +02:00
89d8728118 add sign key 2025-07-02 18:37:41 +02:00
c001acbb04 Merge pull request #1 from ordionary/main
Ordio stuff
2025-07-02 18:34:34 +02:00
nicco
35e8d233b0 signing 2025-07-02 18:26:27 +02:00
nicco
a92e8912e7 remove omp 2025-07-02 18:26:18 +02:00
nicco
225846e2e2 add notion 2025-07-02 18:23:36 +02:00
3b500da3a4 new plists 2025-07-02 01:06:06 +02:00
4031657854 rename 2025-07-02 01:05:17 +02:00
bb9aa33132 don't sleep 2025-07-02 00:58:34 +02:00
309c4c8d02 add ordio config 2025-07-02 00:54:23 +02:00
e746a81578 signing commits 2025-07-02 00:32:08 +02:00
3a7470cce7 ordio stuff and cleanup 2025-07-02 00:11:56 +02:00
a4d815202e Refactor SSH config to use host-specific keys and disable nix
- Convert SSH config to template with @SSH_KEY@ placeholder
- Add sshKey field to host configurations (mac14, ordio)
- Update home.nix to dynamically substitute SSH keys per host
- Change docker cask to docker-desktop in cask.nix
- Add development packages to ordio host (mkcert, dnsmasq, etc.)
- Disable nix in darwin.nix configuration
2025-07-02 00:11:31 +02:00
1dc5eb19f5 remove unused host 2025-07-02 00:10:51 +02:00
31 changed files with 118 additions and 357 deletions

View File

@@ -4,6 +4,7 @@
```bash ```bash
# Install nix [without the --determinate flag] # Install nix [without the --determinate flag]
# ⚠️ When asked if install the determinate version say no
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
# Install brew [for casks] # Install brew [for casks]
@@ -19,7 +20,7 @@ git-crypt unlock .key
# Installation # Installation
# Available hosts can be found in the ./hosts directory # Available hosts can be found in the ./hosts directory
nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host> sudo nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host>
# After installation simply use the provided alias to rebuild # After installation simply use the provided alias to rebuild
vai vai
@@ -55,5 +56,3 @@ Stuff that I would like to automate, but have not found a way/time
- surfshark - surfshark
- ublock origin - ublock origin
- vimium - vimium

View File

@@ -15,18 +15,20 @@
"lihaoyun6/tap/quickrecorder" "lihaoyun6/tap/quickrecorder"
# Dev # Dev
"docker" "docker-desktop"
"sloth" "sloth"
"vscodium" "vscodium"
"bruno" "visual-studio-code"
"utm" "utm"
"balenaetcher" "balenaetcher"
"outerbase-studio" "outerbase-studio"
"hoppscotch"
# Base # Base
"obsidian" "obsidian"
"figma" "figma"
"zen" "zen"
"ungoogled-chromium"
"bitwarden" "bitwarden"
"spotify" "spotify"
"slack" "slack"

View File

@@ -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;
@@ -36,7 +40,7 @@
persistent-apps = [ persistent-apps = [
"/Applications/Zen.app" "/Applications/Zen.app"
"/Applications/Ghostty.app" "/Applications/Ghostty.app"
"/Applications/VSCodium.app" "/Applications/Visual Studio Code.app"
"/Applications/Spotify.app" "/Applications/Spotify.app"
"/System/Applications/System Settings.app" "/System/Applications/System Settings.app"
]; ];
@@ -69,6 +73,13 @@
remapCapsLockToEscape = true; remapCapsLockToEscape = true;
}; };
# Power
power = {
sleep = {
computer = "never";
};
};
# Other # Other
system.startup.chime = false; system.startup.chime = false;

View File

@@ -1,4 +0,0 @@
[user]
name = cupcakearmy
email = hi@nicco.io
signingkey = 3235314B4D31232F

View File

@@ -1,4 +0,0 @@
[user]
name = Niccolo Borgioli
email = hi@nicco.io
signingkey = 4897ACD13A65977C

View File

@@ -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

View File

@@ -1 +0,0 @@
node_modules

Binary file not shown.

View File

@@ -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"
}
}
]

View File

@@ -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))

View File

@@ -1,8 +0,0 @@
{
"type": "module",
"main": "index.js",
"dependencies": {
"@k-vyn/coloralgorithm": "^1.0.0",
"yaml": "^2.2.1"
}
}

View File

@@ -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
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1750304462, "lastModified": 1756579987,
"narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=", "narHash": "sha256-duCce8zGsaMsrqqOmLOsuaV1PVIw/vXWnKuLKZClsGg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c", "rev": "99a69bdf8a3c6bf038c4121e9c4b6e99706a187a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -27,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1750325256, "lastModified": 1755825449,
"narHash": "sha256-vvlxGz/waqJ3TGqM/iqXbnEc7/R1qnEXmaBiPaQ1RE0=", "narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "0d71cbf88d63e938b37b85b3bf8b238bcf7b39b9", "rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -42,11 +42,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1750386251, "lastModified": 1756536218,
"narHash": "sha256-1ovgdmuDYVo5OUC5NzdF+V4zx2uT8RtsgZahxidBTyw=", "narHash": "sha256-ynQxPVN2FIPheUgTFhv01gYLbaiSOS7NgWJPm9LF9D0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "076e8c6678d8c54204abcb4b1b14c366835a58bb", "rev": "a918bb3594dd243c2f8534b3be01b3cb4ed35fd1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -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
{ {

View File

@@ -25,30 +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 = {
# Rust re-maps
l = "eza -a1lh"; l = "eza -a1lh";
ls = "eza"; 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 = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
p = "pnpm"; p = "pnpm";
px = "pnpm -s dlx"; px = "pnpm -s dlx";
n = "fnm use --install-if-missing";
c = "pwd | pbcopy";
k = "kubectl";
vai = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
}; };
}; };
@@ -59,15 +68,15 @@
fish = { fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''
# if type -q oh-my-posh
# oh-my-posh init fish --config ~/.config/omp/config.yaml | source
# end
if type -q starship if type -q starship
starship init fish | 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 = {

View File

@@ -3,7 +3,6 @@ with pkgs;
[ [
# Base # Base
tmux tmux
oh-my-posh
git git
git-lfs git-lfs
git-crypt git-crypt
@@ -21,6 +20,7 @@ with pkgs;
woff2 woff2
rsync rsync
yq yq
delta
# Rust utils # Rust utils
bat bat
@@ -41,8 +41,13 @@ with pkgs;
colima colima
lazydocker lazydocker
exercism exercism
posting
terraform
k9s
kubectl
# Editor # Editor
nvs
neovim neovim
fzf fzf
lazygit lazygit
@@ -66,4 +71,5 @@ with pkgs;
# Fonts # Fonts
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
karla
] ]

View File

@@ -1,5 +1,4 @@
[ [
(import ./mac14.nix) (import ./mac14.nix)
(import ./mac16.nix)
(import ./ordio.nix) (import ./ordio.nix)
] ]

View File

@@ -2,16 +2,14 @@
username = "cupcakearmy"; username = "cupcakearmy";
hostName = "mac14"; hostName = "mac14";
platform = "aarch64-darwin"; platform = "aarch64-darwin";
sshKey = "legba";
extras = { extras = {
casks = [ casks = [
"surfshark" "surfshark"
"raspberry-pi-imager"
"visual-studio-code" "visual-studio-code"
"signal" "signal"
"discord" "discord"
"vlc"
"handbrake"
"daisydisk" "daisydisk"
"blender" "blender"
"bambu-studio" "bambu-studio"
@@ -21,6 +19,7 @@
biome biome
infisical infisical
ffmpeg ffmpeg
pulumi
]; ];
}; };
} }

View File

@@ -1,22 +0,0 @@
{
username = "niccoloborgioli";
hostName = "mac16";
platform = "aarch64-darwin";
extras = {
casks = [
"phpstorm"
"datagrip"
"tailscale"
"android-studio"
];
pkgs =
pkgs: with pkgs; [
phrase-cli
boundary
awscli2
_1password-cli
vault
];
};
}

View File

@@ -2,12 +2,32 @@
username = "nicco"; username = "nicco";
hostName = "ordio"; hostName = "ordio";
platform = "aarch64-darwin"; platform = "aarch64-darwin";
sshKey = "ordio";
extras = { extras = {
casks = [ casks = [
"tableplus"
"http-toolkit"
"phpstorm"
"notion"
]; ];
pkgs = pkgs =
pkgs: with 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
View 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)
'';
};
}

BIN
secrets/git/config.mac14 Normal file

Binary file not shown.

BIN
secrets/git/config.ordio Normal file

Binary file not shown.

Binary file not shown.

BIN
secrets/ssh/config.template Normal file

Binary file not shown.