From 4af7a9ce3c09b1064e4b7d98a416fcda219b2718 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Thu, 2 Feb 2023 00:32:13 +0100 Subject: [PATCH] Improvement --- README.md | 24 --------------------- docs/flake/HOME.md | 53 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 27 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 635df89..0000000 --- a/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Installation - -`` is default to `hostname` command but it can be overwritten - -Build only - -```bash -nixos-rebuild build --flake .# -``` - -Build and switch - -```bash -nixos-rebuild switch --flake .# -``` - -Build script to activate in current shell -```bash -nix build .#hmConfig..activationPackage -``` -with -```bash -./result/activate -``` \ No newline at end of file diff --git a/docs/flake/HOME.md b/docs/flake/HOME.md index fe2772f..886829d 100644 --- a/docs/flake/HOME.md +++ b/docs/flake/HOME.md @@ -75,12 +75,59 @@ outputs = { self, nixpkgs }: lib = nixpkgs.lib; in { nixosConfigurations = { - # specified with - # `nixos-rebuild [build/switch] --flake .#` - = lib.nixosSystem { + # specified with + # `nixos-rebuild [build/switch] --flake .#` + = lib.nixosSystem { inherit system; modules = [ ./configuration.nix ]; }; }; }; +``` + +### Installation + +`` is default to `hostname or user` command but it can be overwritten + +Build only + +```bash +nixos-rebuild build --flake .# +``` + +Build and switch + +```bash +nixos-rebuild switch --flake .# +``` + +Build script to activate in current shell +```bash +nix build .#hmConfig..activationPackage +``` +with +```bash +./result/activate +``` + +### Updating + +```bash +nix flake update #--recreate-lock-file +``` + +### Flake sur une installation vierge + +Démarrage depuis l'ISO + +```bash +sudo su +nix-env -iA nixos.git +git clone /mnt/ +nixos-install --flake .# +reboot +/* login */ +# Car parfois, nixos peut compiler la version par défaut +sudo rm -r /etc/nixos/configuration.nix +/* move build to desired location */ ``` \ No newline at end of file