Start a user-specific variant of the install file command.
This commit is contained in:
parent
c3f715d010
commit
c26d6f34ea
@ -15,8 +15,40 @@ in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
install.file = lib.mkOption {
|
||||
options.me.install = {
|
||||
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 (
|
||||
lib.types.submodule (
|
||||
{ name, config, ... }:
|
||||
|
Loading…
x
Reference in New Issue
Block a user