nix-config

My NixOS and Nix configuration

Stars
13

#+TITLE: Otavio Salvador's Nix Configuration

  • Table of Contents
    :PROPERTIES:
    :TOC: :include all :ignore (this)
    :END:
    :CONTENTS:
  • [[#installing-nixos-on-a-newexisting-device][Installing NixOS on a new/existing device]]
  • [[#installation-inside-an-existing-linux-system][Installation inside an existing Linux system]]
    :END:
    :CUSTOM_ID: configuration-repository
    :END:
  • Installing NixOS on a new/existing device

First we need to generate the device-specific NixOS Installer with SSH and NetworkManager support. To generate the installer you can run:

#+begin_src sh

nix build .#installer-iso-

#+end_src

Once booted, the system can be installed running the script install-system.

WARNING: all device data will be lost.

  • Installation inside an existing Linux system

For Debian-based systems we need to have =curl=, =rsync=, =zsh=, =xz-utils= and =git-core= before proceeding. Use:

#+begin_src sh sudo apt install -y curl git-core #+end_src

The user must use =zsh= as shell so do it using:

#+begin_src sh sudo usermod -s /bin/zsh otavio #+end_src

Install the daemon inside the existing operating system with:

#+begin_src sh curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install #+end_src

Finally, clone this repository as:

#+begin_src sh mkdir -p ~/src git clone https://github.com/otavio/nix-config.git ~/src/nix-config #+end_src

Add the required channels to the environment, using:

#+begin_src sh home-manager switch --flake '.#otavio@generic-x86' #+end_src