21 lines
432 B
Nix
Raw Permalink Normal View History

{ lib, config, ... }:
let
cfg = config.playground.welcome;
in
{
options.playground.welcome = {
enable = lib.mkEnableOption "the playground Home Manager welcome file";
name = lib.mkOption {
type = lib.types.str;
default = "world";
description = "Name placed in the generated welcome file.";
};
};
config = lib.mkIf cfg.enable {
home.file."welcome.txt".text = "hello, ${cfg.name}";
};
}