ops-jrz1/configuration.nix
Dan 21d3038aca Add opencode and nodejs to system packages
- opencode (v1.0.224) via flake input from github:sst/opencode
- nodejs_22 for npm-based AI tools (gemini-cli, codex)
- Closes ops-jrz1-ecw

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 17:41:48 -08:00

84 lines
2.2 KiB
Nix

{ config, pkgs, beads, opencode, ... }:
{
# Main NixOS configuration for ops-jrz1 server
# Imports host-specific configuration from hosts/ops-jrz1.nix
# Boot loader configuration (Legacy BIOS for Vultr VPS)
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; # Install to MBR
# Network configuration
networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true;
# Time zone
time.timeZone = "UTC";
# Internationalization
i18n.defaultLocale = "en_US.UTF-8";
# System packages
environment.systemPackages = with pkgs; [
vim
git
htop
curl
tmux
# Dev environment
python3
uv
direnv
# AI coding tools (via flake inputs)
beads # Issue tracker (bd CLI)
opencode # AI coding agent (opencode CLI)
# For npm-based AI tools (gemini-cli, codex): users run npm install
nodejs_22
];
# Add ~/.local/bin and /usr/local/bin to PATH for manually installed tools
environment.localBinInPath = true;
environment.shellInit = ''
export PATH="/usr/local/bin:$PATH"
'';
# Enable Nix flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# SSH configuration
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
};
# SSH authorized keys for root
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOqHsgAuD/8LL6HN3fo7X1ywryQG393pyQ19a154bO+h delpad-2025"
];
# Firewall (will be configured for Matrix services)
networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 80 443 ]; # SSH, HTTP, HTTPS
};
# ACME for Let's Encrypt certificates
security.acme = {
acceptTerms = true;
defaults.email = "dlei@duck.com";
};
# Allow deprecated olm library for Matrix bridges
# Note: olm is deprecated with known CVEs but required by mautrix bridges
# This is necessary for Matrix bridge functionality until alternatives are available
nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
];
# This value determines the NixOS release compatibility
system.stateVersion = "24.05";
}