Skip to content

ooks-io/ooknet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,195 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 ██████╗  ██████╗ ██╗  ██╗███╗   ██╗███████╗████████╗
██╔═══██╗██╔═══██╗██║ ██╔╝████╗  ██║██╔════╝╚══██╔══╝
██║   ██║██║   ██║█████╔╝ ██╔██╗ ██║█████╗     ██║   
██║   ██║██║   ██║██╔═██╗ ██║╚██╗██║██╔══╝     ██║   
╚██████╔╝╚██████╔╝██║  ██╗██║ ╚████║███████╗   ██║   
 ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═══╝╚══════╝   ╚═╝ .org

A monorepo for all my nix expressions powered by flake-parts.

Overview

The goals of this repository are:

  1. To maintain a centralized location for all my personal computing infrastructure
  2. To provide a place to experiment and learn about networking, administration, security, unix, design, and programming

Warning

This repository isn't intended to be used by anyone but myself. It's highly personalized and likely doesn't fit anyone else's needs. I maintain this repository publicly as a reference for anyone building something similar.

Features

  • NixOS configurations for all my hosts
  • Home-Manager configuration for my workstations
  • Custom packages
  • Development environments
  • Declarative secrets with agenix
  • Personal website
  • Templates for bootstrapping projects

Fleet

Below are all the hosts I currently maintain within this flake:

host spec role description architecture status
ooksdesk 7500F / RX5700XT / 32 GB DDR5 Workstation Primary desktop workstation x86_64 UP
ookst480s T480s / i5-8350U / 24 GB DDR4 Workstation Secondary mobile workstation x86_64 UP
ooksmicro GPD Micro PC / N8100 / 8 GB LPDR3 Workstation Pocket workstation x86_64 UP
ooksmedia i3-10100 / 1650 Super / 64 GB DDR4 Server Homelab/Media server x86_64 UP
ooksx1 X1 Carbon G4 / i5 6200U / 8 GB LPDDR3 Workstation Guest laptop x86_64 UP
ooknode Linode Nanode Server VPS for website x86_64 UP
ookstest QEMU VM Server Disposable test/sandbox server x86_64 N/A
ooksphone Termux Workstation Nix environment for android phone aarch64 DOWN
ooksair M4 MBA Workstation Primary mobile workstation aarch64-darwin UP
ooksinstall Live ISO Installer Bootable installer image x86_64 N/A

Architecture

As this project serves as a learning environment, its architecture changes frequently. While I'll try to keep this documentation current, what follows is a high-level overview of the current design.

The current architecture enables straightforward bootstrapping of new hosts while maintaining fine-grained configuration on a per-host basis. This is accomplished using a roles and profiles pattern (similar to Puppet's roles and profiles method).

Roles

  • Workstation: Desktop/laptop systems with a GUI environment
  • Server: Headless systems running specific services
  • Installer: Bootable ISO images for provisioning new hosts

Hosts are declared as plain data under flake.ooknet.{workstations,servers,images}. The builders in outputs/builder/ map that data with mapAttrs into nixosConfigurations / darwinConfigurations, wiring up the right platform modules (lib.nixosSystem for linux, nix-darwin's darwinSystem for macos) and importing the matching host module from hosts/<hostname>. The host attribute name is the hostname, so a declaration only carries what makes the host unique while the builder absorbs the boilerplate.

Workstations:

flake.ooknet.workstations = {
  ookst480s = {
    system = "x86_64-linux";
    type = "laptop";
  };
  ooksair = {
    system = "aarch64-darwin";
    type = "laptop";
  };
};

Servers:

flake.ooknet.servers = {
  ooknode = {
    system = "x86_64-linux";
    type = "vm";
    profile = "linode";
    domain = "ooknet.org";
    services = ["website" "forgejo"];
  };
};

Installer images:

flake.ooknet.images = {
  ooksinstall = {
    system = "x86_64-linux";
    type = "iso";
    role = "installer";
  };
};

Profiles

Profiles are collections of related software and configuration that can be enabled on a per-host basis. Some example workstation profiles:

  • gaming: Steam & emulators
  • communication: Discord, Teams, Matrix
  • productivity: Document editing, note-taking
  • creative: Art and design tools
  • media: Audio/video playback and management
  • virtualization: Virtual machine support
  • infra: Infrastructure and ops tooling
  • work: Work specific tooling

Example:

ooknet.workstation.profiles = ["gaming" "creative" "media"];

Servers pick a base profile (for VMs, e.g. linode) and a list of services to run. Some example services:

  • website: My static website
  • forgejo: Git server
  • ookflix: Media server services
  • monitoring: Metrics and dashboards
  • authentik: Identity provider
ooknet.server.services = ["ookflix" "monitoring"];

Desktop environment

All workstations use a minimal wayland configuration made from the following components:

Appreciation

I want to give some appreciation to the many people/resources who have helped in some way to build this project.

People

Resources

About

my over engineered nixos config

Resources

License

Stars

Watchers

Forks

Contributors