Skip to content

sheeeng/nix

Repository files navigation

nixos

Built with Nix Codeberg GitHub GitLab

Getting started

nix --extra-experimental-features 'nix-command flakes' flake update; darwin-rebuild build --print-build-logs --flake ~/github/sheeeng/nix 2>&1 | nix --extra-experimental-features 'nix-command flakes' run nixpkgs#nix-output-monitor

sudo darwin-rebuild switch --print-build-logs --flake ~/github/sheeeng/nix 2>&1 | nix --extra-experimental-features 'flakes nix-command' run nixpkgs#nix-output-monitor
nix flake update

darwin-rebuild build --show-trace --print-build-logs --verbose --flake ~/github/sheeeng/nix 2>&1 | nix run nixpkgs#nix-output-monitor

sudo darwin-rebuild switch --print-build-logs --flake ~/github/sheeeng/nix 2>&1 | nix --extra-experimental-features 'flakes nix-command' run nixpkgs#nix-output-monitor

Install lix

curl --silent --show-error --fail --location https://install.lix.systems/lix | sh -s -- install

Optional: Create flake.nix

mkdir --parents ~/github/sheeeng/nix/nix-darwin && cd $_
nix flake init --template nix-darwin
sed --in-place "s/simple/$(scutil --get LocalHostName)/" flake.nix
sed --in-place "s/x86_64-darwin/aarch64-darwin/" flake.nix

Install nix-darwin

nix run nix-darwin --experimental-features "nix-command flakes" -- switch --flake ~/github/sheeeng/nix/nix-darwin

Using nix-darwin

nix run nix-darwin -- switch --flake ~/github/sheeeng/nix/nix-darwin
  • Rebuild configuration.
darwin-rebuild switch --flake ~/github/sheeeng/nix/nix-darwin
  • Update and fetch dependencies.
fd .nix --exclude flake.nix --exec update-nix-fetchgit

fd .nix --exclude flake.nix --exec sh -c 'echo {}; update-nix-fetchgit {}'
  • Format files.
nix fmt

nix-shell --packages nixfmt-tree --run "treefmt ."

About

Nix, NixOS, Nix's Darwin, Nix's Home-Manager, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •