From c1f3fc502dffa5df905265fde38af0c3c8fe2534 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 30 Jan 2023 10:34:36 +0000 Subject: [PATCH] sane.users..persist: forward to sane.persist.home --- modules/persist/default.nix | 1 + modules/users.nix | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/persist/default.nix b/modules/persist/default.nix index fd97f821..751bf476 100644 --- a/modules/persist/default.nix +++ b/modules/persist/default.nix @@ -191,6 +191,7 @@ in }; sane.persist.byPath = mkOption { type = types.attrsOf (convertInlineAcl entryAtPath); + # XXX: see computed.nix for definition description = '' map of => for all paths to be persisted. this is computed from the other options, but users can also set it explicitly (useful for overriding) diff --git a/modules/users.nix b/modules/users.nix index 25d8d75e..75ff37d9 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -1,4 +1,4 @@ -{ config, lib, sane-lib, ... }: +{ config, lib, options, sane-lib, ... }: let inherit (builtins) attrValues; @@ -17,6 +17,14 @@ let => `sane.fs."/home/colin/.config/aerc" = X; ''; }; + + persist = mkOption { + type = options.sane.persist.home.type; + default = {}; + description = '' + entries to pass onto `sane.persist.home` + ''; + }; }; }; userModule = types.submodule ({ config, ... }: { @@ -40,6 +48,7 @@ let name = path-lib.concat [ "/home/${user}" path ]; inherit value; }) defn.fs; + sane.persist.home = defn.persist; }; in { @@ -69,6 +78,7 @@ in num-default-users = count (u: u.default) (attrValues cfg); take = f: { sane.fs = f.sane.fs; + sane.persist = f.sane.persist; }; in mkMerge [ (take (sane-lib.mkTypedMerge take configs))