mount sharepoint instead
This commit is contained in:
1 parent
7f37c01ef4
commit
08ae8b7882
2 files changed
+31
-28
No files matched your search
@@ -87,13 +87,18 @@ coherent commit before starting unrelated work.
|
|||||||
Codex has agent-deck notifications and hooks enabled. Shared Context7/NixOS skills
|
Codex has agent-deck notifications and hooks enabled. Shared Context7/NixOS skills
|
||||||
live under `.agents/skills`.
|
live under `.agents/skills`.
|
||||||
Zellij is also declared on workstations. Further project workflow work is deferred.
|
Zellij is also declared on workstations. Further project workflow work is deferred.
|
||||||
- **SharePoint:** Zenith declares an hourly service syncing `company-sharepoint:`
|
- **SharePoint:** Zenith mounts `company-sharepoint:` at
|
||||||
into `~/.local/share/yookr-reference/sharepoint/Algemeen` and
|
`~/.local/share/yookr-reference/sharepoint/Algemeen` and
|
||||||
`company-sharepoint-projecten:` into `Projecten`. Each invocation has
|
`company-sharepoint-projecten:` at `Projecten` using the user services
|
||||||
`--max-delete 100`; new files use `UMask=0077`. The latest implementation only
|
`sharepoint-reference-algemeen` and `sharepoint-reference-projecten`.
|
||||||
checks for `rclone.conf`; the old environment-file gate is gone. Archived setup
|
These read-only reference mounts stream files on demand with no VFS disk cache
|
||||||
instructions describe an earlier version. Consent, remote configuration and
|
and a 16 MiB memory buffer per open file. Internet access is required; directory
|
||||||
synchronization state were not inspected during this cleanup.
|
listings are cached in memory for five minutes. Credentials stay in
|
||||||
|
`~/.config/rclone/rclone.conf`. The previous hourly mirror is removed.
|
||||||
|
When migrating another existing mirror, stop its sync timer and service,
|
||||||
|
verify local files against their remotes with `rclone check --one-way`, and move
|
||||||
|
the mirror aside before starting the mounts. Remove verified local copies only
|
||||||
|
after checking that the mounts work; preserve unmatched files separately.
|
||||||
- **Remote support:** Zenith enables TeamViewer. Temporary Xorg/Xfce settings are
|
- **Remote support:** Zenith enables TeamViewer. Temporary Xorg/Xfce settings are
|
||||||
comments only. The purpose beyond remote support and runtime acceptance were
|
comments only. The purpose beyond remote support and runtime acceptance were
|
||||||
not recorded; preserve the change without calling it a settled design.
|
not recorded; preserve the change without calling it a settled design.
|
||||||
|
|||||||
@@ -10,37 +10,35 @@
|
|||||||
let
|
let
|
||||||
rcloneConfig = "${config.xdg.configHome}/rclone/rclone.conf";
|
rcloneConfig = "${config.xdg.configHome}/rclone/rclone.conf";
|
||||||
destination = "${config.xdg.dataHome}/yookr-reference/sharepoint";
|
destination = "${config.xdg.dataHome}/yookr-reference/sharepoint";
|
||||||
|
libraries = {
|
||||||
|
Algemeen = "company-sharepoint:";
|
||||||
|
Projecten = "company-sharepoint-projecten:";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd.user.services.sharepoint-reference-sync = {
|
systemd.user.services = lib.mapAttrs' (
|
||||||
|
name: remote:
|
||||||
|
lib.nameValuePair "sharepoint-reference-${lib.toLower name}" {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Refresh the local SharePoint reference mirror";
|
Description = "SharePoint ${name} on-demand reference mount";
|
||||||
ConditionPathExists = rcloneConfig;
|
ConditionPathExists = rcloneConfig;
|
||||||
# Let an in-flight sync finish; activation must not restart and wait for it.
|
|
||||||
X-SwitchMethod = "keep-old";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "notify";
|
||||||
UMask = "0077";
|
UMask = "0077";
|
||||||
ExecStart = [
|
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath [ pkgs.fuse3 ]}";
|
||||||
"${lib.getExe pkgs.rclone} --config ${rcloneConfig} sync company-sharepoint: ${destination}/Algemeen --max-delete 100"
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${destination}/${name}";
|
||||||
"${lib.getExe pkgs.rclone} --config ${rcloneConfig} sync company-sharepoint-projecten: ${destination}/Projecten --max-delete 100"
|
# Stream reads into memory; never retain file contents in a disk cache.
|
||||||
];
|
# Keep the mount read-only, matching its role as reference material.
|
||||||
};
|
ExecStart = "${lib.getExe pkgs.rclone} mount ${remote} ${destination}/${name} --config ${rcloneConfig} --read-only --vfs-cache-mode off --buffer-size 16M --dir-cache-time 5m --umask 077";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "30s";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.timers.sharepoint-reference-sync = {
|
Install.WantedBy = [ "default.target" ];
|
||||||
Unit.Description = "Refresh the local SharePoint reference mirror hourly";
|
}
|
||||||
|
) libraries;
|
||||||
Timer = {
|
|
||||||
OnCalendar = "hourly";
|
|
||||||
Persistent = true;
|
|
||||||
RandomizedDelaySec = "10m";
|
|
||||||
};
|
|
||||||
|
|
||||||
Install.WantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.modules.nixos.sharepoint-reference = {
|
flake.modules.nixos.sharepoint-reference = {
|
||||||
|
|||||||
Reference in new issue
Block a user