Armenia got pretty fucked by the world being distracted by a pandemic... and by concepts of realpolitik hitting them hard in the face (nobody wanting to send their troops to "help" a small landlocked nation with limited natural resources + the regional powers having a more vested interest in Azerbaijan's oil pipeline). Also the fact that Putin doesn't really like Pashinyan because he rooted out a lot of Putin allies from Armenia's government did not help them with getting Russia involved.
Russia sells weapons to both sides and while they did provide military support to Armenia... I think the only thing that stopped Azerbaijan from steamrolling Armenian/Artsakh forces (because the last few weeks of the war have been utterly brutal on the Armenian forces) was Azerbaijan shooting down a Russian military helicopter. I think otherwise, Azerbaijan probably could have overrun the contested territories and won the war outright. I think the only reason they're agreeing to Russian peacekeepers is because they've pissed Russia off.
A lot of people in Armenia are very pissed off at Pashinyan... but I really don't know if he had a choice other than throwing more men into the meatgrinder. But both sides were suffering casualties at around at 1:1 ratio... with Azerbaijan having much more men to throw into battle. The fortress city of Shushi/Shusha (I think it's funny the difference between the names of the city for Armenians/Azeris is just one letter) fell and was cut off from Armenian supply lines - so the troops there (where there was still fighting going on as of a few hours ago) would likely have all been lost.
Reports of Turkish forces being used in as "peacekeepers" has many Armenians particularly outraged. I've seen mixed sources on whether Turkish forces would be involved (the Turkish government isn't a signing party to the agreement, so there is that... but I do know Aliyev was making demands during initial negotiations for the peacekeepers to be Russian and Turkish).
I wonder what will happen with Shushi, which is the home of important cultural sites for Armenians - will they safely be allowed to return to the city if they lived there. Will ethnic Armenian tourists be allowed to visit those cultural sites?
I hope the peace holds beyond the 5 years of peacekeeping. This isn't a great situation for Armenia, but it's essentially the two countries agreeing to the terms of the conflict resolution the Minsk group negotiated... just with a heavy cost of human life. Hopefully all parties can be content with how things have panned out over time - Artsakh still exists (although a much smaller territory now) & Armenia retained all of its sovereign integrity. Azerbaijan has substantial land within it's internationally recognised borders restored. Turkey gets a land route uniting "all Turkic peoples" (plus their pipeline doesn't have to pass through Armenia now). Russia gets more influence than it's had in the Caucasus since the fall of the Soviet Union (plus the pipeline).