From 2e37cefe3e5fd08e6ab079a9401ccbdf55ad3a29 Mon Sep 17 00:00:00 2001 From: jasmine Date: Sat, 21 Dec 2024 21:55:23 +0800 Subject: [PATCH] persist /var/private globally --- nixos/common/optional/persist.nix | 6 ++++++ nixos/viridian/services/wiki-js/default.nix | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/nixos/common/optional/persist.nix b/nixos/common/optional/persist.nix index bd218b5..f0f4a54 100644 --- a/nixos/common/optional/persist.nix +++ b/nixos/common/optional/persist.nix @@ -14,6 +14,12 @@ "/var/lib/nixos" "/var/lib/systemd/coredump" "/etc/NetworkManager/system-connections" + + # Directories that require mode other than 0755 + { + directory = "/var/lib/private"; + mode = "0700"; + } ]; files = [ "/etc/machine-id" diff --git a/nixos/viridian/services/wiki-js/default.nix b/nixos/viridian/services/wiki-js/default.nix index 6ba23f0..8308627 100644 --- a/nixos/viridian/services/wiki-js/default.nix +++ b/nixos/viridian/services/wiki-js/default.nix @@ -39,13 +39,4 @@ {url = "http://127.0.0.1:${toString config.services.wiki-js.settings.port}";} ]; }; - - environment.persistence."/persist" = { - directories = [ - { - directory = "/var/lib/private"; - mode = "0700"; - } - ]; - }; }