From 038320824961c33c25d0a0c59844f792ee224471 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Mon, 6 Feb 2023 16:17:25 +0100 Subject: Misc: Update README and documentation Now it should be more user friendly, hopefully making it easier to install. --- Documentation/INSTALLING.md | 59 +++++++++++++++++++++++++++++++++++ Documentation/PARTITIONING.md | 11 +++++++ Documentation/desktop_screenshot.png | Bin 0 -> 367768 bytes 3 files changed, 70 insertions(+) create mode 100644 Documentation/INSTALLING.md create mode 100644 Documentation/PARTITIONING.md create mode 100644 Documentation/desktop_screenshot.png (limited to 'Documentation') diff --git a/Documentation/INSTALLING.md b/Documentation/INSTALLING.md new file mode 100644 index 0000000..880845a --- /dev/null +++ b/Documentation/INSTALLING.md @@ -0,0 +1,59 @@ +# Installing + +My NixOS configuration is modular by design. In practice, this means that you can build a NixOS configuration for your own machine by selecting any combination of these 3 variables: + +--- +`$HOST` -> this refers to the host-specific configuration (packages, services, etc). This loads the host-specific configuration from `/hosts/$HOST/default.nix` + +`$HARDWARE` -> this refers to the hardware-specific configuration (disks, kernel, boot, etc). This loads the hardware-specific configuration from `/hosts/$HOST/default.nix` + +`$ARCH` -> this refers to the architecture of the configuration (x86_64-linux, aarch64-darwin, etc). This sets the architecture to use for the packages. + +--- + +An example complete configuration could be: `phobos-laptop-x86_64-linux` [This is my personal laptop configuration :)] + +All these variables are declared in the `flake.nix` and can be added/removed to fit your needs. + + +# Installation Steps +Make sure you're in the `nixos-config` folder and have followed (if necessary) the [partitioning steps](PARTITIONING.md) :) +## NixOS-Based Intallation +### Installing + +``` +$ nixos-install --flake . #$HOST-$HARDWARE-$ARCH +``` + +### Updating + +``` +$ nix flake update + +$ nixos-rebuild switch --flake . #$HOST-$HARDWARE-$ARCH +``` + +## Non-Nixos-Based Installation +### Installing +``` +$ nix build .#homeManagerConfigurations.$HOST-$HARDWARE-$ARCH.activationPackage +$ ./result/activate +``` + +### Updating +``` +$ nix flake update + +$ home-manager switch --flake .#$HOST-$HARDWARE-$ARCH +``` + +## ISO +### Building +``` +$ nix build .#isoConfigurations.$HOST-$HARDWARE-$ARCH.config.system.build.isoImage +``` + +## Deploying +``` +# deploy -s .#$HOST-$HARDWARE-$ARCH --hostname $TARGET_IP +``` diff --git a/Documentation/PARTITIONING.md b/Documentation/PARTITIONING.md new file mode 100644 index 0000000..09bc492 --- /dev/null +++ b/Documentation/PARTITIONING.md @@ -0,0 +1,11 @@ +# Partitioning & Mounting +My NixOS configuration has some extra helpers for partitioning and mounting :) + +These scripts live in your specific `hardware/$HARDWARE/disks.nix` (Which should be customized to fit your specific configuration). + +### Creating disks +`nix run .#nixosConfigurations.$HOST-$HARDWARE-$ARCH.config.disks-create` +### Formatting disks +`nix run .#nixosConfigurations.$HOST-$HARDWARE-$ARCH.config.disks-format` +### Mounting disks +`nix run .#nixosConfigurations.$HOST-$HARDWARE-$ARCH.config.disks-mount` diff --git a/Documentation/desktop_screenshot.png b/Documentation/desktop_screenshot.png new file mode 100644 index 0000000..ceca4ba Binary files /dev/null and b/Documentation/desktop_screenshot.png differ -- cgit 1.4.1