nixos/redshift: Move option renames to the module
This commit is contained in:
parent
0c457cb348
commit
ecf5f85a81
@ -273,20 +273,6 @@ with lib;
|
|||||||
(mkRenamedOptionModule [ "networking" "extraResolvconfConf" ] [ "networking" "resolvconf" "extraConfig" ])
|
(mkRenamedOptionModule [ "networking" "extraResolvconfConf" ] [ "networking" "resolvconf" "extraConfig" ])
|
||||||
(mkRenamedOptionModule [ "networking" "resolvconfOptions" ] [ "networking" "resolvconf" "extraOptions" ])
|
(mkRenamedOptionModule [ "networking" "resolvconfOptions" ] [ "networking" "resolvconf" "extraOptions" ])
|
||||||
|
|
||||||
# Redshift
|
|
||||||
(mkChangedOptionModule [ "services" "redshift" "latitude" ] [ "location" "latitude" ]
|
|
||||||
(config:
|
|
||||||
let value = getAttrFromPath [ "services" "redshift" "latitude" ] config;
|
|
||||||
in if value == null then
|
|
||||||
throw "services.redshift.latitude is set to null, you can remove this"
|
|
||||||
else builtins.fromJSON value))
|
|
||||||
(mkChangedOptionModule [ "services" "redshift" "longitude" ] [ "location" "longitude" ]
|
|
||||||
(config:
|
|
||||||
let value = getAttrFromPath [ "services" "redshift" "longitude" ] config;
|
|
||||||
in if value == null then
|
|
||||||
throw "services.redshift.longitude is set to null, you can remove this"
|
|
||||||
else builtins.fromJSON value))
|
|
||||||
|
|
||||||
# Redis
|
# Redis
|
||||||
(mkRemovedOptionModule [ "services" "redis" "user" ] "The redis module now is hardcoded to the redis user.")
|
(mkRemovedOptionModule [ "services" "redis" "user" ] "The redis module now is hardcoded to the redis user.")
|
||||||
(mkRemovedOptionModule [ "services" "redis" "dbpath" ] "The redis module now uses /var/lib/redis as data directory.")
|
(mkRemovedOptionModule [ "services" "redis" "dbpath" ] "The redis module now uses /var/lib/redis as data directory.")
|
||||||
|
@ -9,6 +9,21 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
(mkChangedOptionModule [ "services" "redshift" "latitude" ] [ "location" "latitude" ]
|
||||||
|
(config:
|
||||||
|
let value = getAttrFromPath [ "services" "redshift" "latitude" ] config;
|
||||||
|
in if value == null then
|
||||||
|
throw "services.redshift.latitude is set to null, you can remove this"
|
||||||
|
else builtins.fromJSON value))
|
||||||
|
(mkChangedOptionModule [ "services" "redshift" "longitude" ] [ "location" "longitude" ]
|
||||||
|
(config:
|
||||||
|
let value = getAttrFromPath [ "services" "redshift" "longitude" ] config;
|
||||||
|
in if value == null then
|
||||||
|
throw "services.redshift.longitude is set to null, you can remove this"
|
||||||
|
else builtins.fromJSON value))
|
||||||
|
];
|
||||||
|
|
||||||
options.services.redshift = {
|
options.services.redshift = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user