types.source: add pass type

This commit is contained in:
tv 2017-12-15 03:33:43 +01:00
parent 92a34559ee
commit 51a30f41cf

View File

@ -231,7 +231,12 @@ rec {
source = submodule ({ config, ... }: { source = submodule ({ config, ... }: {
options = { options = {
type = let type = let
types = ["file" "git" "symlink"]; types = [
"file"
"git"
"pass"
"symlink"
];
in mkOption { in mkOption {
type = enum types; type = enum types;
default = let default = let
@ -255,6 +260,10 @@ rec {
type = nullOr git-source; type = nullOr git-source;
default = null; default = null;
}; };
pass = mkOption {
type = nullOr pass-source;
default = null;
};
symlink = let symlink = let
symlink-target = (symlink-source.getSubOptions "FIXME").target.type; symlink-target = (symlink-source.getSubOptions "FIXME").target.type;
in mkOption { in mkOption {
@ -287,6 +296,17 @@ rec {
}; };
}; };
pass-source = submodule {
options = {
dir = mkOption {
type = absolute-pathname;
};
name = mkOption {
type = pathname; # TODO relative-pathname
};
};
};
symlink-source = submodule { symlink-source = submodule {
options = { options = {
target = mkOption { target = mkOption {