mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-15 05:21:06 +01:00
xdg: add option 'xdg.cacheFile' (#6548)
Allow declarative configuration of files in configured xdg cache home.
This commit is contained in:
parent
b71edac7a3
commit
f0b5e7e8a7
1 changed files with 11 additions and 0 deletions
|
|
@ -24,6 +24,15 @@ in {
|
|||
options.xdg = {
|
||||
enable = mkEnableOption "management of XDG base directories";
|
||||
|
||||
cacheFile = mkOption {
|
||||
type = fileType "xdg.cacheFile" "{var}`xdg.cacheHome`" cfg.cacheHome;
|
||||
default = { };
|
||||
description = ''
|
||||
Attribute set of files to link into the user's XDG
|
||||
cache home.
|
||||
'';
|
||||
};
|
||||
|
||||
cacheHome = mkOption {
|
||||
type = types.path;
|
||||
defaultText = "~/.cache";
|
||||
|
|
@ -136,6 +145,8 @@ in {
|
|||
|
||||
{
|
||||
home.file = mkMerge [
|
||||
(mapAttrs' (name: file: nameValuePair "${cfg.cacheHome}/${name}" file)
|
||||
cfg.cacheFile)
|
||||
(mapAttrs' (name: file: nameValuePair "${cfg.configHome}/${name}" file)
|
||||
cfg.configFile)
|
||||
(mapAttrs' (name: file: nameValuePair "${cfg.dataHome}/${name}" file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue