Move some (all) files around
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
30
hosts/common/user/configs/console/persist/default.nix
Normal file
30
hosts/common/user/configs/console/persist/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
systemd.tmpfiles.rules = (
|
||||
[
|
||||
"d /persist/home 0755 root root -"
|
||||
"d /cache/home 0755 root root -"
|
||||
"d /persist${user.home} 0700 ${user.name} users -"
|
||||
"d /cache${user.home} 0700 ${user.name} users -"
|
||||
]
|
||||
);
|
||||
|
||||
home-manager.users.${user.name} = {
|
||||
imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist${user.home}".allowOther = true;
|
||||
"/cache${user.home}".allowOther = true;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user