fix: wrong nvidia enable path in home-manager impermanence passthrough; and impermanence requires root home directory to be set separately

This commit is contained in:
oddlama 2023-09-04 22:02:05 +02:00
parent 562d1dffb3
commit 32ca87e3a6
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 10 additions and 4 deletions

View file

@ -49,7 +49,7 @@ in {
# persistence options that we defined above.
imports = let
mkUserFiles = map (x:
{mode = "600";}
{parentDirectory.mode = "700";}
// (
if isAttrs x
then x

View file

@ -1,8 +1,11 @@
{
config,
nixosConfig,
lib,
...
}: {
}: let
inherit (lib) optionals;
in {
home.persistence."/state".files =
[
# nothing yet ...
@ -28,7 +31,7 @@
".local/state/nvim"
".cache/nvim"
]
++ optionals nixosConfig.hardware.nvidia.enable [
++ optionals nixosConfig.hardware.nvidia.modesetting.enable [
".cache/nvidia" # GLCache
]
++ optionals nixosConfig.services.pipewire.enable [

View file

@ -1,6 +1,5 @@
{
config,
lib,
pkgs,
...
}: {
@ -10,6 +9,10 @@
shell = pkgs.zsh;
};
# This cannot currently be derived automatically due to a design flaw in nixpkgs.
environment.persistence."/state".users.root.home = "/root";
environment.persistence."/persist".users.root.home = "/root";
home-manager.users.root = {
imports = [
../common