From 3d092d8dd92b6ff7fbccc51a84cd7f24271f0376 Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Sat, 15 Apr 2023 10:44:56 +0300 Subject: [PATCH] doc(README) : describe setup --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 81859dd..0e0b504 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ -# nixos-config +# NixOS config files from mrflos -experiments with nixos to make a perfect desktop environment and dev environment \ No newline at end of file +NixOS config files to make a perfect (for me) server or desktop environment and local dev environment. Should be modular (cf. modules folder). +Mostly all was stolen, I mean inspired by [tazjin's nix files from TVL's repo](https://code.tvl.fyi/tree/users/tazjin/) + +## Installation and setup +On a fresh NixOS installation +- check out this repository, for example in your home `git clone https://code.mrflos.pw/mrflos/nixos-config.git ~/nixos-config` (ideally fork this repo and clone it with ssh to be able to commit your customs) +- copy the NixOS generated configuration to the `machines` folder `cp /etc/hardware-configuration.nix ~/nixos-config/machines/-hardware-configuration.nix` +- copy the example configuration file in the `machines` folder `cp ~/nixos-config/machines/example-configuration.nix ~/nixos-config/machines/-configuration.nix` +- edit your machine configuration file `~/nixos-config/machines/-configuration.nix`, make changes and uncomment modules according to your needs for this machine +- edit the main configuration file `~/nixos-config/configuration.nix` and point to the right files +```nix +# NixOS config entry point +# import the hardware and configuration files specific to your machine +{ + imports = + [ + ./machines/-hardware-configuration.nix + ./machines/-configuration.nix + ]; +} +``` +- move the old `/etc/nixos` folder `sudo mv /etc/nixos /etc/nixos.old` and symlink your custom one `sudo ln -s ~/nixos-config /etc/nixos` +- run the install `sudo nixos-rebuild switch` +- if all good don't forget to commit your changes \ No newline at end of file