This is config that I use on NixOS and on Mac (Nix-Darwin) you can use it as an example to build your own.
Rebuild the system:
sudo nixos-rebuild switch --flake .#devBoxRebuild home:
home-manager switch --flake .#anton@devBoxWallpaper credit to: https://github.com/NixOS/nixos-artwork/