Skip to content

Commit

Permalink
Merge branch 'docs'
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jan 1, 2025
2 parents c837a12 + efcf572 commit 76a53e7
Show file tree
Hide file tree
Showing 27 changed files with 345 additions and 207 deletions.
5 changes: 0 additions & 5 deletions .github/TODO.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
logger: pretty
diagnostic-endpoint: ""

- name: Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and deploy docs

on:
workflow_dispatch:
push:
paths:
- "docs/**/*"
- ".github/workflows/docs.yml"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Lix
uses: DeterminateSystems/nix-installer-action@main
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
logger: pretty
diagnostic-endpoint: ""

- name: Build Linux packages
run: "nix build -L .#docs"

- name: Upload Pages Artifact
uses: "actions/upload-pages-artifact@v3"
with:
path: "result/"

deploy:
needs: "build"
runs-on: "ubuntu-latest"

permissions:
pages: "write"
id-token: "write"

environment:
name: "github-pages"
url: "${{ steps.deployment.outputs.page_url }}"

steps:
- name: "Deploy to GitHub Pages"
id: "deployment"
uses: "actions/deploy-pages@v4"
2 changes: 1 addition & 1 deletion .github/workflows/generate-topology.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Move files
run: |
nix shell nixpkgs#imagemagick
magick ./result/topology.svg ./.github/images/topology.png
magick ./result/topology.svg ./docs/src/images/topology.png
- name: Commit & Push
uses: endbug/add-and-commit@v9
Expand Down
203 changes: 2 additions & 201 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,6 @@

![image of my flakes topology](./.github/images/topology.png)

<!--toc:start-->

- [Foreword](#foreword)
- [What does this repo provided](#what-does-this-repo-provided)
- [Config layout](#config-layout)
- [Usage Notes](#usage-notes)
- [Using the templates](#using-the-templates)
- [Shortcuts](#shortcuts)
- [Installation Notes](#installation-notes)
- [NixOS](#nixos)
- [Dual boot](#dual-boot)
- [macOS](#macos)
- [Small bits](#small-bits)
- [Additional notes](#additional-notes)
- [Resources](#resources)
- [Projects / Configurations](#projects-configurations)
- [People](#people)

<!--toc:end-->

### Foreword

This repository contains my **personal** configuration for my systems, so its really important that you know it's **personal** and not everything will fit your needs.
Expand All @@ -62,9 +42,6 @@ Therefore most things will not work out of the box without some changes, so be w
> [!WARNING]
> Also to note that this configuration will **not** work if you do not change any of the [secrets](./secrets) since they are encrypted.
> [!TIP]
> You can find some cool blogs and people at the bottom of this file, or [click here](#additional-notes)
### What does this repo provided

- Several applications and tools for my needs, but you can choose the one that best suits your needs
Expand All @@ -77,183 +54,7 @@ Therefore most things will not work out of the box without some changes, so be w
- Docs kind of
- [Catppuccin](https://github.com/catppuccin/catppuccin) everywhere, with a hint of [evergarden](https://github.com/comfysage/evergarden)

### Config layout

- 🏠 [home](./home/) Where all home-manager configurations lie
- 🖥️ [systems](./systems/)
- ☀️ [Amaterasu](./systems/amaterasu) My high-end gaming machine
- 🐉 [Hydra](./systems/hydra/) A super mid spec laptop
-[Lilith](./systems/lilith/) A NixOS ISO image that can be quickly deployed and accessed via ssh
- ⚖️ [minerva](./systems/minerva/) A server configuration for some of my infrastructure
- 𖤍 [Valkyrie](./systems/valkyrie/) A WSL2 host, designed to be a development environment on Windows
- 💮 [Tatsumaki](./systems/tatsumaki/) A MacBook Air, configured to last a whole day of university
- 🧩 [parts](./parts/) NixOS parts breaking down the complex configuration into smaller more manageable chunks
- 📚 [lib](./parts/lib/) Useful repeated functions
- 🛠️ [templates](./parts/templates/) Templates for setting up development environments
- 👾 [modules](./parts/modules/) Exported modules for NixOS, home-manager and Nix Darwin
- 🔌 [modules](./modules/)
- [base](./modules/base/) The base configuration settings, which are common between all systems
- [darwin](./modules/darwin/) Pre-made modules for exclusively darwin systems
- [nixos](./modules/nixos/) Pre cooked modules for exclusively nixos systems
- [iso](./modules/iso/) Pre-configured modules prepared for making NixOS iso images
- [extra](./modules/extra) Extra configuration modules, for home-manager and Nix Darwin and NixOS
- [profiles](./modules/profiles/) Pre-made profiles for different system types
- [hardware](./modules/profiles/hardware) Optimized settings for different devices (e.g., laptop, servers, desktop)
- [meta](./modules/profiles/meta) Optimized configurations for different natures (e.g., headless, graphical)

> [!TIP]
> When looking for my custom modules or packages you should direct yourself to [isabelroses/beapkgs](https://github.com/isabelroses/beapkgs). If you are specifically looking for remote modules (sometimes not clearly labelled), it is worth looking through the [beapkgs docs](https://isabelroses.github.io/beapkgs/).
### Usage Notes

#### Using the templates

To use the templates there are two commands you can run, they are:

- `nix flake init -t github:isabelroses/dotfiles#<template>` to initialize a new project with the template
- `nix flake new -t github:isabelroses/dotfiles#<template> <out dir>` to create a new project in the specified directory

For the full list of templates you can look in the [templates](./parts/templates/) directory or run `nix flake show github:isabelroses/dotfiles`.

<details>
<summary>

#### Shortcuts

</summary>

| SKHD Shortcut | Hyprland Shortcut | What it does |
| ----------------------------- | ------------------------------- | -------------------------- |
| <kbd>CMD+RETURN</kbd> | <kbd>SUPER+RETURN</kbd> | open terminal |
| | <kbd>SUPER+B</kbd> | open browser |
| | <kbd>SUPER+C</kbd> | open editor |
| | <kbd>SUPER+O</kbd> | open notes |
| | <kbd>SUPER+E</kbd> | open file manager |
| <kbd>CMD+Q</kbd> | <kbd>SUPER+Q</kbd> | quit |
| <kbd>CMD+D</kbd> | <kbd>SUPER+D</kbd> | launcher |
| | <kbd>SUPER+F</kbd> | full screen |
| <kbd>CMD+CTRL+[number]</kbd> | <kbd>SUPER+[number]</kbd> | open workspace [number] |
| <kbd>CMD+SHIFT+[number]</kbd> | <kbd>SUPER+SHIFT+[number]</kbd> | move to workspace [number] |

</details>

#### Installation Notes

##### NixOS

You might want to use the [lilith iso configuration](./systems/lilith/), provided in this repository

- To build it you can run `nix build .#images.lilith`.
- Or you can download it from the [release page](https://github.com/isabelroses/dotfiles/releases/latest).

If you opted to use the lilith iso image, you can use the `iznix-install` script to install it on your system.
Otherwise, you can follow the steps below.

1. Install [NixOS](https://nixos.org/download), you might need to follow the [manual](https://nixos.org/manual/nixos/stable/index.html#sec-installation)
2. Clone this repository to `~/.config/flake`
3. Run `sudo nixos-rebuild switch --flake ~/.config/flake#<host>`

###### Dual boot

If you would like to set up duel boot with Windows, you should consider enabling secure boot.
To do so you should follow the [lanzaboote guide](https://github.com/nix-community/lanzaboote/blob/0bc127c631999c9555cae2b0cdad2128ff058259/docs/QUICK_START.md).

1. Locate the Windows EFI partition

```sh
lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT
```

2. Mount the Windows EFI partition

```sh
sudo mkdir /mnt/winboot
sudo mount /dev/nvme0n1p1 /mnt/winboot
```

3. Copy the Windows EFI files to the NixOS EFI partition

```sh
sudo rsync -av /mnt/winboot/EFI/Microsoft/ /boot/EFI/Microsoft/
```

4. Finally, clean up

```sh
sudo umount /mnt/winboot
sudo rmdir /mnt/winboot
```

##### macOS

1. Install [Lix](https://lix.systems/install/) the package manager

```sh
curl -sSf -L https://install.lix.systems/lix | sh -s -- install
```

2. Then enter a nix development shell in order to use git and other required tools

```sh
nix develop
```

3. Now we need to switch to the configuration, remember to replace `<host>` with the system you are configuring

```sh
just provision <host>
```

#### Small bits

- Anything starting with `garden` is likely a part of my internal module. So keep that in mind when reading the code.

### Additional notes

#### Resources

A collection of resources from people who just make good stuff.

- [Xe's blog](https://xeiaso.net/blog/)
- [The aux forum](https://forum.aux.computer/)
- [Viper's Blog](https://ayats.org/)
- [Nix Pills](https://nixos.org/guides/nix-pills/), this one might be a bit much if you don't care too much about the internals
- [Solène's Blog](https://dataswamp.org/~solene)
- [Jade Lovelace's blog](https://jade.fyi/)
- [Astrid's blog](https://astrid.tech/t/nixos)
- [nixpkgs news](https://nixpkgs.news/)
- [nix.dev](https://nix.dev/)
- [cafkafk's blog](https://cafkafk.dev/)
- [zimbatm's blog](https://zimbatm.com/notes)
- [my own blog](https://isabelroses.com/blog/tag/nix)
- [official wiki](https://wiki.nixos.org/wiki/NixOS_Wiki)
- [zero to nix](https://zero-to-nix.com/start)

#### Projects / Configurations

These are some configuration or projects that I have taken inspiration from or find to be of a high quality that people should also consider reading.

- [lovesegfault/nix-config](https://github.com/lovesegfault/nix-config)
- [jakehamilton/config](https://github.com/jakehamilton/config)
- [flake parts](https://flake.parts/)
- [nixos-hardware](https://github.com/NixOS/nixos-hardware)
- [getchoo/flake](https://github.com/getchoo/flake)
- [uncenter/flake](https://github.com/uncenter/flake)

#### People

Thanks to all these people otherwise this config and I would be lost.

- [comfysage](https://github.com/comfysage), for making my day that bit brighter and occasionally putting me on your back
- [getchoo](https://github.com/getchoo), for making catppucin/nix and helping a ton
- [nullishamy](https://github.com/nullishamy), for tricking me into using NixOS
- [nekowinston](https://github.com/nekowinston), for fixing half my problems
- [jakehamilton](https://github.com/jakehamilton), for teaching me too much about modules
- [nyxkrage](https://github.com/nyxkrage), for being there to answer my questions
- [NotAShelf](https://github.com/notashelf), lots of valuable information
- [Minion3665](https://github.com/Minion3665), for making me write better docs
- [Thorn](https://git.avery.garden/thorn), picrewnix????

And of course all those who star this repo!
> [!NOTE]
> Please read [the documentation](https://dotfiles.isabelroses.com/)
[![Star History Chart](https://api.star-history.com/svg?repos=isabelroses/dotfiles&type=Date)](https://star-history.com/#isabelroses/dotfiles&Date)
19 changes: 19 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[book]
authors = ["Isabel Roses", "Robin Roses"]
language = "en"
multilingual = false
src = "src"
title = "dotfiles"

[build]
build-dir = "./dist"

[output.html]
default-theme = "latte"
preferred-dark-theme = "mocha"
git-repository-url = "https://dotfiles.isabelroses.com"
git-repository-icon = "fa-code-fork"
cname = "dotfiles.isabelroses.com"
additional-css = ["./theme/catppuccin.css", "./theme/catppuccin-alerts.css"]

[preprocessor.alerts]
Empty file added docs/src/README.md
Empty file.
20 changes: 20 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Summary

[Introduction](README.md)

# Config

- [installation](config/installation.md)
- [layout](config/layout.md)
- [shortcuts](config/shortcuts.md)
- [templates](config/templates.md)
- [adding systems](config/adding-systems.md)
- [adding users](config/adding-users.md)

# Further Reading

- [further reading](further-reading.md)

# Misc

- [previews](misc/previews.md)
36 changes: 36 additions & 0 deletions docs/src/config/adding-systems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
The systems are configured in `/systems/<hostname>`.

To set up a system configuration it must be declared in `/systems/default.nix`.

- arch:

- default: "x86_64"
- options: "x86_64", "aarch64"

- target:

- default: "nixos"
- options: "nixos", "darwin", "iso"

- system:

- default: `constructSystem config.hosts.<hostname>.target config.hosts.<hostname>.arch`
- note: This is a function that constructs the system configuration, it will make `x86_64-linux` by from the `target` and `arch` attributes or `aarch64-darwin`

- deployable:

- default: false

- modules:

- default: "[ ]"
- options:
- laptop: for laptop type configurations
- desktop: for desktop type configurations
- server: for server type configurations
- wsl: for wsl systems
- gaming: for systems that have a graphical interface
- headless: for systems that do not have a graphical interface

- specialArgs:
- default: "{ }"
4 changes: 4 additions & 0 deletions docs/src/config/adding-users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The user side is configured in `/home/<user>`.

To set up a user configuration it must be declared in
`/modules/base/users/options.nix` and `/modules/base/users/<user>.nix` can be used for anything that is not preconfigured by `/modules/base/users/mkusers.nix`.
Loading

0 comments on commit 76a53e7

Please sign in to comment.