Skip to content

PrestonHager/nixos-configs

Repository files navigation

nixos-configs

Configurations for NixOS and Nix Package Manager

Setup

Setup by cloning the repository into /etc/nixos.

sudo git clone https://github.com/PrestonHager/nixos-configs.git /etc/nixos

Generate the hardware configuration file. Copy the hardware configuration file to the correct location.

cd /etc/nixos
sudo nixos-generate-config
sudo cp hardware-configuration.nix nixos/hardware-configuration.nix

You can remove the configuration.nix file that was generated by the previous command. It will not be used. Then rebuild the nixos system using flakes.

sudo nixos-rebuild switch --flake /etc/nixos#gnome

Customization

There are three different flakes you can generate configs from. headless, gnome, and i3 each corresponding to different desktop environments. To change the configuration, place the desired flake configuration after the # in the --flake option of the nixos-rebuild command. For example, to build a headless system run the following:

sudo nixos-rebuild switch --flake /etc/nixos#headless

You may want to customize the username, config files, etc. To do this, edit the username in configuration.nix. Then either copy the files from users/prestonh to users/yourusername or create an empty directory and copy users/prestonh/home.nix (and dependancies) into it.

The current implementation of users/prestonh/home.nix contains the following programs and configurations:

  • Many CLI tools to aid in speedy development including:
    • zoxide alternative cd command
    • fzf popular fuzzy finder
    • lsd (LSDeluxe), which give more readable file listings
    • glow a markdown view
    • and more!
  • Neovim with the lazy plugin manager
  • Brave browser, if a desktop environment is setup. You can change this to any chromium-based browser.
  • Git configuration in the home-porgrams.nix file with email, name, etc.
  • Supplimental programs, which can be commented/uncommented as necessary in the user-packages.nix file:

Development

You may want to change the remote to use SSH instead of HTTPS. This will of course require SSH keys to be setup with your GitHub account as well.

sudo git remote set-url origin [email protected]:PrestonHager/nixos-configs.git

Replace PrestonHager with your GitHub username after you have forked the repository.

About

Configurations for NixOS and Nix Package Manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published