types.file-mode: init

This commit is contained in:
tv 2016-06-13 01:37:51 +02:00
parent 2adb41310c
commit fcfe4b6461

View File

@ -163,7 +163,7 @@ types // rec {
secret-file = submodule ({ config, ... }: {
options = {
path = mkOption { type = str; };
mode = mkOption { type = str; default = "0400"; };
mode = mkOption { type = file-mode; default = "0400"; };
owner = mkOption {
type = user;
default = config.krebs.users.root;
@ -293,6 +293,12 @@ types // rec {
};
};
file-mode = mkOptionType {
name = "file mode";
check = x: isString x && match "[0-7]{4}" x != null;
merge = mergeOneOption;
};
haskell.conid = mkOptionType {
name = "Haskell constructor identifier";
check = x: