mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-22 18:29:39 +01:00
xdg: add option 'xdg.stateFile'
This commit is contained in:
parent
03b49187a2
commit
b00bdf59c0
2 changed files with 13 additions and 1 deletions
|
|
@ -70,6 +70,16 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
stateFile = mkOption {
|
||||
type = fileType "xdg.stateFile" "<varname>xdg.stateHome</varname>"
|
||||
cfg.stateHome;
|
||||
default = { };
|
||||
description = ''
|
||||
Attribute set of files to link into the user's XDG
|
||||
state home.
|
||||
'';
|
||||
};
|
||||
|
||||
stateHome = mkOption {
|
||||
type = types.path;
|
||||
defaultText = "~/.local/state";
|
||||
|
|
@ -122,6 +132,8 @@ in {
|
|||
cfg.configFile)
|
||||
(mapAttrs' (name: file: nameValuePair "${cfg.dataHome}/${name}" file)
|
||||
cfg.dataFile)
|
||||
(mapAttrs' (name: file: nameValuePair "${cfg.stateHome}/${name}" file)
|
||||
cfg.stateFile)
|
||||
{ "${cfg.cacheHome}/.keep".text = ""; }
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue