Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.ml
nix·Nix / NixOSbymawkler

What are some nice snippets that everyone should have in their NixOS config?

I'll start. I just discovered this one. It shows asterisks (*********) while you type your sudo password:

security.sudo.extraConfig = # sh
  ''
    Defaults pwfeedback # Make typed password visible as asterisks
  '';
View original on lemmy.ml
28

2 replies

Nix-specific shell aliases: nixls is 'cd /etc/nixos && tree *.nix(wrong tree syntax hut you get the gist)nixrs` is a function that...

  • runs git add . and git status in /etc/nixos
  • runs nixos rebuild-switch --flake
  • returns you to whatever directory you were in

lib.mkIf for optional configs

Using let ... In {} more often, basically treating nix as a programming language instead of a config language

3

I like to include memtest in my boot menu:

boot.loader.systemd-boot.memtest86.enable = true;

You can also use it with grub:

boot.loader.grub.memtest86.enable = true;
3

You reached the end

What are some nice snippets that everyone should have in their NixOS config? | Spyke