nixos-config/templates/basic-nix-module-flake/nix/modules/default.nix

22 lines
463 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
cfg = config.programs.foo;
settingsFormat = pkgs.format.json { };
in
{
options.programs.foo = {
enable = lib.mkEnableOption "foo, a sample program";
package = lib.mkPackageOption pkgs "foo" { };
settings = lib.mkOption {
type = settingsFormat.type;
default = { };
# TODO: Don't forget to set an example here.
description = ''
The settings of the program.
'';
};
};
}