Skip to content

Commit

Permalink
✨ (discord): Using nixcord !
Browse files Browse the repository at this point in the history
  • Loading branch information
theobori committed Oct 31, 2024
1 parent 6347953 commit dfcafe4
Show file tree
Hide file tree
Showing 10 changed files with 407 additions and 119 deletions.
41 changes: 41 additions & 0 deletions docs/docs/customization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Customization

My Nix configuration, based on the [SnowfallOrg lib](https://github.com/snowfallorg/lib) structure, provides a
flexible and organized approach to managing your Nix environment. Here's how it
works:

- **Custom Library**: An optional custom library in the `lib/` directory
contains a Nix function called with `inputs`, `snowfall-inputs`, and `lib`.
The function should return an attribute set to merge with `lib`.

- **Modular Directory Structure**: You can create any (nestable) directory
structure within `lib/`, `packages/`, `modules/`, `overlays/`, `systems/`, and
`homes/`. Each directory should contain a Nix function that returns an
attribute set to merge with the corresponding section.

- **Package Overlays**: The `packages/` directory includes an optional set of
packages to export. Each package is instantiated with `callPackage`, and the
files should contain functions that take an attribute set of packages and the
required `lib` to return a derivation.

- **Modules for Configuration**: In the `modules/` directory, you can define
NixOS modules for various platforms, such as `nixos`, `darwin`, and `home`.
This modular approach simplifies system configuration management.

- **Custom Overlays**: The `overlays/` directory is for optional custom
overlays. Each overlay file should contain a function that takes three
arguments: an attribute set of your flake's inputs and a `channels` attribute
containing all available channels, the final set of `pkgs`, and the previous
set of `pkgs`. This allows you to customize package sets effectively.

- **System Configurations**: The `systems/` directory organizes system
configurations based on architecture and format. You can create configurations
for different architectures and formats, such as `x86_64-linux`,
`aarch64-darwin`, and more.

- **Home Configurations**: Similar to system configurations, the `homes/`
directory organizes home configurations based on architecture and format. This
is especially useful if you want to manage home environments with Nix.

This structured approach to Nix configuration makes it easier to manage and
customize your Nix environment while maintaining flexibility and modularity.
30 changes: 30 additions & 0 deletions docs/docs/features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Features

Here's an overview of what my Nix configuration offers:

- **External Dependency Integrations**:
- Access the Nix User Repository (NUR) for additional packages and
enhancements.

- **macOS Support**: Seamlessly configure and manage Nix on macOS using the
power of [Nix-darwin](https://github.com/LnL7/nix-darwin), also leveraging homebrew for GUI applications.

- **Home Manager**: Manage your dotfiles, home environment, and user-specific
configurations with [Home Manager](https://github.com/nix-community/home-manager).

- **DevShell Support**: The flake provides a development shell (`devShell`) to
support maintaining this flake. You can use the devShell for convenient
development and maintenance of your Nix environment.

- **CI with Cachix**: The configuration includes continuous integration (CI)
that pushes built artifacts to [Cachix](https://github.com/cachix/cachix). This ensures efficient builds and
reduces the need to build dependencies on your local machine.

- **Utilize sops-nix**: Secret management with [sops-nix](https://github.com/Mic92/sops-nix) for secure and encrypted
handling of sensitive information.

- **Theming with stylix**: Management of system and application colorscheme,
fonts and wallpaper with [stylix](https://stylix.danth.me).

- **Declarative disk partitioning**: Use [disko](https://github.com/nix-community/disko) to declare your disk and format it
using the Nix language.
101 changes: 2 additions & 99 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
# ❄️ My NixOS Configuration

[![check](https://github.com/theobori/nixos-configuration/actions/workflows/check.yml/badge.svg)](https://github.com/theobori/nixos-configuration/actions/workflows/check.yml) [![pages](https://github.com/theobori/nixos-configuration/actions/workflows/pages.yml/badge.svg)](https://github.com/theobori/nixos-configuration/actions/workflows/pages.yml)

[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)

This repository contains all the Nix declarations I use to build my systems.

## Table of Contents

1. [Getting Started](#getting-started)
2. [Features](#features)
3. [Customization](#customization)
4. [Resources](#resources)

## Getting Started
# Getting Started

Before diving in, ensure that you have Nix installed on your system. If not, you
can download and install it from the official
Expand Down Expand Up @@ -63,86 +48,4 @@ Here's an example.

```bash
nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config systems/x86_64-linux/vm/hardware-configuration.nix nixos@<destination> --flake .#<system-name>
```

## Features

Here's an overview of what my Nix configuration offers:

- **External Dependency Integrations**:
- Access the Nix User Repository (NUR) for additional packages and
enhancements.

- **macOS Support**: Seamlessly configure and manage Nix on macOS using the
power of [Nix-darwin](https://github.com/LnL7/nix-darwin), also leveraging homebrew for GUI applications.

- **Home Manager**: Manage your dotfiles, home environment, and user-specific
configurations with [Home Manager](https://github.com/nix-community/home-manager).

- **DevShell Support**: The flake provides a development shell (`devShell`) to
support maintaining this flake. You can use the devShell for convenient
development and maintenance of your Nix environment.

- **CI with Cachix**: The configuration includes continuous integration (CI)
that pushes built artifacts to [Cachix](https://github.com/cachix/cachix). This ensures efficient builds and
reduces the need to build dependencies on your local machine.

- **Utilize sops-nix**: Secret management with [sops-nix](https://github.com/Mic92/sops-nix) for secure and encrypted
handling of sensitive information.

- **Theming with stylix**: Management of system and application colorscheme,
fonts and wallpaper with [stylix](https://stylix.danth.me).

- **Declarative disk partitioning**: Use [disko](https://github.com/nix-community/disko) to declare your disk and format it
using the Nix language.

## Customization

My Nix configuration, based on the [SnowfallOrg lib](https://github.com/snowfallorg/lib) structure, provides a
flexible and organized approach to managing your Nix environment. Here's how it
works:

- **Custom Library**: An optional custom library in the `lib/` directory
contains a Nix function called with `inputs`, `snowfall-inputs`, and `lib`.
The function should return an attribute set to merge with `lib`.

- **Modular Directory Structure**: You can create any (nestable) directory
structure within `lib/`, `packages/`, `modules/`, `overlays/`, `systems/`, and
`homes/`. Each directory should contain a Nix function that returns an
attribute set to merge with the corresponding section.

- **Package Overlays**: The `packages/` directory includes an optional set of
packages to export. Each package is instantiated with `callPackage`, and the
files should contain functions that take an attribute set of packages and the
required `lib` to return a derivation.

- **Modules for Configuration**: In the `modules/` directory, you can define
NixOS modules for various platforms, such as `nixos`, `darwin`, and `home`.
This modular approach simplifies system configuration management.

- **Custom Overlays**: The `overlays/` directory is for optional custom
overlays. Each overlay file should contain a function that takes three
arguments: an attribute set of your flake's inputs and a `channels` attribute
containing all available channels, the final set of `pkgs`, and the previous
set of `pkgs`. This allows you to customize package sets effectively.

- **System Configurations**: The `systems/` directory organizes system
configurations based on architecture and format. You can create configurations
for different architectures and formats, such as `x86_64-linux`,
`aarch64-darwin`, and more.

- **Home Configurations**: Similar to system configurations, the `homes/`
directory organizes home configurations based on architecture and format. This
is especially useful if you want to manage home environments with Nix.

This structured approach to Nix configuration makes it easier to manage and
customize your Nix environment while maintaining flexibility and modularity.

## Resources

Other configurations from where I learned and copied:

- [hmajid2301/nixicle](https://gitlab.com/hmajid2301/nixicle)
- [khaneliman/khanelinix](https://github.com/khaneliman/khanelinix)
- [JakeHamilton/config](https://github.com/jakehamilton/config)

```
7 changes: 7 additions & 0 deletions docs/docs/resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Resources

Other configurations from where I learned and copied:

- [hmajid2301/nixicle](https://gitlab.com/hmajid2301/nixicle)
- [khaneliman/khanelinix](https://github.com/khaneliman/khanelinix)
- [JakeHamilton/config](https://github.com/jakehamilton/config)
3 changes: 2 additions & 1 deletion docs/docs/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

Here are a non-exhaustive list of tasks.

- Better email accounts management
- [x] Use [nixcord](https://github.com/KaylorBen/nixcord) to entirely manage Discord with Nix declarations
- [ ] Better email accounts management
8 changes: 6 additions & 2 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
site_name: My NixOS Configuration
site_name: ❄️ My NixOS Configuration
site_url: https://github.com/theobori/nixos-configuration
repo_url: https://github.com/theobori/nixos-configuration
repo_name: theobori/nixos-configuration
edit_uri: edit/main/docs/docs
site_author: Théo Bori

nav:
- Home: index.md
- Getting Started: index.md
- Configuration:
- Features: features.md
- Customization: customization.md
- Resources: resources.md
- Tasks: tasks.md

plugins:
Expand Down
74 changes: 62 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dfcafe4

Please sign in to comment.