Skip to content

thundertheidiot/nixos-flake-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS Template

Usage

Update inputs

nix flake update

Rebuild and switch (this is what you need 99% of the time)

nixos-rebuild switch --flake . --sudo --no-reexec

Build

nixos-rebuild build --flake .

First steps

Change your username and hostname

Replace every instance of "user". You can currently find it in:

  • flake.nix
  • modules/nixos/default.nix

Rename hosts/hostname to something else and change the value of networking.hostName inside it. In flake.nix Change the word hostname in hostname = mkSystem (import ./hosts/hostname);.

Remember that flakes are built from the git tree, so you need to git add the new directory, otherwise nix cannot find the files.

Adding a GUI environment

  1. Copy modules/nixos/gaming.nix to e.g. modules/nixos/plasma.nix
  2. Add ./plasma.nix into the imports list in modules/nixos/default.nix
  3. Make a new option for enabling plasma (mynixos.gaming.enable -> mynixos.plasma.enable) Remember to also change the lib.mkIf value as well!
  4. Change the contents of the config attrset Search for plasma and sddm on the NixOS options search services.desktopManager.plasma6.enable = true; services.displayManager.sddm.enable = true; etc.
  5. Enable your mynixos.plasma.enable option in your host config.

Useful links

NixOS

Useful links

Package search https://search.nixos.org/packages?channel=unstable

Option search https://search.nixos.org/options?channel=unstable

Wiki https://wiki.nixos.org/wiki/Main_Page

Home Manager

Option search https://home-manager-options.extranix.com

Nix

Library function search https://noogle.dev/

About

A starting point for a flake-based NixOS configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages