types: add systemd unit name
This commit is contained in:
parent
b5b90b5984
commit
4227cadb68
@ -530,6 +530,14 @@ rec {
|
|||||||
merge = mergeOneOption;
|
merge = mergeOneOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.unit-name = mkOptionType {
|
||||||
|
name = "systemd unit name";
|
||||||
|
check = x:
|
||||||
|
test "^[0-9A-Za-z:_.\\-]+@?\\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$" x &&
|
||||||
|
stringLength x <= 256;
|
||||||
|
merge = mergeOneOption;
|
||||||
|
};
|
||||||
|
|
||||||
# RFC952, B. Lexical grammar, <hname>
|
# RFC952, B. Lexical grammar, <hname>
|
||||||
hostname = mkOptionType {
|
hostname = mkOptionType {
|
||||||
name = "hostname";
|
name = "hostname";
|
||||||
|
Loading…
Reference in New Issue
Block a user