about summary refs log tree commit diff
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2018-04-06 01:19:06 +0000
committerJan Malakhovski <oxij@oxij.org>2018-05-12 19:27:09 +0000
commit095fe5b43def40279a243e663c662b02caac5318 (patch)
tree943f7d7550221ba6f3b7cd855e00b265bbbcf316 /nixos/modules/services/databases
parentb0d29e7e179f20c92f18e2eff13b871d015adc5a (diff)
downloadnixlib-095fe5b43def40279a243e663c662b02caac5318.tar
nixlib-095fe5b43def40279a243e663c662b02caac5318.tar.gz
nixlib-095fe5b43def40279a243e663c662b02caac5318.tar.bz2
nixlib-095fe5b43def40279a243e663c662b02caac5318.tar.lz
nixlib-095fe5b43def40279a243e663c662b02caac5318.tar.xz
nixlib-095fe5b43def40279a243e663c662b02caac5318.tar.zst
nixlib-095fe5b43def40279a243e663c662b02caac5318.zip
nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/mysql.nix2
-rw-r--r--nixos/modules/services/databases/postgresql.nix10
2 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index 21a131b90a81..66c9330c3550 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -218,7 +218,7 @@ in
   config = mkIf config.services.mysql.enable {
 
     services.mysql.dataDir =
-      mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/mysql"
+      mkDefault (if versionAtLeast config.system.nixos.stateVersion "17.09" then "/var/lib/mysql"
                  else "/var/mysql");
 
     users.extraUsers.mysql = {
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index f022e0863dfd..4ad4728ccda6 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -147,7 +147,7 @@ in
       };
       superUser = mkOption {
         type = types.str;
-        default= if versionAtLeast config.system.stateVersion "17.09" then "postgres" else "root";
+        default= if versionAtLeast config.system.nixos.stateVersion "17.09" then "postgres" else "root";
         internal = true;
         description = ''
           NixOS traditionally used 'root' as superuser, most other distros use 'postgres'.
@@ -166,14 +166,14 @@ in
 
     services.postgresql.package =
       # Note: when changing the default, make it conditional on
-      # ‘system.stateVersion’ to maintain compatibility with existing
+      # ‘system.nixos.stateVersion’ to maintain compatibility with existing
       # systems!
-      mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql96
-            else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql95
+      mkDefault (if versionAtLeast config.system.nixos.stateVersion "17.09" then pkgs.postgresql96
+            else if versionAtLeast config.system.nixos.stateVersion "16.03" then pkgs.postgresql95
             else pkgs.postgresql94);
 
     services.postgresql.dataDir =
-      mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"
+      mkDefault (if versionAtLeast config.system.nixos.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"
                  else "/var/db/postgresql");
 
     services.postgresql.authentication = mkAfter