From 9a52ffd7c61711ac9e3a7aaf6a7d72547353ce3b Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 6 Nov 2024 07:48:47 +0700 Subject: [PATCH] docs(nix): Update documentation --- nix/README.md | 40 ++++++++++++++++++++++------------------ nix/systems/nixos/.keep | 0 2 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 nix/systems/nixos/.keep diff --git a/nix/README.md b/nix/README.md index 182c932..b461de8 100644 --- a/nix/README.md +++ b/nix/README.md @@ -1,36 +1,40 @@ # `null2264`'s Nix Setup -You need to install Nix before following this guide: `sh <(curl -L https://nixos.org/nix/install)` and symlink this dir to `~/.config/nix` - ## Structure ``` ├── flake.lock ├── flake.nix -├── lib # Self-explanatory, it contains helper functions +├── lib/ # Self-explanatory, it contains helper functions │   ├── mkCommon.nix │   └── mkSystem.nix -├── modules # Contains shared configuration across system, across user +├── modules/ # Contains shared configuration across system, across user │   └── home-manager │   └── floorp.nix -├── systems # Contains configurations depending on what type OS nix is being used in -│   ├── darwin # macOS -│   │   ├── configuration.nix -│   │   └── default.nix -│   └── nix # Linux-alike -│   ├── default.nix -│   └── potato -│   └── default.nix -└── users # Contains configurations for multi-user setup - ├── default.nix - └── ziro - ├── darwin.nix - ├── default.nix - └── linux.nix +├── overlays/ # Nix overlays, self-explanatory +├── systems/ # Contains configurations depending on what type OS nix is being used in +│   ├── darwin/ # - macOS +│   │   ├── configuration.nix # -- There supposed supposed to be a split here just like `nix/`, but I got lazy +│   │ ├── default.nix # -- Where you register your Mac (based on hostname) +│   ├── nix/ # - non-NixOS (Linux/BSD/etc..) +│   │ ├── default.nix # -- Where you register your PC (based on hostname) +│   │ └── / +│   │ └── default.nix +│   └── nixos/ # - NixOS +└── users/ # Contains configurations for multi-user setup + ├── default.nix # - Where you register the user(s) + └── / # - Recommended to split it to several nix files depending on the OS type you're planning to use + ├── darwin.nix # -- macOS + ├── default.nix # -- Common (works on all OS type) + └── linux.nix # -- Linux ``` ## Setup +### Nix + +It is recommended to install nix using [Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer) or [Nix's Official Installer](https://nixos.org/download/) (with `--daemon` flag, aka Multi-user installation) instead of whatever provided by your OS' package manager to avoid potential incompatibility. + ### macOS > [!NOTE] diff --git a/nix/systems/nixos/.keep b/nix/systems/nixos/.keep new file mode 100644 index 0000000..e69de29