summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-11-26 11:18:01 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-11-26 11:23:31 +0100
commit8ebfce0eda627ffa739e16279ac543f4d50cd60c (patch)
tree698018520a0dc527a160d1262d74b18e2b970194 /nixos/modules/services
parentca77ba39bf7b5d16e69cb0d69e63aee9fe20176b (diff)
downloadnixlib-8ebfce0eda627ffa739e16279ac543f4d50cd60c.tar
nixlib-8ebfce0eda627ffa739e16279ac543f4d50cd60c.tar.gz
nixlib-8ebfce0eda627ffa739e16279ac543f4d50cd60c.tar.bz2
nixlib-8ebfce0eda627ffa739e16279ac543f4d50cd60c.tar.lz
nixlib-8ebfce0eda627ffa739e16279ac543f4d50cd60c.tar.xz
nixlib-8ebfce0eda627ffa739e16279ac543f4d50cd60c.tar.zst
nixlib-8ebfce0eda627ffa739e16279ac543f4d50cd60c.zip
display-managers module: improve variable quoting
Fixes #20713, though I'm certain nixpkgs contains loads of places
without proper quoting, as (ba)sh unfortunately encourages that.

The only plus side is that most of such problems in nixpkgs aren't
actually security problems but mere annoyance to those who are foolish
enough to use "weird" characters in critical names.
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/x11/display-managers/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index ce82af4ca68c..c8a1a2361f7f 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -82,12 +82,12 @@ let
 
       # Speed up application start by 50-150ms according to
       # http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
-      rm -rf $HOME/.compose-cache
-      mkdir $HOME/.compose-cache
+      rm -rf "$HOME/.compose-cache"
+      mkdir "$HOME/.compose-cache"
 
       # Work around KDE errors when a user first logs in and
       # .local/share doesn't exist yet.
-      mkdir -p $HOME/.local/share
+      mkdir -p "$HOME/.local/share"
 
       unset _DID_SYSTEMD_CAT
 
@@ -148,7 +148,7 @@ let
       allowSubstitutes = false;
     }
     ''
-      mkdir -p $out
+      mkdir -p "$out"
       ${concatMapStrings (n: ''
         cat - > "$out/${n}.desktop" << EODESKTOP
         [Desktop Entry]