Start a user-specific variant of the install file command.

This commit is contained in:
Tom Alexander 2025-04-11 18:00:36 -04:00
parent c3f715d010
commit c26d6f34ea
No known key found for this signature in database
GPG Key ID: D3A179C9A53C0EDE

View File

@ -15,8 +15,40 @@ in
{ {
imports = [ ]; imports = [ ];
options.me = { options.me.install = {
install.file = lib.mkOption { user = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ username, config, ... }:
{
options = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
defaultText = "me.install.file.username.enable";
example = false;
description = "Whether we want to install files in this user's home directory.";
};
target_username = lib.mkOption {
type = lib.types.str;
defaultText = "me.install.file.username.target_username";
example = "root";
description = "The username for the user whose home directory will contain the file.";
};
};
config = {
target_username = lib.mkDefault username;
};
}
)
);
defaultText = "me.install.user.username";
default = { };
# TODO: example
};
file = lib.mkOption {
type = lib.types.attrsOf ( type = lib.types.attrsOf (
lib.types.submodule ( lib.types.submodule (
{ name, config, ... }: { name, config, ... }: