Add plasma-manager documentation generation (#278)

This commit is contained in:
magnouvean 2024-07-30 19:10:38 +02:00 committed by GitHub
parent 51a2761425
commit 110d50c34f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 1170 additions and 8 deletions

28
.github/workflows/github_pages.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: GitHub Pages
on:
push:
branches:
- trunk
jobs:
publish:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: nix-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix-build -A docs.html
cp -r result/share/doc/plasma-manager public
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public

7
default.nix Normal file
View File

@ -0,0 +1,7 @@
{ pkgs ? import <nixpkgs> { } }:
rec {
docs = import ./docs {
inherit pkgs;
lib = pkgs.lib;
};
}

45
docs/default.nix Normal file
View File

@ -0,0 +1,45 @@
{ pkgs, lib, ... }:
let
dontCheckModules = { _module.check = false; };
modules = [ ../modules dontCheckModules ];
githubDeclaration = user: repo: branch: subpath: {
url = "https://github.com/${user}/${repo}/blob/${branch}/${subpath}";
name = "<${repo}/${subpath}>";
};
pmPath = toString ./..;
transformOptions =
opt: opt // {
declarations = (map
(decl:
if (lib.hasPrefix pmPath (toString decl)) then (githubDeclaration "nix-community" "plasma-manager" "trunk" (lib.removePrefix "/" (lib.removePrefix pmPath (toString decl)))) else decl)
opt.declarations);
};
buildOptionsDocs = (args@{ modules, ... }:
let
opts = (lib.evalModules {
inherit modules;
class = "homeManager";
}).options;
options = builtins.removeAttrs opts [ "_module" ];
in
pkgs.buildPackages.nixosOptionsDoc {
inherit options;
inherit transformOptions;
warningsAreErrors = false;
});
pmOptionsDoc = buildOptionsDocs {
inherit modules;
};
plasma-manager-options = pkgs.callPackage ./plasma-manager-options.nix {
nixos-render-docs = pkgs.nixos-render-docs;
plasma-manager-options = pmOptionsDoc.optionsJSON;
revision = "latest";
};
in
{
html = plasma-manager-options;
}

View File

@ -0,0 +1,7 @@
# Introduction {#intro}
To get started it may be helpful to check out the
[getting started section in the README](https://github.com/nix-community/plasma-manager?tab=readme-ov-file#getting-started).
This gives a couple examples on how you can get started using plasma-manager,
either using a flake or traditional nix-channels.
More details may be available here in the future!

View File

@ -0,0 +1 @@
{}

15
docs/manual/manual.md Normal file
View File

@ -0,0 +1,15 @@
# Plasma-Manager manual {#plasma-manager-manual}
## Version: @VERSION@
```{=include=} preface html:into-file=//preface.xhtml
preface.md
```
```{=include=} parts html:into-file=//introduction.xhtml
introduction.md
```
```{=include=} appendix html:into-file=//options.xhtml
options.md
```

7
docs/manual/options.md Normal file
View File

@ -0,0 +1,7 @@
# Plasma-Manager Options {#ch-options}
```{=include=} options
id-prefix: opt-
list-id: plasma-manager-options
source: @OPTIONS_JSON@
```

10
docs/manual/preface.md Normal file
View File

@ -0,0 +1,10 @@
# Preface {#preface}
Plasma-Manager is a [Home Manager](https://github.com/nix-community/home-manager)
module which has as a goal to be able to configure as much of KDE plasma as
possible, using nix.
The project has progressed a lot lately, to the extent where
[most of the configuration options present in KDE Plasma 6 are configurable through plasma-manager](https://github.com/nix-community/plasma-manager?tab=readme-ov-file#whats-supported).
The main focus of the project has been on KDE plasma 6 for a little while now,
but it's also possible to use it to some extent on plasma 5 as well.

View File

@ -0,0 +1,56 @@
{ stdenv
, nixos-render-docs
, plasma-manager-options
, revision
, lib
, documentation-highlighter
}:
let
outputPath = "share/doc/plasma-manager";
in
stdenv.mkDerivation {
name = "plasma-manager-options";
nativeBuildInputs = [ nixos-render-docs ];
src = ./manual;
buildPhase = ''
mkdir -p out/highlightjs
cp -t out/highlightjs \
${documentation-highlighter}/highlight.pack.js \
${documentation-highlighter}/LICENSE \
${documentation-highlighter}/mono-blue.css \
${documentation-highlighter}/loader.js
cp ${./static/style.css} out/style.css
substituteInPlace options.md \
--replace \
'@OPTIONS_JSON@' \
${plasma-manager-options}/share/doc/nixos/options.json
substituteInPlace manual.md \
--replace \
'@VERSION@' \
${revision}
nixos-render-docs manual html \
--manpage-urls ./manpage-urls.json \
--revision ${lib.trivial.revisionWithDefault revision} \
--style style.css \
--script highlightjs/highlight.pack.js \
--script highlightjs/loader.js \
--toc-depth 1 \
--section-toc-depth 1 \
manual.md \
out/index.xhtml
'';
installPhase = ''
dest="$out/${outputPath}"
mkdir -p "$(dirname "$dest")"
mv out "$dest"
'';
}

986
docs/static/style.css vendored Normal file
View File

@ -0,0 +1,986 @@
:root {
--nmd-color0: #0A3E68;
--nmd-color1: #268598;
--nmd-color2: #B8D09E;
--nmd-color3: #F6CF5E;
--nmd-color4: #EC733B;
--nmd-color-info: #167cb9;
--nmd-color-warn: #ff6700
}
html {
-webkit-text-size-adjust: 100%
}
html:focus-within {
scroll-behavior: smooth
}
body {
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
min-height: 100vh;
position: relative;
text-rendering: optimizeSpeed;
width: 100%
}
*,
:after,
:before {
box-sizing: border-box
}
a:not([class]) {
-webkit-text-decoration-skip: ink;
text-decoration-skip-ink: auto
}
a,
abbr,
acronym,
address,
applet,
article,
aside,
audio,
b,
big,
blockquote,
body,
canvas,
caption,
center,
cite,
code,
dd,
del,
details,
dfn,
div,
dl,
dt,
em,
embed,
fieldset,
figcaption,
figure,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
hgroup,
html,
i,
iframe,
img,
ins,
kbd,
label,
legend,
li,
mark,
menu,
nav,
object,
ol,
output,
p,
pre,
q,
ruby,
s,
samp,
section,
small,
span,
strike,
strong,
sub,
summary,
sup,
table,
tbody,
td,
tfoot,
th,
thead,
time,
tr,
tt,
u,
ul,
var,
video {
border: 0;
font-size: 100%;
font: inherit;
margin: 0;
padding: 0;
vertical-align: baseline
}
:focus {
outline: 0
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section {
display: block
}
ol,
ul {
list-style: none
}
blockquote,
q {
quotes: none
}
blockquote:after,
blockquote:before,
q:after,
q:before {
content: "";
content: none
}
input,
input:required {
box-shadow: none
}
input:-webkit-autofill,
input:-webkit-autofill:active,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover {
-webkit-box-shadow: inset 0 0 0 30px #fff
}
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-results-button,
input[type=search]::-webkit-search-results-decoration {
-webkit-appearance: none;
-moz-appearance: none
}
input[type=search] {
-webkit-appearance: none;
-moz-appearance: none
}
input:focus {
outline: 0
}
audio,
canvas,
video {
display: inline-block;
max-width: 100%
}
audio:not([controls]) {
display: none;
height: 0
}
[hidden] {
display: none
}
a:active,
a:hover {
outline: 0
}
img {
height: auto;
max-width: 100%;
vertical-align: middle
}
img,
picture {
display: inline-block
}
button,
input {
line-height: normal
}
button,
html input[type=button],
input[type=reset],
input[type=submit] {
-webkit-appearance: button;
background: 0 0;
border: 0;
cursor: pointer
}
button[disabled],
html input[disabled] {
cursor: default
}
[disabled] {
pointer-events: none
}
input[type=checkbox],
input[type=radio] {
padding: 0
}
input[type=search] {
-webkit-appearance: textfield;
box-sizing: content-box
}
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration {
-webkit-appearance: none
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0
}
button {
background: 0 0;
border: 0
}
textarea {
overflow: auto;
resize: vertical;
vertical-align: top
}
table {
border-collapse: collapse;
border-spacing: 0;
text-indent: 0
}
hr {
background: #000;
border: 0;
box-sizing: content-box;
height: 1px;
line-height: 0;
margin: 0;
overflow: visible;
padding: 0;
page-break-after: always;
width: 100%
}
pre {
font-family: monospace, monospace;
font-size: 100%
}
a {
background-color: transparent
}
abbr[title] {
border-bottom: none;
text-decoration: none
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace
}
small,
sub,
sup {
font-size: 75%
}
sub,
sup {
line-height: 0;
position: relative;
vertical-align: baseline
}
sub {
bottom: -5px
}
sup {
top: -5px
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1;
margin: 0;
padding: 0
}
button,
input {
overflow: visible
}
button,
select {
text-transform: none
}
[type=button],
[type=reset],
[type=submit],
button {
-webkit-appearance: button
}
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner,
button::-moz-focus-inner {
border-style: none;
outline: 0;
padding: 0
}
legend {
border: 0;
color: inherit;
display: block;
max-width: 100%;
white-space: normal;
width: 100%
}
fieldset {
min-width: 0
}
body:not(:-moz-handler-blocked) fieldset {
display: block
}
progress {
vertical-align: baseline
}
[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
height: auto
}
[type=search] {
-webkit-appearance: textfield;
outline-offset: -2px
}
[type=search]::-webkit-search-decoration {
-webkit-appearance: none
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit
}
summary {
display: list-item
}
template {
display: none
}
body {
background: white;
color: #111827;
max-width: min(100ch, 1024px);
margin: 0 auto;
padding: 10px;
font-family: "Lucida Sans", Arial, sans-serif;
font-size: 16px;
line-height: 1.4em
}
@media (prefers-color-scheme: dark) {
body {
background: #111827;
color: #F9FAFB
}
}
h1,
h2,
h3 {
color: var(--nmd-color0);
font-family: "Lato", sans-serif;
font-weight: 300;
line-height: 1.125
}
@media (prefers-color-scheme: dark) {
h1,
h2,
h3 {
color: var(--nmd-color4)
}
}
h1 {
font-size: 48px;
font-weight: 300;
margin: 4rem 0 1.5rem
}
h2 {
font-size: 32px;
font-weight: 300;
margin: 2rem 0 1rem
}
h3 {
font-size: 20px;
font-weight: 400;
margin: .5rem .25rem
}
p {
margin: .9rem 0
}
p:first-child {
margin-top: 0
}
p:last-child {
margin-bottom: 0
}
a {
color: var(--nmd-color0);
text-decoration: underline;
text-underline-offset: 3px
}
a:visited {
color: var(--nmd-color1)
}
a:hover {
color: var(--nmd-color1)
}
@media (prefers-color-scheme: dark) {
a {
color: var(--nmd-color3)
}
a:visited {
color: var(--nmd-color2)
}
a:hover {
color: var(--nmd-color4)
}
}
code {
font-size: 90%
}
span.command {
font-size: 90%;
font-family: monospace
}
em {
font-style: italic
}
strong {
font-weight: bold
}
pre {
background: #F9FAFB;
margin: 2rem 16px;
padding: 10px;
border: 1px solid #E5E7EB;
border-radius: 4px;
box-shadow: 4px 4px 8px #E5E7EB;
font-size: 90%;
margin-bottom: 1.5rem;
padding: 6px;
overflow: auto
}
@media (prefers-color-scheme: dark) {
pre {
background: #1F2937;
border-color: black;
box-shadow: 4px 4px 8px black
}
}
pre span img {
user-select: none
}
pre:has(code) {
padding: 0
}
td,
th {
padding: 2px 5px
}
td:first-child,
th:first-child {
padding-left: 0
}
td:last-child,
th:last-child {
padding-right: 0
}
dt {
margin: 1.2rem 0 .8rem
}
dd {
margin-left: 2rem
}
ul {
margin: .9rem 0;
padding-left: 30px;
list-style: disc
}
ul:first-child {
margin-top: 0
}
ul:last-child {
margin-bottom: 0
}
ol {
margin: .9rem 0;
padding-left: 30px;
list-style: decimal
}
ol:first-child {
margin-top: 0
}
ol:last-child {
margin-bottom: 0
}
li {
margin: .9rem 0;
padding-left: 5px
}
li:first-child {
margin-top: 0
}
li:last-child {
margin-bottom: 0
}
.navheader hr,
.navfooter hr {
margin: 1rem 0;
background: #E5E7EB
}
@media (prefers-color-scheme: dark) {
.navheader hr,
.navfooter hr {
background: #4B5563
}
}
.navheader a,
.navfooter a {
text-decoration: none
}
div.titlepage {
margin: 40px 0
}
div.titlepage hr {
display: none
}
div.toc {
background: #F9FAFB;
margin: 2rem 16px;
padding: 10px;
border: 1px solid #E5E7EB;
border-radius: 4px;
box-shadow: 4px 4px 8px #E5E7EB
}
@media (prefers-color-scheme: dark) {
div.toc {
background: #1F2937;
border-color: black;
box-shadow: 4px 4px 8px black
}
}
div.toc a {
text-decoration: none
}
div.note,
div.warning {
background: #F9FAFB;
margin: 2rem 16px;
padding: 10px;
border: 1px solid #E5E7EB;
border-radius: 4px;
box-shadow: 4px 4px 8px #E5E7EB;
font-style: italic
}
@media (prefers-color-scheme: dark) {
div.note,
div.warning {
background: #1F2937;
border-color: black;
box-shadow: 4px 4px 8px black
}
}
div.note h3,
div.warning h3 {
float: right;
margin: 0 0 1rem 1rem;
width: 42px;
height: 42px;
content: url()
}
div.note h3+p,
div.warning h3+p {
margin-top: 0
}
div.note h3 {
background-color: var(--nmd-color-info);
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E");
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 8h.01'%3E%3C/path%3E%3Cpath d='M11 12h1v4h1'%3E%3C/path%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z'%3E%3C/path%3E%3C/svg%3E")
}
div.warning h3 {
background-color: var(--nmd-color-warn);
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E");
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='42' viewBox='0 0 24 24' stroke-width='2' stroke='black' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M12 9v2m0 4v.01'%3E%3C/path%3E%3Cpath d='M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75'%3E%3C/path%3E%3C/svg%3E")
}
.term {
font-weight: 300
}
.docbook .xref img[src^=images\/callouts\/],
.screen img,
.programlisting img {
width: 1em
}
.calloutlist img {
width: 1.3em
}
.programlisting.language-shell .hljs-meta.prompt_ {
user-select: none
}
/*!
Theme: Tomorrow
Author: Chris Kempson (http://chriskempson.com)
License: ~ MIT (or more permissive) [via base16-schemes-source]
Maintainer: @highlightjs/core-team
Version: 2021.09.0
*/
pre code.hljs {
display: block;
overflow-x: auto;
padding: 1em
}
code.hljs {
padding: 3px 5px
}
.hljs {
color: #4d4d4c;
background: #fff
}
.hljs ::selection,
.hljs::selection {
background-color: #d6d6d6;
color: #4d4d4c
}
.hljs-comment {
color: #8e908c
}
.hljs-tag {
color: #969896
}
.hljs-operator,
.hljs-punctuation,
.hljs-subst {
color: #4d4d4c
}
.hljs-operator {
opacity: .7
}
.hljs-bullet,
.hljs-deletion,
.hljs-name,
.hljs-selector-tag,
.hljs-template-variable,
.hljs-variable {
color: #c82829
}
.hljs-attr,
.hljs-link,
.hljs-literal,
.hljs-number,
.hljs-symbol,
.hljs-variable.constant_ {
color: #f5871f
}
.hljs-class .hljs-title,
.hljs-title,
.hljs-title.class_ {
color: #eab700
}
.hljs-strong {
font-weight: 700;
color: #eab700
}
.hljs-addition,
.hljs-code,
.hljs-string,
.hljs-title.class_.inherited__ {
color: #718c00
}
.hljs-built_in,
.hljs-doctag,
.hljs-keyword.hljs-atrule,
.hljs-quote,
.hljs-regexp {
color: #3e999f
}
.hljs-attribute,
.hljs-function .hljs-title,
.hljs-section,
.hljs-title.function_,
.ruby .hljs-property {
color: #4271ae
}
.diff .hljs-meta,
.hljs-keyword,
.hljs-template-tag,
.hljs-type {
color: #8959a8
}
.hljs-emphasis {
color: #8959a8;
font-style: italic
}
.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-meta .hljs-string {
color: #a3685a
}
.hljs-meta .hljs-keyword,
.hljs-meta-keyword {
font-weight: 700
}
@media (prefers-color-scheme: dark) {
/*! Theme: Tomorrow Night Author: Chris Kempson (http://chriskempson.com) License: ~ MIT (or more permissive) [via base16-schemes-source] Maintainer: @highlightjs/core-team Version: 2021.09.0*/
pre code.hljs {
display: block;
overflow-x: auto;
padding: 1em
}
code.hljs {
padding: 3px 5px
}
.hljs {
color: #ccc;
background: #2d2d2d
}
.hljs ::selection,
.hljs::selection {
background-color: #515151;
color: #ccc
}
.hljs-comment {
color: #999
}
.hljs-tag {
color: #b4b7b4
}
.hljs-operator,
.hljs-punctuation,
.hljs-subst {
color: #ccc
}
.hljs-operator {
opacity: .7
}
.hljs-bullet,
.hljs-deletion,
.hljs-name,
.hljs-selector-tag,
.hljs-template-variable,
.hljs-variable {
color: #f2777a
}
.hljs-attr,
.hljs-link,
.hljs-literal,
.hljs-number,
.hljs-symbol,
.hljs-variable.constant_ {
color: #f99157
}
.hljs-class .hljs-title,
.hljs-title,
.hljs-title.class_ {
color: #fc6
}
.hljs-strong {
font-weight: 700;
color: #fc6
}
.hljs-addition,
.hljs-code,
.hljs-string,
.hljs-title.class_.inherited__ {
color: #9c9
}
.hljs-built_in,
.hljs-doctag,
.hljs-keyword.hljs-atrule,
.hljs-quote,
.hljs-regexp {
color: #6cc
}
.hljs-attribute,
.hljs-function .hljs-title,
.hljs-section,
.hljs-title.function_,
.ruby .hljs-property {
color: #69c
}
.diff .hljs-meta,
.hljs-keyword,
.hljs-template-tag,
.hljs-type {
color: #c9c
}
.hljs-emphasis {
color: #c9c;
font-style: italic
}
.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-meta .hljs-string {
color: #a3685a
}
.hljs-meta .hljs-keyword,
.hljs-meta-keyword {
font-weight: 700
}
}

View File

@ -33,7 +33,7 @@ let
command = lib.mkOption {
type = with lib.types; nullOr str;
default = null;
example = "''${pkgs.zsh}/bin/zsh";
example = lib.literalExpression ''"''${pkgs.zsh}/bin/zsh"'';
description = ''
The command to run on new sessions.
'';

View File

@ -8,7 +8,7 @@ in
wallpaper = lib.mkOption {
type = with lib.types; nullOr path;
default = null;
example = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/Kay/contents/images/1080x1920.png";
example = lib.literalExpression ''"''${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/Kay/contents/images/1080x1920.png"'';
description = ''
The wallpaper for the lockscreen. Can be either be the path to an image file or a kpackage.
'';
@ -24,7 +24,7 @@ in
wallpaperSlideShow = lib.mkOption {
type = lib.types.nullOr wallpaperSlideShowType;
default = null;
example = { path = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/"; };
example = lib.literalExpression ''{ path = "''${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/"; }'';
description = ''
Allows you to set wallpaper using the slideshow plugin. Needs the path
to at least one directory.

View File

@ -42,19 +42,19 @@ with lib.types; let
{
value = mkOption {
type = str;
description = "${name} to match";
description = "Name to match.";
};
type = mkOption {
type = enum (attrNames matchRules);
default = "exact";
description = "${name} match type";
description = "Name match type.";
};
}
// optionalAttrs hasMatchWhole {
match-whole = mkOption {
type = bool;
default = true;
description = "Match whole ${name}";
description = "Match whole name.";
};
};
};

View File

@ -101,7 +101,7 @@ in
wallpaper = lib.mkOption {
type = with lib.types; nullOr path;
default = null;
example = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/Kay/contents/images/1080x1920.png";
example = lib.literalExpression ''"''${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/Kay/contents/images/1080x1920.png"'';
description = ''
The Plasma wallpaper. Can be either be the path to an image file or a kpackage.
'';
@ -110,7 +110,7 @@ in
wallpaperSlideShow = lib.mkOption {
type = lib.types.nullOr wallpaperSlideShowType;
default = null;
example = { path = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/"; };
example = lib.literalExpression ''{ path = "''${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/"; }'';
description = ''
Allows you to set wallpaper slideshow. Needs a directory of your wallpapers and an interval length.
'';