Skip to content

Latest commit

 

History

History
47 lines (42 loc) · 1.69 KB

File metadata and controls

47 lines (42 loc) · 1.69 KB

Dio Kyrie's NixOS Flake.

Install the flake:

  1. Download and extract this repository at your home directory:
nix-shell -p git && cd && git clone git@github.com:DioKyrie-Git/NixOS.git

Note

  • This will temporarily install git
  • This will set current directory to ~/
  • Then will download this GitHub repository.

Caution

  • Before proceeding please do the following:
  • Personalise all settings in ~/NixOS/flake.nix
  • User name;
  • Locale;
  • GitHub credentials;
  • Et cetera.
  1. Run in terminal:
rsync -a --delete -v /etc/nixos/hardware-configuration.nix ~/NixOS/ && rsync -a --mkpath --delete -v /etc/nixos/ ~/.config/NixOS/.backup/ && sudo rm /etc/nixos/* && nix flake lock ~/NixOS/ && sudo rsync -a --delete -v ~/NixOS/* /etc/nixos/ && sudo nixos-rebuild switch --flake /etc/nixos#Cubozoa

Warning

  • This will copy your hardware-configuration.nix to ~/NixOS/
  • This will backup your /etc/nixos/ in ~/.config/NixOS/.backup/
  • Then will delete all files in /etc/nixos/
  • Then will generate lock file with nix flake lock in ~/NixOS/
  • Then will copy all contents of ~/NixOS/ to /etc/nixos/
  • Then will use nixos-rebuild switch with --flake flag.

Thats it:

  • Now you can update your NixOS with terminal command:
nixos-update

Tip

  • This will copy your hardware-configuration.nix to ~/NixOS/
  • Then will delete all files in /etc/nixos/
  • Then will update lock file with nix flake lock in ~/NixOS/
  • Then will copy all contents of ~/NixOS/ to /etc/nixos/
  • Then will use nh os switch to update your NixOS.

Important

  • While using my Flake, you should only edit files in ~/NixOS/
  • Never edit files in /etc/nixos/