feat(docs): Add image preview to image options
This commit is contained in:
parent
ee404a058e
commit
50e8962025
1 changed files with 12 additions and 17 deletions
|
@ -2,11 +2,12 @@
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
# Like mkEnableOption but defaults to true
|
# Like mkEnableOption but defaults to true
|
||||||
mkDisableOption = option: lib.mkOption {
|
mkDisableOption = option: (lib.mkEnableOption option) // { default = true; example = false; };
|
||||||
description = lib.mdDoc "Whether to enable ${option}.";
|
mkImageOption = { description, url, sha256 ? "" }: lib.mkOption {
|
||||||
type = types.bool;
|
inherit description;
|
||||||
default = true;
|
type = types.path;
|
||||||
example = false;
|
default = builtins.fetchurl { inherit url sha256; };
|
||||||
|
defaultText = lib.literalMD "![${description}](${url})";
|
||||||
};
|
};
|
||||||
|
|
||||||
gui.options = {
|
gui.options = {
|
||||||
|
@ -29,22 +30,16 @@ let
|
||||||
|
|
||||||
styling.options = {
|
styling.options = {
|
||||||
enable = mkDisableOption "jalil's default styling (cannot be disabled currently)";
|
enable = mkDisableOption "jalil's default styling (cannot be disabled currently)";
|
||||||
wallpaper = lib.mkOption {
|
wallpaper = mkImageOption {
|
||||||
description = "The wallpaper to use.";
|
description = "The wallpaper to use.";
|
||||||
type = types.str;
|
url = "https://raw.githubusercontent.com/lunik1/nixos-logo-gruvbox-wallpaper/d4937c424fad79c1136a904599ba689fcf8d0fad/png/gruvbox-dark-rainbow.png";
|
||||||
default = builtins.fetchurl {
|
sha256 = "036gqhbf6s5ddgvfbgn6iqbzgizssyf7820m5815b2gd748jw8zc";
|
||||||
url = "https://raw.githubusercontent.com/lunik1/nixos-logo-gruvbox-wallpaper/d4937c424fad79c1136a904599ba689fcf8d0fad/png/gruvbox-dark-rainbow.png";
|
|
||||||
sha256 = "036gqhbf6s5ddgvfbgn6iqbzgizssyf7820m5815b2gd748jw8zc";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
bootLogo = lib.mkOption {
|
bootLogo = mkImageOption {
|
||||||
description = "The logo used by plymouth at boot.";
|
description = "The logo used by plymouth at boot.";
|
||||||
type = types.str;
|
|
||||||
# http://xenia-linux-site.glitch.me/images/cathodegaytube-splash.png
|
# http://xenia-linux-site.glitch.me/images/cathodegaytube-splash.png
|
||||||
default = builtins.fetchurl {
|
url = "https://efimero.github.io/xenia-images/cathodegaytube-splash.png";
|
||||||
url = "https://efimero.github.io/xenia-images/cathodegaytube-splash.png";
|
sha256 = "qKugUfdRNvMwSNah+YmMepY3Nj6mWlKFh7jlGlAQDo8=";
|
||||||
sha256 = "qKugUfdRNvMwSNah+YmMepY3Nj6mWlKFh7jlGlAQDo8=";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue