mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-09-11 12:49:18 +03:00
system/defaults/dock: support more configuration for persistent-others
This commit is contained in:
parent
cf297a8d24
commit
3a948d15d7
@ -137,7 +137,7 @@ in {
|
||||
};
|
||||
|
||||
system.defaults.dock.persistent-others = mkOption {
|
||||
type = types.nullOr (types.listOf (types.either types.path types.str));
|
||||
type = types.nullOr (types.listOf (types.oneOf [ types.path types.str (types.attrsOf types.anything) ] ));
|
||||
default = null;
|
||||
example = [ "~/Documents" "~/Downloads" ];
|
||||
description = ''
|
||||
@ -146,7 +146,17 @@ in {
|
||||
apply = value:
|
||||
if !(isList value)
|
||||
then value
|
||||
else map (folder: { tile-data = { file-data = { _CFURLString = "file://" + folder; _CFURLStringType = 15; }; }; tile-type = if strings.hasInfix "." (last (splitString "/" folder)) then "file-tile" else "directory-tile"; }) value;
|
||||
else map (folder:
|
||||
if isPath folder || isString folder
|
||||
then
|
||||
{
|
||||
tile-data = {
|
||||
file-data = { _CFURLString = "file://" + folder; _CFURLStringType = 15; };
|
||||
};
|
||||
tile-type = if strings.hasInfix "." (last (splitString "/" folder)) then "file-tile" else "directory-tile";
|
||||
}
|
||||
else folder # pass through complex objects entirely
|
||||
) value;
|
||||
};
|
||||
|
||||
system.defaults.dock.show-process-indicators = mkOption {
|
||||
|
Loading…
Reference in New Issue
Block a user