Skip to content

Commit

Permalink
feat: Directory listing target, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitawootten committed May 16, 2024
1 parent 53ccec3 commit 72e7c15
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 26 deletions.
38 changes: 38 additions & 0 deletions .info
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
darwinHosts/persephone/
Mac Mini, mostly used for work

hosts/cochrane/
GPD Pocket 2 mini-computer, neglected & seldom used
hosts/dionysus/
Custom-build workhorse (Ryzen 2920X, NVIDIA 2080ti)
hosts/hades/
Dell PowerEdge R720XD, primary home server
hosts/iris/
Raspberry Pi 4, secondary home server
hosts/olympus/
Dell PowerEdge R610, currently unused
hosts/raspberrypi4/
Raspberry Pi 4 bootstrap configuration
hosts/voyager/
Framework 13 (11th Gen Intel), primary laptop

hostModules/dslr-webcam/
Module I use to configure my Olympus OM-D camera as a webcam
hostModules/homelab/
Re-usable homelab modules for media, observability, and more
hostModules/raspi4sd/
Raspberry Pi 4 SD card configuration
hostModules/personal/
Misc. server and desktop config

homeModules/personal/
Misc. config, dotfiles, applications, and hacky utilities
Makes every computer it infects feel like home
Note: Look around before using unless you want to become me

lib/
NixOS and Home-Manager configuration helpers
Note: currently being phased out

secrets/
Age secrets managed by AgeNix
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL:=/usr/bin/env bash

NIX_CMD:=nix --experimental-features 'nix-command flakes'
NIX_CMD:=nix --experimental-features 'nix-command flakes' --no-warn-dirty

# This help command was adapted from https://github.com/tiiuae/sbomnix
# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
Expand Down Expand Up @@ -95,3 +95,7 @@ list-hosts: ## List NixOS configuration names
.PHONY: get-system
get-system: ## Get the current system name
@$(NIX_CMD) eval --impure --raw --expr 'builtins.currentSystem'

.PHONY: directory
directory: ## Print information about important directories in this repository
@$(NIX_CMD) develop --command tree -dL 2 --info --noreport
81 changes: 56 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,66 @@ Welcome to my Nix-ified infrastructure and personal monorepo.
![man made horrors beyond comprehension](https://gist.githubusercontent.com/nikitawootten/a0b5b3e0afdaaa8e02ace16b955da7ec/raw/flake-graph.svg)
*Flake dependency diagram [generated](./.github/workflows/artifacts.yaml) with [`nikitawootten/flake-graph`](https://github.com/nikitawootten/flake-graph).*

## Projects
## Contents

This repository contains my Nix-related experiments.
Beyond managing dotfiles, I have also experimented with [packaging some of my commonly used applications](#packages), [managing a homelab worth of services](#homelab), and [packaging a few flake utilities](#flake-utilities).
Beyond managing dotfiles, I have also experimented with [packaging some of my commonly used applications](#packages) and [managing a homelab worth of services](#homelab).

```text
Common operations are defined in the root [`Makefile`](./Makefile).
To list Makefile targets run `make help`.

`make directory` can help if you're lost:

<!--
TODO: When I'm feeling really bored, generate automatically with a pre-commit hook
-->
```console
$ make directory
.
├── homeModules/ # Re-usable Home-Manager modules
├── homes/ # Home-Manager configurations
├── hostModules/ # Re-usable NixOS modules
├── hosts/ # NixOS configurations
├── lib/ # Re-usable flake utilities
├── packages/ # My packages
├── Makefile # Common operations defined here
├── README.md # You are here
├── darwinHosts
│ └── persephone
│ { Mac Mini, mostly used for work
├── darwinModules
│ └── personal
├── homeModules
│ └── personal
│ ⎧ Misc. config, dotfiles, applications, and hacky utilities
│ ⎨ Makes every computer it infects feel like home
│ ⎩ Note: Look around before using unless you want to become me
├── homes
├── hostModules
│ ├── dslr-webcam
│ │ { Module I use to configure my Olympus OM-D camera as a webcam
│ ├── homelab
│ │ { Re-usable homelab modules for media, observability, and more
│ ├── personal
│ │ { Misc. server and desktop config
│ └── raspi4sd
│ { Raspberry Pi 4 SD card configuration
├── hosts
│ ├── cochrane
│ │ { GPD Pocket 2 mini-computer, neglected & seldom used
│ ├── dionysus
│ │ { Custom-build workhorse (Ryzen 2920X, NVIDIA 2080ti)
│ ├── hades
│ │ { Dell PowerEdge R720XD, primary home server
│ ├── iris
│ │ { Raspberry Pi 4, secondary home server
│ ├── olympus
│ │ { Dell PowerEdge R610, currently unused
│ ├── raspberrypi4
│ │ { Raspberry Pi 4 bootstrap configuration
│ └── voyager
│ { Framework 13 (11th Gen Intel), primary laptop
├── lib
│ ⎧ NixOS and Home-Manager configuration helpers
│ ⎩ Note: currently being phased out
├── packages
│ ├── oscal-cli
│ ├── oscal-deep-diff
│ └── xspec
└── secrets
{ Age secrets managed by AgeNix
```

### Packages
Expand All @@ -43,17 +88,3 @@ If you would like to see these packages submitted [upstream](https://github.com/
The [`homelab` NixOS module](./hostModules/homelab/) packages most of my homelab-specific configuration, including media management and monitoring.

For usage examples, refer to the [`hades`](./hosts/hades/) and [`iris`](./hosts/iris/) host configurations:

### Flake Utilities

I have created a few Flake helpers and placed them in [`lib/`](./lib):

- [`mkHomes`](./lib/mkHomes.nix): Home-Manager configuration helper that generates Home-Manager and NixOS module compatible outputs and imports `user@hostname`-specific Home-Manager modules by path.
- [`mkHosts`](./lib/mkHosts.nix): NixOS configuration helper that imports a corresponding Home-Manager configuration and imports `hostname`-specific NixOS modules by path.

Refer to [`flake.nix`](./flake.nix) for usage.

## Usage

Common operations are defined in the root [`Makefile`](./Makefile).
To list Makefile targets run `make help`.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
jq
graphviz
helix
tree
] ++ [
inputs.home-manager.packages.${system}.default
inputs.agenix.packages.${system}.default
Expand Down

0 comments on commit 72e7c15

Please sign in to comment.