diff --git a/NixOS.md b/NixOS.md index dfd1768..a0dd5f0 100644 --- a/NixOS.md +++ b/NixOS.md @@ -238,6 +238,23 @@ nix-eval '{ a=1; }?a' #=> true ``` +## Escape strings + +* https://nixos.org/manual/nix/stable/language/values + +Double-quoted strings (e.g. `"foo bar"`): +``` +" -> \" +\ -> \\ +${ -> \${ +``` + +Indented strings (e.g. `''foo bar''`): +* `${` -> `''${` +* `''` -> `'''` + +URIs can be written without quotes (e.g. `http://example.org/foo.bar`). + ## Run AppImages * https://nixos.wiki/wiki/Appimage @@ -249,4 +266,15 @@ nix-shell -p appimage-run ```shell # Inside the shell, you can run an AppImage: appimage-run ~/Downloads/ubports-installer_0.10.0_linux_x86_64.AppImage -``` \ No newline at end of file +``` + +## Additional resources + +* Simple NixOS flake template for NixOS with HomeManager. https://github.com/Misterio77/nix-starter-configs#readme +* NixOS guide (development environment, gaming, etc). https://github.com/mikeroyal/NixOS-Guide#table-of-contents +* nix function cheatsheet: https://nix-cheatsheet.pixie.homes/ +* Documenting the Journey of Learning and Mastering Nix. https://ianthehenry.com/posts/how-to-learn-nix/ +* Nix language basics. https://nix.dev/tutorials/nix-language.html +* Nix data types. https://nixos.org/manual/nix/stable/language/values +* MkIfElse. https://discourse.nixos.org/t/mkif-vs-if-then/28521/4?u=langfingaz +* Nix language basics - a one pager. https://github.com/tazjin/nix-1p#nix---a-one-pager diff --git a/README.md b/README.md index 14a970c..ad610cb 100644 --- a/README.md +++ b/README.md @@ -403,10 +403,3 @@ Remove leftover EFI entries of removed generations: ```shell sudo /run/current-system/bin/switch-to-configuration boot ``` - -## References - -Some references to websites that helped me create this repository: - -* Simple NixOS flake template for NixOS with HomeManager. https://github.com/Misterio77/nix-starter-configs#readme -* NixOS guide (development enviroment, gaming, etc). https://github.com/mikeroyal/NixOS-Guide#table-of-contents diff --git a/modules/sendmail-mta.nix b/modules/sendmail-mta.nix index 0d0fd54..a7c6c06 100644 --- a/modules/sendmail-mta.nix +++ b/modules/sendmail-mta.nix @@ -18,7 +18,7 @@ # sudo smtpctl show status # Send an email. # TODO: One has set the sender explicitely to `-f langbein@mail.de`. - # echo "Subject: hello" | sendmail -f langbein@mail.de daniel@systemli.org + # echo -e "Subject: Test\n\nHi there, this is some test." | sendmail -f langbein@mail.de daniel@systemli.org # Queue handling # sudo smtpctl show queue # sudo smtpctl schedule all