From df1febec6f63c5a70c1416d72d787a4024e73254 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Tue, 31 Oct 2023 16:16:02 +0000 Subject: [PATCH] Add dummy files to get correct tmproot parent permissions --- nixos/modules/tmproot.nix | 4 ++++ nixos/modules/user.nix | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/tmproot.nix b/nixos/modules/tmproot.nix index d802157..a53236f 100644 --- a/nixos/modules/tmproot.nix +++ b/nixos/modules/tmproot.nix @@ -150,6 +150,10 @@ in ]; files = [ "/etc/machine-id" + + # Just to make sure we get correct default perms + "/var/lib/.tmproot.dummy" + "/var/cache/.tmproot.dummy" ]; }; }; diff --git a/nixos/modules/user.nix b/nixos/modules/user.nix index 8989f9c..f0aea04 100644 --- a/nixos/modules/user.nix +++ b/nixos/modules/user.nix @@ -66,12 +66,15 @@ in }; in { - files = map (file: { + files = (map (file: { inherit file; parentDirectory = perms; }) [ "/home/${user'.name}/.bash_history" "/home/${user'.name}/.lesshst" + ]) ++ [ + # Just to make sure we get correct default perms + "/home/.tmproot.dummy" ]; directories = map (directory: { inherit directory;