Here's the steps after a fresh NixOS installation:
- Install vim and git, and activate flakes.
nix-shell -p vim
sudo vim /etc/nixos/configuration.nix
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
vim
git
];
- Clone the repo.
git clone git@github.com:pierrot-lc/dotfiles.git
cd dotfiles/
- Setup the system configuration:
- Create an entry in
./hosts/{host-name}/default.nix
. You can directly copy the content from/etc/nixos/configuration.nix
or take inspiration from other hardwares in this repo. - Copy the
/etc/nixos/hardware-configuration.nix
file to./hosts/{host-name}/
. - Import this file from your
./hosts/{host-name}/default.nix
. - Create and setup the file
./hosts/{host-name}/options.nix
.
imports = [
./hardware-configuration.nix
];
- Add this new configuration in the
flake.nix
hosts = {
[host-name] = null;
# ...
}
nixosConfigurationsParse = {
[host-name] = ./hosts/{host-name}/configuration.nix;
# ...
};
optionsParser = {
[host-name] = ./hosts/{host-name}/options.nix;
};
- Build and switch at boot this new configuration:
sudo nixos-rebuild boot --flake .#[host-name] -v
- Reboot.
- Make channels follow unstable (if you want).
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
nix-channel --update
sudo nix-channel --update
- Install home-manager.
- This repo uses a private flake input to hide personal information. Unless you're me and you have access to this repository, you should not use this part of the config. So you can remove the parts where this private information is used.
home-manager switch --flake .#[your-username] -v
- Install flatpaks from
./notes/flatpak.norg
And you're good to go!