1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-31 04:04:45 +00:00
This commit is contained in:
clara 2025-03-29 15:35:56 +00:00 committed by GitHub
commit 1e887b9dad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {