summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2022-03-08 21:17:07 +0800
committerPeter Hoeg <peter@hoeg.com>2022-03-09 17:07:48 +0800
commitd44916d12f1d39baa02325040b381311364ad93a (patch)
tree6de013d4eb5ff90b8a49edee6fac69306b527b37
parent0e17a0fea6717a3665ab79bdb1bc05a0b9a76b74 (diff)
downloadnixpkgs-d44916d12f1d39baa02325040b381311364ad93a.tar
nixpkgs-d44916d12f1d39baa02325040b381311364ad93a.tar.gz
nixpkgs-d44916d12f1d39baa02325040b381311364ad93a.tar.bz2
nixpkgs-d44916d12f1d39baa02325040b381311364ad93a.tar.lz
nixpkgs-d44916d12f1d39baa02325040b381311364ad93a.tar.xz
nixpkgs-d44916d12f1d39baa02325040b381311364ad93a.tar.zst
nixpkgs-d44916d12f1d39baa02325040b381311364ad93a.zip
nixos/activation: allowed quoted values in /etc/os-release
-rw-r--r--nixos/modules/system/activation/switch-to-configuration.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 3a5ffe822ed..a1653d451fe 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -59,7 +59,7 @@ $ENV{NIXOS_ACTION} = $action;
 # This is a NixOS installation if it has /etc/NIXOS or a proper
 # /etc/os-release.
 die "This is not a NixOS installation!\n" unless
-    -f "/etc/NIXOS" || (read_file("/etc/os-release", err_mode => 'quiet') // "") =~ /ID=nixos/s;
+    -f "/etc/NIXOS" || (read_file("/etc/os-release", err_mode => 'quiet') // "") =~ /ID="?nixos"?/s;
 
 openlog("nixos", "", LOG_USER);