Skip to content

mccurdyc/nix-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nix-templates

Opinionates Nix per-repo flakes.

Usage

Forcing the Flake to Update

nix flake update --flake 'git+ssh://git@github.com/mccurdyc/nix-templates'

From a specific branch

nix flake init --template 'git+ssh://git@github.com/mccurdyc/nix-templates?ref=main'

Choosing a template

  • List templates
nix flake show
  • Update existing directory with template
nix flake init --template 'git+ssh://git@github.com/mccurdyc/nix-templates#full'
  • Create new directory from template
nix flake new <target-dir> --template 'git+ssh://git@github.com/mccurdyc/nix-templates#full'

Updating flake

nix flake update

Updating nixpkgs

fd \
    --type directory \
    --exact-depth 1 \
    --exec zsh -c "pushd {} && sed -i 's/24.05/24.11/g' flake.nix && sleep 5 && nix flake update"

Design Decisions

  • Using flake-parts

Jacek from Nixcademy said that he prefers flake-parts over flake-utils because of it's "flake composition". I haven't fought enough with either to have a strong preference, so I've opted to trust him.

Inspiration

About

My Nix Flake Repo Templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published