SilverSight/deploy/netcup-rs1000/setup.sh
allaun 3b6baec64e wip: durability snapshot of local working tree (pre-existing, uncommitted)
Snapshot of previously-uncommitted local work so nothing is lost after the
power outage. NOT reviewed for correctness — a WIP checkpoint, not a feature:
- multi-language hachimoji encoders (c/cpp/fortran/julia/octave/r/scala/go/rust/coq)
- formal Lean WIP (BraidTree, Eisenstein, HachimojiCapture, MathlibConnect,
  ModularFormBridge, ClusterManifold) + lakefile + E8Sidon edit
- docs/, experiments/ (epyc oisc benches), deploy/, scripts, test scaffolding
- .gitignore: exclude **/target/ and Coq build artifacts

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:49:53 -05:00

68 lines
2.2 KiB
Bash

#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nix
set -euo pipefail
# ── 1. Find interface name ────────────────────────────────────────
IFACE=$(ip -o link show | grep -v lo | awk -F': ' '{print $2}' | head -1)
echo "Interface: $IFACE"
# ── 2. Write minimal configuration ──────────────────────────────────
cat > /etc/nixos/hardware-configuration.nix << 'EOF'
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
system.stateVersion = "24.11";
}
EOF
cat > /etc/nixos/configuration.nix << 'NIXEOF'
{ config, lib, pkgs, ... }:
let
iface = builtins.readFile /var/iface_name |> builtins.replaceStrings ["\n"] [""];
in {
imports = [ ./hardware-configuration.nix ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "neon-rs1000";
networking.domain = "researchstack.info";
networking.useDHCP = true;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = true;
KbdInteractiveAuthentication = true;
};
};
users.users.allaun = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
initialPassword = "Silverkitten14";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDrWDlPkRTdPvx5RfWBTDYF6FNJgOLf6tS3PAgQDgMHb allaun@qfox-1"
];
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDrWDlPkRTdPvx5RfWBTDYF6FNJgOLf6tS3PAgQDgMHb allaun@qfox-1"
];
security.sudo.wheelNeedsPassword = false;
environment.systemPackages = with pkgs; [ vim git curl wget htop ];
system.stateVersion = "24.11";
}
NIXEOF
# ── 3. Rebuild and reboot ─────────────────────────────────────────
nixos-rebuild switch --upgrade
echo "✅ SSH should now be reachable at 159.195.136.129"