Compare commits

..

No commits in common. "5e1a7a173b7496d4390cea540a422337cb10a840" and "a465daa9c78441da300d5f8e52c51af8007efa81" have entirely different histories.

8 changed files with 31 additions and 61 deletions

View file

@ -7,7 +7,7 @@
- **declarative nix config** для нескольких хостов через nix-darwin + home-manager - **declarative nix config** для нескольких хостов через nix-darwin + home-manager
- активный: **poppy** (MacBook Air M1) - активный: **poppy** (MacBook Air M1)
- planned: **muscari** (NixOS server), **rosemary** (backup VM) - planned: **muscari** (NixOS server), **rosemary** (backup VM)
- user: `mikl` - user: `michaotic` (planned: `mikl`)
## structure ## structure
@ -28,14 +28,18 @@
├── home/ # home-manager modules ├── home/ # home-manager modules
│ ├── default.nix # imports, sessionVariables │ ├── default.nix # imports, sessionVariables
│ ├── cli.nix # CLI tools (universal) + zoxide, bat, eza, fzf │ ├── cli.nix # CLI tools (universal)
│ ├── git.nix # git config │ ├── git.nix # git config
│ ├── ssh.nix # SSH matchBlocks │ ├── ssh.nix # SSH matchBlocks
│ ├── zsh.nix # shell + aliases │ ├── zsh.nix # shell + aliases
│ ├── kitty.nix # terminal │ ├── kitty.nix # terminal
│ ├── duti.nix # default apps (macOS only) │ ├── duti.nix # default apps
│ ├── pass.nix # pass + gpg-agent (только для GPG) │ ├── pass.nix # pass + gpg-agent (только для GPG)
│ └── syncthing.nix # p2p sync │ ├── syncthing.nix # p2p sync
│ ├── zoxide.nix
│ ├── bat.nix
│ ├── eza.nix
│ └── fzf.nix
└── docs/ # документация └── docs/ # документация
├── structure.md # high-level overview ├── structure.md # high-level overview

View file

@ -31,9 +31,9 @@ cd ~/repos/nix-config
```bash ```bash
# если есть приватная репа с зашифрованным gpg ключом # если есть приватная репа с зашифрованным gpg ключом
git clone https://git.iscg.dev/mikl/gpg.git ~/tmp/gpg git clone https://git.iscg.dev/mikl/gpg-secrets.git /tmp/gpg-setup
gpg --import /tmp/gpg/private.asc gpg --import /tmp/gpg-setup/gpg-private.asc
rm -rf ~/tmp/gpg rm -rf /tmp/gpg-setup
# проверить # проверить
gpg --list-secret-keys mikl@iscg.dev gpg --list-secret-keys mikl@iscg.dev
@ -64,17 +64,16 @@ sudo nixos-rebuild switch --flake .#muscari
```bash ```bash
# если есть существующий password store # если есть существующий password store
git clone https://git.iscg.dev/mikl/pass.git ~/.password-store git clone https://git.iscg.dev/mikl/password-store.git ~/.password-store
cd ~/.password-store && git remote remove origin && git remote add origin https://git.iscg.dev/mikl/password-store.git cd ~/.password-store && git remote remove origin && git remote add origin https://git.iscg.dev/mikl/password-store.git
# если создаёшь с нуля # если создаёшь с нуля
pass init <gpg-key-id> # id от gpg --list-secret-keys pass init <gpg-key-id> # id от gpg --list-secret-keys
pass git init pass git init
pass git remote add origin https://git.iscg.dev/mikl/pass.git pass git remote add origin https://git.iscg.dev/mikl/password-store.git
``` ```
после этого работают алиасы: после этого работают алиасы:
```bash ```bash
pass-sync # = pass git push pass-sync # = pass git push
pass-pull # = pass git pull pass-pull # = pass git pull
@ -90,7 +89,6 @@ pass-status # = pass git status
3. **Change All...** → подтвердить 3. **Change All...** → подтвердить
для каких файлов: для каких файлов:
- `.url`, `.xhtml` → Chrome - `.url`, `.xhtml` → Chrome
- `.sh` → kitty - `.sh` → kitty
- `.pdf` → Skim - `.pdf` → Skim

View file

@ -15,6 +15,7 @@
htop htop
tldr tldr
fastfetch fastfetch
tree
# Editor # Editor
micro micro
@ -61,20 +62,6 @@
options = [ "--cmd cd" ]; options = [ "--cmd cd" ];
}; };
# Atuin - encrypted shell history with sync
programs.atuin = {
enable = true;
enableZshIntegration = true;
settings = {
auto_sync = true;
sync_frequency = "5m";
search_mode = "fuzzy";
style = "compact";
show_preview = true;
exit_mode = "return-query";
};
};
# Bat - cat with syntax highlighting # Bat - cat with syntax highlighting
programs.bat = { programs.bat = {
enable = true; enable = true;

View file

@ -14,8 +14,11 @@
home.sessionVariables = { home.sessionVariables = {
SEARXNG_URL = "https://search.iscg.dev"; SEARXNG_URL = "https://search.iscg.dev";
PATH = "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/run/current-system/sw/bin:/etc/profiles/per-user/mikl/bin:$HOME/.nix-profile/bin:$HOME/bin:$HOME/.local/bin:$HOME/.npm-global/bin:/Users/mikl/.opencode/bin:/Users/mikl/.local/share/pi-node/node-v22.23.1-darwin-arm64/bin"; PATH = "/etc/profiles/per-user/mikl/bin:$HOME/.nix-profile/bin:$HOME/bin:$HOME/.local/bin:$HOME/.npm-global/bin:/Users/mikl/.opencode/bin:/Users/mikl/.local/share/pi-node/node-v22.23.1-darwin-arm64/bin";
# OPENROUTER_API_KEY = ""; # TODO: move to sops-nix secrets
SOPS_AGE_KEY_FILE = "$HOME/.config/sops/age/keys.txt";
EDITOR = "micro"; EDITOR = "micro";
VISUAL = "micro"; VISUAL = "micro";
KUBECONFIG = "$HOME/.kube/config-jul11";
}; };
} }

View file

@ -1,12 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
# Copy kitty.app to ~/Applications/ for Spotlight indexing
# (home-manager creates symlink, Spotlight doesn't index symlinks)
home.file."Applications/kitty.app" = {
source = "${pkgs.kitty}/Applications/kitty.app";
recursive = true;
};
programs.kitty = { programs.kitty = {
enable = true; enable = true;

View file

@ -6,7 +6,7 @@
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]); package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
settings = { settings = {
PASSWORD_STORE_DIR = "$HOME/.password-store"; PASSWORD_STORE_DIR = "$HOME/.password-store";
PASSWORD_STORE_GIT = "ssh://git@git.iscg.dev:2222/mikl/pass.git"; PASSWORD_STORE_GIT = "ssh://git@git.iscg.dev:2222/mikl/password-store.git";
PASSWORD_STORE_X_SELECTION_TIMEOUT = "5"; PASSWORD_STORE_X_SELECTION_TIMEOUT = "5";
PASSWORD_STORE_CLIP_TIME = "45"; PASSWORD_STORE_CLIP_TIME = "45";
PASSWORD_STORE_GENERATED_LENGTH = "25"; PASSWORD_STORE_GENERATED_LENGTH = "25";

View file

@ -1,26 +1,26 @@
{ ... }: { ... }:
{ {
# SSH client configuration # SSH client configuration with host-specific keys
# TEMP: using single key 'poppy' for all hosts - create host-specific keys later
programs.ssh = { programs.ssh = {
enable = true; enable = true;
matchBlocks = { matchBlocks = {
# All git forges use the same key for now # Forgejo (personal) — port 2222
"git.*" = {
identityFile = "~/.ssh/poppy";
identitiesOnly = true;
addKeysToAgent = "yes";
};
# Specific hosts (port override for forgejo)
"git.iscg.dev" = { "git.iscg.dev" = {
identityFile = "~/.ssh/poppy"; identityFile = "~/.ssh/id_ed25519_forgejo";
port = 2222; port = 2222;
identitiesOnly = true; identitiesOnly = true;
addKeysToAgent = "yes"; addKeysToAgent = "yes";
}; };
# GitHub
"github.com" = {
identityFile = "~/.ssh/id_ed25519";
identitiesOnly = true;
addKeysToAgent = "yes";
};
# git.sol.moe
"git.sol.moe" = { "git.sol.moe" = {
identityFile = "~/.ssh/poppy"; identityFile = "~/.ssh/poppy";
user = "mikl"; user = "mikl";

View file

@ -9,12 +9,6 @@
}; };
CustomUserPreferences = { CustomUserPreferences = {
# Disable system sound effects (screenshots, etc.)
"com.apple.systemsound" = {
"com.apple.sound.beep.feedback" = 0; # No feedback sound when changing volume
"com.apple.sound.uiaudio.enabled" = 0; # Disable UI sounds (screenshots, etc.)
};
"com.apple.HIToolbox" = { "com.apple.HIToolbox" = {
AppleEnabledInputSources = [ AppleEnabledInputSources = [
{ {
@ -138,22 +132,13 @@
"/System/Applications/Calendar.app" "/System/Applications/Calendar.app"
"/Applications/Obsidian.app" "/Applications/Obsidian.app"
"/Applications/VSCodium.app" "/Applications/VSCodium.app"
"/Users/mikl/Applications/kitty.app" "/Users/mikl/Applications/Home Manager Apps/kitty.app"
"/System/Applications/Utilities/Activity Monitor.app"
"/System/Applications/Books.app" "/System/Applications/Books.app"
"/System/Applications/QuickTime Player.app" "/System/Applications/QuickTime Player.app"
]; ];
}; };
}; };
# Install Rosetta 2 for Intel apps on Apple Silicon
system.activationScripts.rosetta.text = ''
if ! /usr/bin/pgrep -q oahd 2>/dev/null; then
echo "Installing Rosetta 2..."
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
fi
'';
system.activationScripts.postActivation.text = '' system.activationScripts.postActivation.text = ''
echo "Restarting Dock..." echo "Restarting Dock..."
sudo -u mikl /usr/bin/killall Dock sudo -u mikl /usr/bin/killall Dock