Kieran's opinionated (and probably slightly dumb) nix config

feat: add terebithia

dunkirk.sh 17f57cd2 392fdcd9

verified
-57
INSTALL_GUIDE.md
···
-
# So, you want to use my dots?
-
-
Hey there! This guide supplements the README with additional details about using the installation scripts. I've tried to make installation as painless as possible. (mainly because i hate typing in commands manually with no autocomplete; yeah ik im not a "true" linux nerd but whatever lol)
-
-
## The Automated Way (Recommended)
-
-
### Step 1: Get connected
-
-
First, make sure you've got internet! (this is already covered in [`README.md`](/README.md) so not duplicating here) Also don't forget to double check with `ping 1.1.1.1`
-
-
### Step 2: Run the install script
-
-
```bash
-
curl -L https://raw.githubusercontent.com/taciturnaxolotl/dots/main/nixos/install.sh -o install.sh
-
chmod +x install.sh
-
./install.sh
-
```
-
-
This magic script will:
-
- Make sure you're online
-
- Enable git (required for the rest of this charade)
-
- Partition your disks with disko
-
- Clone my dots to the right place
-
- Let you add your SSH key if you've got one
-
- Install the flake
-
- Send you off to reboot land
-
-
### Step 3: First login after reboot
-
-
After the system reboots, login with user `kierank` and password `lolzthisaintsecure!`
-
-
(Please change this password immediately!)
-
-
### Step 4: Run the post-install script
-
-
```bash
-
curl -L https://raw.githubusercontent.com/taciturnaxolotl/dots/main/nixos/post-install.sh -o post-install.sh
-
chmod +x post-install.sh
-
./post-install.sh
-
```
-
-
This script will walk you through:
-
- Changing your password (if you haven't already)
-
- Moving config files to your home directory
-
- Setting up the fingerprint reader (optional)
-
- Configuring git (optional)
-
- Rebuilding the system with your hostname
-
-
## Available System Configurations
-
-
Currently, this repo has the following system configurations:
-
-
- `moonlark` - My Framework laptop setup (default config)
-
-
You'll be asked which one you want during the installation.
-
-
Good luck, and may the nix gods be with you! 🙏
+22 -5
README.md
···
├── machines
│ ├── atalanta # my macOS M4 machine
│ ├── ember # my dell r210 server (in my basement)
-
│ ├── moonlark # my framework 13
-
│ │ └── home
+
│ ├── john # shared server for cedarville
+
│ ├── moonlark # my framework 13 <dead>
│ ├── nest # shared tilde server through hc
-
│ └── tacyon # rpi 5
+
│ ├── prattle # oracle cloud x86_64 server
+
│ ├── tacyon # rpi 5
+
│ └── terebithia # oracle cloud aarch64 server
├── modules
│ ├── home # home-manager modules
│ │ ├── aesthetics # theming and wallpapers
···
│ └── system # pam and my fancy wifi module for now
└── secrets # keep your grubby hands (or paws) off my data
-
19 directories
+
16 directories
```
## Installation
···
> These instructions have been validated by installing on my friend's machine ([`Nat2-Dev/dots`](https://github.com/Nat2-Dev/dots))
-
You have two options for installation: either the full guide as follows or the install script below and instructions in [INSTALL_GUIDE.md](/INSTALL_GUIDE.md)
+
#### Using nixos-anywhere (Recommended for remote installations)
+
+
> [!INFO]
+
> This only currently works with `prattle` and `terebithia` as they have the proper disko configs setup.
+
+
For remote installations (like Oracle Cloud), use [nixos-anywhere](https://github.com/nix-community/nixos-anywhere):
+
+
```bash
+
nix run github:nix-community/nixos-anywhere -- --flake .#prattle root@<ip-address>
+
```
+
+
Replace `prattle` with your machine configuration and `<ip-address>` with your target machine's IP.
+
+
> **Note**: Make sure your SSH key is in the target machine's `authorized_keys` and the machine configuration has the correct network settings.
+
+
#### Using the install script
```bash
curl -L https://raw.githubusercontent.com/taciturnaxolotl/dots/main/install.sh -o install.sh
+11
flake.nix
···
nur.modules.nixos.default
];
};
+
+
terebithia = nixpkgs.lib.nixosSystem {
+
specialArgs = { inherit inputs outputs; };
+
modules = [
+
inputs.disko.nixosModules.disko
+
agenix.nixosModules.default
+
unstable-overlays
+
./machines/terebithia
+
nur.modules.nixos.default
+
];
+
};
};
# Standalone home-manager configurations
-95
machines/prattle/README.md
···
-
# Prattle - Oracle Cloud x86_64 NixOS Server
-
-
## Overview
-
This is a minimal NixOS server configuration for Oracle Cloud Infrastructure.
-
-
- **Hostname**: prattle
-
- **Platform**: x86_64-linux
-
- **Disk**: /dev/sda (Oracle Cloud default)
-
- **Services**: SSH, Tailscale
-
-
## Deployment with nixos-anywhere
-
-
### Prerequisites
-
1. Oracle Cloud instance running and accessible via SSH
-
2. Root SSH access or sudo access configured
-
3. Your SSH public key should already be in the configuration (already set)
-
4. **Important for Apple Silicon (M1/M2/M3) Macs**:
-
- The built-in macOS Linux builder only supports `aarch64-linux` (ARM)
-
- Since Oracle Cloud x86_64 instances use `x86_64-linux` (Intel), you **must** use `--build-on-remote`
-
- This builds the system on the target machine itself during installation
-
-
### Deploy Command
-
-
From your local machine (with flake repository):
-
-
```bash
-
# Deploy to Oracle Cloud instance (builds on remote machine)
-
nix run github:nix-community/nixos-anywhere -- \
-
--flake .#prattle \
-
-i ~/.ssh/id_rsa \
-
--build-on-remote \
-
root@<ORACLE_INSTANCE_IP>
-
```
-
-
**Note**: The `-i ~/.ssh/id_rsa` flag tells nixos-anywhere which SSH key to use during installation. Your public key (`~/.ssh/id_rsa.pub`) is already configured in the system for post-installation access.
-
-
The `--build-on-remote` flag is **required** when deploying from Apple Silicon Macs to x86_64 systems.
-
-
### Post-Installation
-
-
1. **SSH Key Changed**: The server's SSH host key will be different after installation. Remove old entry:
-
```bash
-
ssh-keygen -R <ORACLE_INSTANCE_IP>
-
```
-
-
2. **Login**: SSH into the new system:
-
```bash
-
ssh kierank@<ORACLE_INSTANCE_IP>
-
```
-
-
3. **Change Password** (optional, since SSH key auth is configured):
-
```bash
-
passwd
-
```
-
-
4. **Update the System**:
-
```bash
-
cd ~/dots
-
git pull
-
sudo nixos-rebuild switch --flake .#prattle
-
```
-
-
## Configuration Details
-
-
### Boot Configuration
-
- **Bootloader**: systemd-boot (Oracle Cloud recommended)
-
- **Kernel Parameters**: `net.ifnames=0` for predictable network interface names
-
- **EFI**: Enabled with variable modification support
-
### Disk Layout
-
- **Boot Partition**: 500MB, EFI (vfat), mounted at `/boot`
-
- **Root Partition**: Remaining space, ext4, mounted at `/`
-
-
### Network
-
- DHCP configured (Oracle Cloud default)
-
- Hostname: `prattle`
-
- Firewall enabled
-
- SSH enabled (key-based auth only)
-
- Tailscale client configured
-
-
### User Configuration
-
- **User**: kierank
-
- **Shell**: zsh
-
- **Groups**: wheel, networkmanager
-
- **SSH**: Key-based authentication configured
-
- **Initial Password**: "changeme" (change after first login)
-
-
### Installed Packages
-
Core utilities, development tools (nodejs, python, go, gcc), nix tools (nixvim, nixd, nil), networking tools (mosh, curl, wget), and more.
-
-
## Notes
-
-
- Oracle Cloud uses `/dev/sda` as the primary disk device
-
- The configuration uses disko for declarative disk partitioning
-
- Hardware configuration will be auto-generated during installation
-
- Root login via SSH is disabled for security
+179
machines/terebithia/default.nix
···
+
{
+
inputs,
+
lib,
+
config,
+
pkgs,
+
...
+
}:
+
{
+
imports = [
+
./disk-config.nix
+
./home-manager.nix
+
+
(inputs.import-tree ../../modules/nixos)
+
];
+
+
nixpkgs = {
+
hostPlatform = "aarch64-linux";
+
config = {
+
allowUnfree = true;
+
};
+
};
+
+
nix =
+
let
+
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
+
in
+
{
+
settings = {
+
experimental-features = "nix-command flakes";
+
flake-registry = "";
+
nix-path = config.nix.nixPath;
+
trusted-users = [
+
"kierank"
+
];
+
};
+
channel.enable = false;
+
optimise.automatic = true;
+
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
+
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
+
};
+
+
time.timeZone = "America/New_York";
+
+
environment.systemPackages = with pkgs; [
+
# core
+
coreutils
+
screen
+
bc
+
jq
+
psmisc
+
# cli_utils
+
direnv
+
zsh
+
gum
+
vim
+
# networking
+
xh
+
curl
+
wget
+
dogdns
+
inetutils
+
mosh
+
# nix_tools
+
inputs.nixvim.packages.aarch64-linux.default
+
nixd
+
nil
+
nixfmt-rfc-style
+
inputs.agenix.packages.aarch64-linux.default
+
# security
+
openssl
+
gpgme
+
gnupg
+
# dev_langs
+
nodejs_22
+
python3
+
go
+
gopls
+
gotools
+
go-tools
+
gcc
+
# misc
+
neofetch
+
];
+
+
programs.nh = {
+
enable = true;
+
clean.enable = true;
+
clean.extraArgs = "--keep-since 4d --keep 3";
+
flake = "/home/kierank/dots";
+
};
+
+
age.identityPaths = [
+
"/home/kierank/.ssh/id_rsa"
+
"/etc/ssh/id_rsa"
+
];
+
+
environment.sessionVariables = {
+
XDG_CACHE_HOME = "$HOME/.cache";
+
XDG_CONFIG_HOME = "$HOME/.config";
+
XDG_DATA_HOME = "$HOME/.local/share";
+
XDG_STATE_HOME = "$HOME/.local/state";
+
EDITOR = "nvim";
+
SYSTEMD_EDITOR = "nvim";
+
VISUAL = "nvim";
+
};
+
+
atelier = {
+
authentication.enable = true;
+
};
+
+
networking = {
+
hostName = "terebithia";
+
useDHCP = false;
+
defaultGateway = "10.0.0.1";
+
nameservers = [
+
"1.1.1.1"
+
"1.0.0.1"
+
"2606:4700:4700::1111"
+
"2606:4700:4700::1001"
+
];
+
interfaces.eth0 = {
+
ipv4.addresses = [
+
{
+
address = "10.0.0.147";
+
prefixLength = 24;
+
}
+
];
+
useDHCP = false;
+
};
+
};
+
+
programs.zsh.enable = true;
+
programs.direnv.enable = true;
+
+
users.users = {
+
kierank = {
+
initialPassword = "changeme";
+
isNormalUser = true;
+
shell = pkgs.zsh;
+
openssh.authorizedKeys.keys = [
+
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzEEjvbL/ttqmYoDjxYQmDIq36BabROJoXgQKeh9liBxApwp+2PmgxROzTg42UrRc9pyrkq5kVfxG5hvkqCinhL1fMiowCSEs2L2/Cwi40g5ZU+QwdcwI8a4969kkI46PyB19RHkxg54OUORiIiso/WHGmqQsP+5wbV0+4riSnxwn/JXN4pmnE//stnyAyoiEZkPvBtwJjKb3Ni9n3eNLNs6gnaXrCtaygEZdebikr9kS2g9mM696HvIFgM6cdR/wZ7DcLbG3IdTXuHN7PC3xxL+Y4ek5iMreQIPmuvs4qslbthPGYoYbYLUQiRa9XO5s/ksIj5Z14f7anHE6cuTQVpvNWdGDOigyIVS5qU+4ZF7j+rifzOXVL48gmcAvw/uV68m5Wl/p0qsC/d8vI3GYwEsWG/EzpAlc07l8BU2LxWgN+d7uwBFaJV9VtmUDs5dcslsh8IbzmtC9gq3OLGjklxTfIl6qPiL8U33oc/UwqzvZUrI2BlbagvIZYy6rP+q0= kierank@mockingjay"
+
];
+
extraGroups = [
+
"wheel"
+
"networkmanager"
+
];
+
};
+
root.openssh.authorizedKeys.keys = [
+
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzEEjvbL/ttqmYoDjxYQmDIq36BabROJoXgQKeh9liBxApwp+2PmgxROzTg42UrRc9pyrkq5kVfxG5hvkqCinhL1fMiowCSEs2L2/Cwi40g5ZU+QwdcwI8a4969kkI46PyB19RHkxg54OUORiIiso/WHGmqQsP+5wbV0+4riSnxwn/JXN4pmnE//stnyAyoiEZkPvBtwJjKb3Ni9n3eNLNs6gnaXrCtaygEZdebikr9kS2g9mM696HvIFgM6cdR/wZ7DcLbG3IdTXuHN7PC3xxL+Y4ek5iMreQIPmuvs4qslbthPGYoYbYLUQiRa9XO5s/ksIj5Z14f7anHE6cuTQVpvNWdGDOigyIVS5qU+4ZF7j+rifzOXVL48gmcAvw/uV68m5Wl/p0qsC/d8vI3GYwEsWG/EzpAlc07l8BU2LxWgN+d7uwBFaJV9VtmUDs5dcslsh8IbzmtC9gq3OLGjklxTfIl6qPiL8U33oc/UwqzvZUrI2BlbagvIZYy6rP+q0= kierank@mockingjay"
+
];
+
};
+
+
services.openssh = {
+
enable = true;
+
openFirewall = true;
+
settings = {
+
PermitRootLogin = "no";
+
PasswordAuthentication = false;
+
};
+
};
+
+
networking.firewall = {
+
enable = true;
+
allowedTCPPorts = [ 22 ];
+
logRefusedConnections = false;
+
rejectPackets = true;
+
};
+
+
services.tailscale = {
+
enable = true;
+
useRoutingFeatures = "client";
+
};
+
+
boot.loader.systemd-boot.enable = true;
+
boot.loader.efi.canTouchEfiVariables = true;
+
boot.kernelParams = [ "net.ifnames=0" ];
+
+
system.stateVersion = "23.05";
+
}
+34
machines/terebithia/disk-config.nix
···
+
# Disko configuration for Oracle Cloud
+
# Oracle Cloud typically uses /dev/sda for the boot volume
+
{
+
disko.devices = {
+
disk = {
+
main = {
+
device = "/dev/sda";
+
type = "disk";
+
content = {
+
type = "gpt";
+
partitions = {
+
ESP = {
+
type = "EF00";
+
size = "500M";
+
content = {
+
type = "filesystem";
+
format = "vfat";
+
mountpoint = "/boot";
+
};
+
};
+
root = {
+
size = "100%";
+
content = {
+
type = "filesystem";
+
format = "ext4";
+
mountpoint = "/";
+
};
+
};
+
};
+
};
+
};
+
};
+
};
+
}
+15
machines/terebithia/home-manager.nix
···
+
{ inputs, outputs, ... }:
+
{
+
imports = [
+
inputs.home-manager.nixosModules.home-manager
+
];
+
+
home-manager = {
+
extraSpecialArgs = {
+
inherit inputs outputs;
+
};
+
users = {
+
kierank = import ./home;
+
};
+
};
+
}
+29
machines/terebithia/home/default.nix
···
+
{ inputs, ... }:
+
{
+
imports = [
+
(inputs.import-tree ../../../modules/home)
+
];
+
+
nixpkgs.enable = true;
+
+
home = {
+
username = "kierank";
+
homeDirectory = "/home/kierank";
+
};
+
+
atelier = {
+
shell = {
+
enable = true;
+
};
+
apps = {
+
helix.enable = true;
+
irssi.enable = true;
+
};
+
};
+
+
programs.home-manager.enable = true;
+
+
systemd.user.startServices = "sd-switch";
+
+
home.stateVersion = "23.05";
+
}