Note: The wallpapers I use are here: https://drive.google.com/drive/folders/walls.
This repository contains personal configuration files for Linux-based systems, specifically tailored for NixOS. This is where I do my rices =D
If you wanna see my past rices, take a look here (this website is awful, I know. I'll improve it soon).
An observation: There's probably a better and easier way to do this installation, so if you know a better way, please let me know, I'm not an expert in NixOS.
Some notes before we start:
flake
will be used to refer to this project (repository), which is a flake. If you want to know more about flakes and Nix, I recommend this.<name>
is literally just the name of the folder you can choose to clone the repository as. Ex:git clone https://github.com/datsfilipe/dotfiles.git /mnt/etc/nixos/<name>
.
- First you need to create your disk partitions and filesystems and mount them. Please refer to NixOS documentation for this.
- Clone the repository inside the
/mnt/etc/nixos
directory:
$ nix-shell -p git # inside the shell...
$ git clone https://github.com/datsfilipe/dotfiles.git /mnt/etc/nixos/<name>
- Some tweaks are required. First, you need to update the
.gitmodules
file inside the flake (the repository you just cloned) to point to the correct submodule url. As you don't have myssh
keys (thanks god!) you need to update them tohttps
links, it's pretty straightforward, so I'm gonna extend on that. After you updated it, do:
$ git submodule update --init --recursive
- You also need to update the submodule paths insdie
flake.nix
to point to the correct submodule folders. Example:
git+file:https:///home/dtsf/.dotfiles/dotfiles/nvim?shallow=1
->git+file:https:///mnt/etc/nixos/<name>/dotfiles/nvim?shallow=1
- You also need to generate your hardware configuration file (if you already created it, you can skip this step). This is done by running:
$ nixos-generate-config --root /mnt
- You need to delete the
/mnt/etc/nixos/<name>/hosts/dtsf-machine/hardware-configuration.nix
file inside the flake. - You need to copy the
/mnt/etc/nixos/hardware-configuration.nix
file inside the flake (copy it to/mnt/etc/nixos/<name>/hosts/dtsf-machine/hardware-configuration.nix
). - Now you can install the system:
$ cd /mnt/etc/nixos/<name>
$ nixos-install --flake .?submodules=1#<host>