mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-31 04:04:45 +00:00
Merge da640960dd
into 53d0f0ed11
This commit is contained in:
commit
1e887b9dad
1 changed files with 12 additions and 2 deletions
|
@ -197,7 +197,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 = ''
|
||||
|
@ -206,7 +206,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.scroll-to-open = mkOption {
|
||||
|
|
Loading…
Add table
Reference in a new issue