Create a flake that has a ok Neovim setup
Eventually create a flake for every app that I use that has configs
Then just import those flakes into the darwin or home manager configs
Add all the flakes into one github repo unless there is some reason to have separate repos
keet the flakes repo at ห/.flakes on my systems.
everything is a flake even the main system config
A build tool and package manager used to create declarative, reproducible software systems.
https://zero-to-nix.com/concepts/nix
A language for instructing Nix how to build packages, environments, and systems.
https://zero-to-nix.com/concepts/nix-language
A Linux distribution built on Nix with its core principles in mind.
https://zero-to-nix.com/concepts/nixos
A vast collection of Nix packages, libraries, and helper functions.
https://zero-to-nix.com/concepts/nixpkgs
Use the determinate systems installer
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
sudo -i nix upgrade-nix
/nix/nix-installer uninstall
https://determinate.systems/posts/determinate-nix-installer/
https://github.com/DeterminateSystems/nix-installer
Flakes lock the versions of packages in at the version they where when the command was ran. So even if using the unstable channel the package versions will stay locked at the versions in the flake.lock file
in the folder you want the flake to be in
nix flake init
{
description = "my epic vims collection";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
# devShells means if the flake is a shells you can run it with
# nix develop
# instead of
# nix develop .#bob
devShells.${system}.default =
pkgs.mkShell
{
buildInputs = [
pkgs.neovim
pkgs.vim
];
shellHook = ''
echo "hello mom"
'';
};
bob =
pkgs.mkShell
{
buildInputs = [
pkgs.neovim
pkgs.vim
];
shellHook = ''
echo "hello mom"
'';
};
};
}
In the folder the flake is in
nix develop
nix develop .#bob
Maybe the nix develop has something to do with devShells.${system}.default?
nix flake build??
nix flake show github:DeterminateSystems/riff
In the folder the flake is in
???? Note sure what this does Running a flake
nix flake run??
nix run "https://flakehub.com/f/NixOS/nixpkgs/*#ponysay"
Updated the versions of the inputs in the flake
In the folder the flake is in
nix flake update
Pure Nix flake utility functions.
The goal of this project is to build a collection of pure Nix functions that don't depend on nixpkgs, and that are useful in the context of writing other Nix flakes.
https://github.com/numtide/flake-utils
Example $ examples/each-system/flake.nix as nix
{
description = "Flake utils demo";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
packages = rec {
hello = pkgs.hello;
default = hello;
};
apps = rec {
hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; };
default = hello;
};
}
);
}
https://determinate.systems/posts/nix-run/
- Very good post
https://nixos.org/manual/nixpkgs/unstable/
https://gist.github.com/edolstra/40da6e3a4d4ee8fd019395365e0772e7
https://nixos.wiki/wiki/Flakes
https://github.com/nix-community/NUR
NB
Is Nix Your New Terminal SUPERPOWER? @DevOps_Toolbox
Nix Darwin Turned My Mac into a Fully Automated Machine @DevOps_Toolbox
Nix Home Manager Has Forever Changed My Dotfiles @DevOps_Toolbox
NB
Has lots of good content to learn Nix in general, even though it seems like the focus is on NixOS and not Nix-Darwin I think many of the configuration options are similar.
https://www.youtube.com/@vimjoyer/videos
Nix flakes explained @Vimjoyer
- Really good explanation of the basics of Nix Flakes
Move your NixOS into a Flake! @Vimjoyer
- https://github.com/Misterio77/nix-starter-configs
- Place to see starter nix configurations
- https://nixos.wiki/wiki/Flakes
- Look at the schema section
Manage Nix Flake Inputs Like a Pro @Vimjoyer
- Flake templates for making flakes
- nix flake metadata command to view info on flakes
- nix flake lock --update-inputs nixpkgs
- Write a sheel script to update the inputs
- nix flake --json | nix run nixpkgs#jq ".locks.nodes.root.inputs[]" | sed "s/"//g" | nix run nixpkgs#fzf
- https://github.com/vimjoyer/simple-template
- https://github.com/vimjoyer/nix-update-input
Ultimate Nix Flakes Guide @Vimjoyer
Nix home-manager tutorial: Declare your entire home directory @Vimjoyer
- Setting up home manager using flakes
- standalone and as part of nixos
- seems like the main difference between stand alone and linked to os is that
- it can be build separately
- you do not need to use sudo when rebuilding if its stand alone
- it can be used on other systems if it is stand alone
- the main reason i can think why stand alone is not good is making sure the package versions are the same between the system and the home user
Modularize NixOS and Home Manager | Great Practices @Vimjoyer
- NB
Custom NIX Home-Manager Modules For Personalized Setup @Vimjoyer
Nix Home Manager Tutorial @DevInsideYou
https://github.com/zmre/pwzsh/tree/main
- zsh with good nvim
nix --extra-experimental-features "nix-command flakes" run github:zmre/pwzsh
https://github.com/b-za/zsh/tree/main
- zsh with good nvim
nix --extra-experimental-features "nix-command flakes" run github:bbham/bbham-zsh --no-write-lock-file
https://github.com/DeterminateSystems/riff/blob/main/flake.nix
https://determinate.systems/posts/nix-run/
https://github.com/caarlos0/nur
https://github.com/malob/nixpkgs
https://github.com/kclejeune/system
https://github.com/zmre/nix-config
https://github.com/zmre/mac-nix-simple-example
https://gist.github.com/jmatsushita/5c50ef14b4b96cb24ae5268dab613050