mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-12-07 22:45:02 +00:00
Compare commits
41 Commits
dbdb337037
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 71cf51f301 | |||
| 08c751ceb3 | |||
| b27684f9cb | |||
| e8469c723b | |||
| b14b31c7b8 | |||
| 197fa0461e | |||
| d1c7c336a2 | |||
| 5c3c59d6da | |||
| 3845ae7bde | |||
| 79d88d9461 | |||
| 08b84fe5db | |||
| 036684c6c7 | |||
| a4d5297c00 | |||
| 409a48426c | |||
| 8d19b5b056 | |||
| 90a52b2c13 | |||
| 01393919ec | |||
| 0047118a70 | |||
| 762715c2b5 | |||
| 43c0dc2035 | |||
| b7271cf816 | |||
| d57ad9b3e9 | |||
| 1824493c88 | |||
| 489971d880 | |||
| b8b7145e47 | |||
| d9f1588086 | |||
| 950edff326 | |||
| ae6e533365 | |||
| 4faff3fe84 | |||
| 3680f878e2 | |||
| 2c6299e326 | |||
| 56fd365da5 | |||
| cb247c2967 | |||
| 9e5965499b | |||
| 1a6bc7b719 | |||
| c8569a1224 | |||
| eacfda0fd6 | |||
| df6e6f391c | |||
| 9af79678d1 | |||
| 2be6430934 | |||
| bc7395d45a |
32
README.md
32
README.md
@@ -1,17 +1,26 @@
|
||||
# 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 [without the --determinate flag]
|
||||
# ⚠️ When asked if install the determinate version say no
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||
# Install nix
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate
|
||||
|
||||
# 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/nix-macos
|
||||
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
|
||||
@@ -20,7 +29,7 @@ git-crypt unlock .key
|
||||
|
||||
# Installation
|
||||
# Available hosts can be found in the ./hosts directory
|
||||
sudo nix run nix-darwin -- switch --flake ~/.config/nix-macos#<host>
|
||||
sudo nix run nix-darwin -- switch --flake ~/.config/dotfiles#<host>
|
||||
|
||||
# After installation simply use the provided alias to rebuild
|
||||
vai
|
||||
@@ -43,6 +52,19 @@ 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
|
||||
|
||||
2
cask.nix
2
cask.nix
@@ -15,7 +15,6 @@
|
||||
"lihaoyun6/tap/quickrecorder"
|
||||
|
||||
# Dev
|
||||
"docker-desktop"
|
||||
"sloth"
|
||||
"vscodium"
|
||||
"visual-studio-code"
|
||||
@@ -36,4 +35,5 @@
|
||||
"mediahuman-audio-converter"
|
||||
"imageoptim"
|
||||
"appcleaner"
|
||||
"drawio"
|
||||
]
|
||||
|
||||
48
cli/flake.lock
generated
Normal file
48
cli/flake.lock
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759853171,
|
||||
"narHash": "sha256-uqbhyXtqMbYIiMqVqUhNdSuh9AEEkiasoK3mIPIVRhk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1a09eb84fa9e33748432a5253102d01251f72d6d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1759831965,
|
||||
"narHash": "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c9b6fb798541223bbb396d287d16f43520250518",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
42
cli/flake.nix
Normal file
42
cli/flake.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
24
cli/home.nix
Normal file
24
cli/home.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
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
|
||||
87
cli/install.sh
Executable file
87
cli/install.sh
Executable file
@@ -0,0 +1,87 @@
|
||||
#!/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! ==="
|
||||
46
cli/pkgs.nix
Normal file
46
cli/pkgs.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ pkgs }:
|
||||
with pkgs;
|
||||
[
|
||||
# Base
|
||||
tmux
|
||||
git
|
||||
git-lfs
|
||||
git-crypt
|
||||
gnutar
|
||||
gnupg
|
||||
htop
|
||||
btop
|
||||
rclone
|
||||
rename
|
||||
tmux
|
||||
tree
|
||||
wget
|
||||
rsync
|
||||
yq
|
||||
delta
|
||||
|
||||
# Rust utils
|
||||
bat
|
||||
eza
|
||||
fd
|
||||
ripgrep
|
||||
ripgrep-all
|
||||
zoxide
|
||||
uutils-coreutils-noprefix
|
||||
dust
|
||||
yazi
|
||||
starship
|
||||
|
||||
# Dev
|
||||
lazydocker
|
||||
k9s
|
||||
kubectl
|
||||
|
||||
# Editor
|
||||
neovim
|
||||
fzf
|
||||
lazygit
|
||||
|
||||
# Fonts
|
||||
nerd-fonts.jetbrains-mono
|
||||
]
|
||||
26
cli/profiles.nix
Normal file
26
cli/profiles.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
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";
|
||||
}
|
||||
]
|
||||
127
common/home.nix
Normal file
127
common/home.nix
Normal file
@@ -0,0 +1,127 @@
|
||||
{
|
||||
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
|
||||
yq
|
||||
delta
|
||||
kubectl
|
||||
croc
|
||||
asciinema_3
|
||||
grex
|
||||
|
||||
# Rust utils
|
||||
bat
|
||||
eza
|
||||
fd
|
||||
ripgrep
|
||||
ripgrep-all
|
||||
zoxide
|
||||
uutils-coreutils-noprefix
|
||||
dust
|
||||
yazi
|
||||
starship
|
||||
|
||||
# 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";
|
||||
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix.enable = false;
|
||||
nix.settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
substituters = [ "https://devenv.cachix.org" ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
font-family = "JetBrainsMono Nerd Font"
|
||||
quit-after-last-window-closed=true
|
||||
theme = "rose-pine"
|
||||
theme = "dark:Rose Pine,light:Rose Pine Dawn"
|
||||
window-save-state = "always"
|
||||
|
||||
18
flake.lock
generated
18
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1756579987,
|
||||
"narHash": "sha256-duCce8zGsaMsrqqOmLOsuaV1PVIw/vXWnKuLKZClsGg=",
|
||||
"lastModified": 1764952935,
|
||||
"narHash": "sha256-cRPB2zESVMjIGxJ49qj4t4qnT0ae44E+fS/mkfOS/BY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "99a69bdf8a3c6bf038c4121e9c4b6e99706a187a",
|
||||
"rev": "519828bf1c97f8bc2ed2d3b79214067047d3c67d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -27,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755825449,
|
||||
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
|
||||
"lastModified": 1764161084,
|
||||
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
|
||||
"rev": "e95de00a471d07435e0527ff4db092c84998698e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -42,11 +42,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1756536218,
|
||||
"narHash": "sha256-ynQxPVN2FIPheUgTFhv01gYLbaiSOS7NgWJPm9LF9D0=",
|
||||
"lastModified": 1764915887,
|
||||
"narHash": "sha256-CeBCJ9BMsuzVgn8GVfuSRZ6xeau7szzG0Xn6O/OxP9M=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a918bb3594dd243c2f8534b3be01b3cb4ed35fd1",
|
||||
"rev": "42e29df35be6ef54091d3a3b4e97056ce0a98ce8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
124
home/home.nix
124
home/home.nix
@@ -5,103 +5,47 @@
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# https://nix-community.github.io/home-manager
|
||||
home.stateVersion = "25.05";
|
||||
programs.home-manager.enable = true;
|
||||
let
|
||||
common = (import ../common/home.nix) { inherit pkgs; };
|
||||
overwrite = {
|
||||
home.username = host.username;
|
||||
home.homeDirectory = "/Users/${host.username}";
|
||||
|
||||
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);
|
||||
|
||||
home.packages =
|
||||
(import ./pkgs.nix { inherit pkgs; })
|
||||
++ ((lib.attrByPath [ "extras" "pkgs" ] (pkgs: [ ]) host) pkgs);
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
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/nvim".source = ../files/nvim;
|
||||
"Library/Application Support/lazydocker/config.yml".source = ../files/lazydocker/config.yml;
|
||||
|
||||
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/nvim".source = ../files/nvim;
|
||||
"Library/Application Support/lazydocker/config.yml".source = ../files/lazydocker/config.yml;
|
||||
# Secrets
|
||||
".ssh/config".text = builtins.replaceStrings [ "@SSH_KEY@" ] [ host.sshKey ] (
|
||||
builtins.readFile ../secrets/ssh/config.template
|
||||
);
|
||||
};
|
||||
|
||||
# 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";
|
||||
|
||||
shellAliases = {
|
||||
# Rust re-maps
|
||||
l = "eza -a1lh";
|
||||
ls = "eza";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
|
||||
# QOL
|
||||
dc = "docker compose";
|
||||
rsync = "rsync -az --info=progress2";
|
||||
t = "tmux new-session -A -s main";
|
||||
e = "nvim";
|
||||
g = "lazygit";
|
||||
d = "lazydocker";
|
||||
p = "pnpm";
|
||||
px = "pnpm -s dlx";
|
||||
n = "fnm use --install-if-missing";
|
||||
c = "pwd | pbcopy";
|
||||
k = "kubectl";
|
||||
|
||||
vai = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
|
||||
vai = "sudo darwin-rebuild switch --flake ~/.config/dotfiles#${host.hostName}";
|
||||
clean = "nix-collect-garbage -d";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
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
|
||||
'';
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
merged = lib.recursiveUpdate common overwrite;
|
||||
in
|
||||
merged
|
||||
|
||||
@@ -2,56 +2,20 @@
|
||||
with pkgs;
|
||||
[
|
||||
# Base
|
||||
tmux
|
||||
git
|
||||
git-lfs
|
||||
git-crypt
|
||||
gh
|
||||
bfg-repo-cleaner
|
||||
gnutar
|
||||
gnupg
|
||||
htop
|
||||
btop
|
||||
rclone
|
||||
rename
|
||||
tmux
|
||||
tree
|
||||
wget
|
||||
woff2
|
||||
rsync
|
||||
yq
|
||||
delta
|
||||
|
||||
# Rust utils
|
||||
bat
|
||||
eza
|
||||
fd
|
||||
ripgrep
|
||||
ripgrep-all
|
||||
zoxide
|
||||
uutils-coreutils-noprefix
|
||||
dust
|
||||
yazi
|
||||
starship
|
||||
|
||||
# Dev
|
||||
devenv
|
||||
nixpacks
|
||||
ollama
|
||||
colima
|
||||
lazydocker
|
||||
exercism
|
||||
posting
|
||||
terraform
|
||||
k9s
|
||||
kubectl
|
||||
claude-code
|
||||
opencode
|
||||
|
||||
# Editor
|
||||
nvs
|
||||
neovim
|
||||
fzf
|
||||
lazygit
|
||||
lua
|
||||
luajitPackages.luarocks
|
||||
ast-grep
|
||||
@@ -71,6 +35,5 @@ with pkgs;
|
||||
go
|
||||
|
||||
# Fonts
|
||||
nerd-fonts.jetbrains-mono
|
||||
karla
|
||||
]
|
||||
|
||||
15
hosts/1k5.nix
Normal file
15
hosts/1k5.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
username = "nicco";
|
||||
hostName = "1k5";
|
||||
platform = "aarch64-darwin";
|
||||
sshKey = "1k5";
|
||||
|
||||
extras = {
|
||||
casks = [
|
||||
"notion"
|
||||
];
|
||||
pkgs =
|
||||
pkgs: with pkgs; [
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
[
|
||||
(import ./mac14.nix)
|
||||
(import ./ordio.nix)
|
||||
(import ./1k5.nix)
|
||||
]
|
||||
|
||||
@@ -14,13 +14,17 @@
|
||||
"blender"
|
||||
"bambu-studio"
|
||||
"cyberduck"
|
||||
"kicad"
|
||||
];
|
||||
pkgs =
|
||||
pkgs: with pkgs; [
|
||||
docker-client
|
||||
colima
|
||||
docker-buildx
|
||||
biome
|
||||
infisical
|
||||
ffmpeg
|
||||
pulumi
|
||||
mkcert
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
BIN
secrets/configs/Raycast 2025-11-05 23.57.54.rayconfig
Normal file
BIN
secrets/configs/Raycast 2025-11-05 23.57.54.rayconfig
Normal file
Binary file not shown.
BIN
secrets/configs/raycast.key
Normal file
BIN
secrets/configs/raycast.key
Normal file
Binary file not shown.
BIN
secrets/git/config.1k5
Normal file
BIN
secrets/git/config.1k5
Normal file
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.
BIN
secrets/vscode/profiles/main/data/extensions.yml
Normal file
BIN
secrets/vscode/profiles/main/data/extensions.yml
Normal file
Binary file not shown.
BIN
secrets/vscode/profiles/main/data/keybindings-macos.json
Normal file
BIN
secrets/vscode/profiles/main/data/keybindings-macos.json
Normal file
Binary file not shown.
BIN
secrets/vscode/profiles/main/data/settings.json
Normal file
BIN
secrets/vscode/profiles/main/data/settings.json
Normal file
Binary file not shown.
Binary file not shown.
BIN
secrets/vscode/profiles/main/data/snippets/javascript.json
Normal file
BIN
secrets/vscode/profiles/main/data/snippets/javascript.json
Normal file
Binary file not shown.
BIN
secrets/vscode/profiles/main/data/snippets/svelte.json
Normal file
BIN
secrets/vscode/profiles/main/data/snippets/svelte.json
Normal file
Binary file not shown.
BIN
secrets/vscode/profiles/main/data/snippets/typescript.json
Normal file
BIN
secrets/vscode/profiles/main/data/snippets/typescript.json
Normal file
Binary file not shown.
BIN
secrets/vscode/profiles/main/data/snippets/typescriptreact.json
Normal file
BIN
secrets/vscode/profiles/main/data/snippets/typescriptreact.json
Normal file
Binary file not shown.
BIN
secrets/vscode/profiles/main/data/ui-state.yml
Normal file
BIN
secrets/vscode/profiles/main/data/ui-state.yml
Normal file
Binary file not shown.
Reference in New Issue
Block a user