Add custom impermanence module
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
username ? throw "username argument is required",
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
@@ -8,28 +9,28 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
environment.persistence = {
|
||||
"/persist".users.${username}.directories = [ "${hmConfig.xdg.relativeConfigHome}/Code" ];
|
||||
"/persist"."${home}/.config/Code" = { };
|
||||
# Bastard: https://github.com/microsoft/vscode/issues/3884
|
||||
"/cache".users.${username}.directories = [
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/Cache"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/CachedConfigurations"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/CachedData"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/CachedExtensionVSIXs"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/CachedExtensions"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/CachedProfilesData"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/Code Cache"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/DawnCache"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/GPUCache"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/Service Worker/CacheStorage"
|
||||
"${hmConfig.xdg.relativeConfigHome}/Code/Service Worker/ScriptCache"
|
||||
];
|
||||
"/cache" = {
|
||||
"${home}/.config/Code/Cache" = { };
|
||||
"${home}/.config/Code/CachedConfigurations" = { };
|
||||
"${home}/.config/Code/CachedData" = { };
|
||||
"${home}/.config/Code/CachedExtensionVSIXs" = { };
|
||||
"${home}/.config/Code/CachedExtensions" = { };
|
||||
"${home}/.config/Code/CachedProfilesData" = { };
|
||||
"${home}/.config/Code/Code Cache" = { };
|
||||
"${home}/.config/Code/DawnCache" = { };
|
||||
"${home}/.config/Code/GPUCache" = { };
|
||||
"${home}/.config/Code/Service Worker/CacheStorage" = { };
|
||||
"${home}/.config/Code/Service Worker/ScriptCache" = { };
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
home-manager.users.${user} = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
|
Reference in New Issue
Block a user