deploy: 7db6291d95
|
@ -1,35 +0,0 @@
|
|||
/* This file is NOT part of highlight.js */
|
||||
|
||||
class PreserveCallouts {
|
||||
|
||||
constructor(options) {
|
||||
self.callouts = [];
|
||||
/* Using OBJECT REPLACEMENT CHARACTER as a marker of where the callout
|
||||
should be inserted. We hope that this won't cause conflicts. */
|
||||
self.marker = '\u{FFFC}';
|
||||
}
|
||||
|
||||
'before:highlightElement'({el, language}) {
|
||||
const re = /<a id="[^"]+"><\/a><span><img src="images\/callouts\/\d+.svg" alt="\d+" border="0"><\/span>/g;
|
||||
const array = [...el.innerHTML.matchAll(re)];
|
||||
if (array.length > 0) {
|
||||
self.callouts = array;
|
||||
el.innerHTML = el.innerHTML.replaceAll(re, self.marker);
|
||||
}
|
||||
}
|
||||
|
||||
'after:highlightElement'({ el, result, text }) {
|
||||
if (self.callouts.length > 0) {
|
||||
el.innerHTML = el.innerHTML.replaceAll(
|
||||
self.marker, (str) => self.callouts.shift());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
hljs.addPlugin(new PreserveCallouts());
|
||||
|
||||
document.querySelectorAll('pre.programlisting, pre.screen').forEach((el) => {
|
||||
hljs.highlightElement(el);
|
||||
});
|
||||
});
|
340
highlight.min.js
vendored
|
@ -1,340 +0,0 @@
|
|||
/*!
|
||||
Highlight.js v11.7.0 (git: 82688fad18)
|
||||
(c) 2006-2022 undefined and other contributors
|
||||
License: BSD-3-Clause
|
||||
*/
|
||||
var hljs=function(){"use strict";var e={exports:{}};function t(e){
|
||||
return e instanceof Map?e.clear=e.delete=e.set=()=>{
|
||||
throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{
|
||||
throw Error("set is read-only")
|
||||
}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((n=>{var i=e[n]
|
||||
;"object"!=typeof i||Object.isFrozen(i)||t(i)})),e}
|
||||
e.exports=t,e.exports.default=t;class n{constructor(e){
|
||||
void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}
|
||||
ignoreMatch(){this.isMatchIgnored=!0}}function i(e){
|
||||
return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")
|
||||
}function r(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t]
|
||||
;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}
|
||||
const s=e=>!!e.scope||e.sublanguage&&e.language;class o{constructor(e,t){
|
||||
this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){
|
||||
this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=""
|
||||
;t=e.sublanguage?"language-"+e.language:((e,{prefix:t})=>{if(e.includes(".")){
|
||||
const n=e.split(".")
|
||||
;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")
|
||||
}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}
|
||||
closeNode(e){s(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){
|
||||
this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]}
|
||||
;return Object.assign(t,e),t};class c{constructor(){
|
||||
this.rootNode=a(),this.stack=[this.rootNode]}get top(){
|
||||
return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
|
||||
this.top.children.push(e)}openNode(e){const t=a({scope:e})
|
||||
;this.add(t),this.stack.push(t)}closeNode(){
|
||||
if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
|
||||
for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
|
||||
walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){
|
||||
return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),
|
||||
t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){
|
||||
"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
|
||||
c._collapse(e)})))}}class l extends c{constructor(e){super(),this.options=e}
|
||||
addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}
|
||||
addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root
|
||||
;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){
|
||||
return new o(this,this.options).value()}finalize(){return!0}}function g(e){
|
||||
return e?"string"==typeof e?e:e.source:null}function d(e){return p("(?=",e,")")}
|
||||
function u(e){return p("(?:",e,")*")}function h(e){return p("(?:",e,")?")}
|
||||
function p(...e){return e.map((e=>g(e))).join("")}function f(...e){const t=(e=>{
|
||||
const t=e[e.length-1]
|
||||
;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}
|
||||
})(e);return"("+(t.capture?"":"?:")+e.map((e=>g(e))).join("|")+")"}
|
||||
function b(e){return RegExp(e.toString()+"|").exec("").length-1}
|
||||
const m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./
|
||||
;function E(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n
|
||||
;let i=g(e),r="";for(;i.length>0;){const e=m.exec(i);if(!e){r+=i;break}
|
||||
r+=i.substring(0,e.index),
|
||||
i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+t):(r+=e[0],
|
||||
"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)}
|
||||
const x="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",O="\\b(0b[01]+)",v={
|
||||
begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'",
|
||||
illegal:"\\n",contains:[v]},k={scope:"string",begin:'"',end:'"',illegal:"\\n",
|
||||
contains:[v]},M=(e,t,n={})=>{const i=r({scope:"comment",begin:e,end:t,
|
||||
contains:[]},n);i.contains.push({scope:"doctag",
|
||||
begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
|
||||
end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0})
|
||||
;const s=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/)
|
||||
;return i.contains.push({begin:p(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i
|
||||
},S=M("//","$"),R=M("/\\*","\\*/"),j=M("#","$");var A=Object.freeze({
|
||||
__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:x,UNDERSCORE_IDENT_RE:w,
|
||||
NUMBER_RE:y,C_NUMBER_RE:_,BINARY_NUMBER_RE:O,
|
||||
RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
|
||||
SHEBANG:(e={})=>{const t=/^#![ ]*\//
|
||||
;return e.binary&&(e.begin=p(t,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:t,
|
||||
end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},
|
||||
BACKSLASH_ESCAPE:v,APOS_STRING_MODE:N,QUOTE_STRING_MODE:k,PHRASAL_WORDS_MODE:{
|
||||
begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
||||
},COMMENT:M,C_LINE_COMMENT_MODE:S,C_BLOCK_COMMENT_MODE:R,HASH_COMMENT_MODE:j,
|
||||
NUMBER_MODE:{scope:"number",begin:y,relevance:0},C_NUMBER_MODE:{scope:"number",
|
||||
begin:_,relevance:0},BINARY_NUMBER_MODE:{scope:"number",begin:O,relevance:0},
|
||||
REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,
|
||||
end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,
|
||||
contains:[v]}]}]},TITLE_MODE:{scope:"title",begin:x,relevance:0},
|
||||
UNDERSCORE_TITLE_MODE:{scope:"title",begin:w,relevance:0},METHOD_GUARD:{
|
||||
begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{
|
||||
"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{
|
||||
t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function I(e,t){
|
||||
"."===e.input[e.index-1]&&t.ignoreMatch()}function T(e,t){
|
||||
void 0!==e.className&&(e.scope=e.className,delete e.className)}function L(e,t){
|
||||
t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",
|
||||
e.__beforeBegin=I,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,
|
||||
void 0===e.relevance&&(e.relevance=0))}function B(e,t){
|
||||
Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function D(e,t){
|
||||
if(e.match){
|
||||
if(e.begin||e.end)throw Error("begin & end are not supported with match")
|
||||
;e.begin=e.match,delete e.match}}function H(e,t){
|
||||
void 0===e.relevance&&(e.relevance=1)}const P=(e,t)=>{if(!e.beforeMatch)return
|
||||
;if(e.starts)throw Error("beforeMatch cannot be used with starts")
|
||||
;const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]
|
||||
})),e.keywords=n.keywords,e.begin=p(n.beforeMatch,d(n.begin)),e.starts={
|
||||
relevance:0,contains:[Object.assign(n,{endsParent:!0})]
|
||||
},e.relevance=0,delete n.beforeMatch
|
||||
},C=["of","and","for","in","not","or","if","then","parent","list","value"]
|
||||
;function $(e,t,n="keyword"){const i=Object.create(null)
|
||||
;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{
|
||||
Object.assign(i,$(e[n],t,n))})),i;function r(e,n){
|
||||
t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|")
|
||||
;i[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){
|
||||
return t?Number(t):(e=>C.includes(e.toLowerCase()))(e)?0:1}const z={},K=e=>{
|
||||
console.error(e)},W=(e,...t)=>{console.log("WARN: "+e,...t)},X=(e,t)=>{
|
||||
z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),z[`${e}/${t}`]=!0)
|
||||
},G=Error();function Z(e,t,{key:n}){let i=0;const r=e[n],s={},o={}
|
||||
;for(let e=1;e<=t.length;e++)o[e+i]=r[e],s[e+i]=!0,i+=b(t[e-1])
|
||||
;e[n]=o,e[n]._emit=s,e[n]._multi=!0}function F(e){(e=>{
|
||||
e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,
|
||||
delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={
|
||||
_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope
|
||||
}),(e=>{if(Array.isArray(e.begin)){
|
||||
if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
|
||||
G
|
||||
;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"),
|
||||
G;Z(e,e.begin,{key:"beginScope"}),e.begin=E(e.begin,{joinWith:""})}})(e),(e=>{
|
||||
if(Array.isArray(e.end)){
|
||||
if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
|
||||
G
|
||||
;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"),
|
||||
G;Z(e,e.end,{key:"endScope"}),e.end=E(e.end,{joinWith:""})}})(e)}function V(e){
|
||||
function t(t,n){
|
||||
return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))
|
||||
}class n{constructor(){
|
||||
this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}
|
||||
addRule(e,t){
|
||||
t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),
|
||||
this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null)
|
||||
;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(E(e,{joinWith:"|"
|
||||
}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex
|
||||
;const t=this.matcherRe.exec(e);if(!t)return null
|
||||
;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n]
|
||||
;return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){
|
||||
this.rules=[],this.multiRegexes=[],
|
||||
this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
|
||||
if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n
|
||||
;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),
|
||||
t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){
|
||||
return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){
|
||||
this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){
|
||||
const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex
|
||||
;let n=t.exec(e)
|
||||
;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{
|
||||
const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}
|
||||
return n&&(this.regexIndex+=n.position+1,
|
||||
this.regexIndex===this.count&&this.considerAll()),n}}
|
||||
if(e.compilerExtensions||(e.compilerExtensions=[]),
|
||||
e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
|
||||
;return e.classNameAliases=r(e.classNameAliases||{}),function n(s,o){const a=s
|
||||
;if(s.isCompiled)return a
|
||||
;[T,D,F,P].forEach((e=>e(s,o))),e.compilerExtensions.forEach((e=>e(s,o))),
|
||||
s.__beforeBegin=null,[L,B,H].forEach((e=>e(s,o))),s.isCompiled=!0;let c=null
|
||||
;return"object"==typeof s.keywords&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),
|
||||
c=s.keywords.$pattern,
|
||||
delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=$(s.keywords,e.case_insensitive)),
|
||||
a.keywordPatternRe=t(c,!0),
|
||||
o&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),
|
||||
s.end&&(a.endRe=t(a.end)),
|
||||
a.terminatorEnd=g(a.end)||"",s.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)),
|
||||
s.illegal&&(a.illegalRe=t(s.illegal)),
|
||||
s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>r(e,{
|
||||
variants:null},t)))),e.cachedVariants?e.cachedVariants:q(e)?r(e,{
|
||||
starts:e.starts?r(e.starts):null
|
||||
}):Object.isFrozen(e)?r(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{n(e,a)
|
||||
})),s.starts&&n(s.starts,o),a.matcher=(e=>{const t=new i
|
||||
;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"
|
||||
}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"
|
||||
}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function q(e){
|
||||
return!!e&&(e.endsWithParent||q(e.starts))}class J extends Error{
|
||||
constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}
|
||||
const Y=i,Q=r,ee=Symbol("nomatch");var te=(t=>{
|
||||
const i=Object.create(null),r=Object.create(null),s=[];let o=!0
|
||||
;const a="Could not find the language '{}', did you forget to load/include a language module?",c={
|
||||
disableAutodetect:!0,name:"Plain text",contains:[]};let g={
|
||||
ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,
|
||||
languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",
|
||||
cssSelector:"pre code",languages:null,__emitter:l};function b(e){
|
||||
return g.noHighlightRe.test(e)}function m(e,t,n){let i="",r=""
|
||||
;"object"==typeof t?(i=e,
|
||||
n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."),
|
||||
X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),
|
||||
r=e,i=t),void 0===n&&(n=!0);const s={code:i,language:r};k("before:highlight",s)
|
||||
;const o=s.result?s.result:E(s.language,s.code,n)
|
||||
;return o.code=s.code,k("after:highlight",o),o}function E(e,t,r,s){
|
||||
const c=Object.create(null);function l(){if(!N.keywords)return void M.addText(S)
|
||||
;let e=0;N.keywordPatternRe.lastIndex=0;let t=N.keywordPatternRe.exec(S),n=""
|
||||
;for(;t;){n+=S.substring(e,t.index)
|
||||
;const r=y.case_insensitive?t[0].toLowerCase():t[0],s=(i=r,N.keywords[i]);if(s){
|
||||
const[e,i]=s
|
||||
;if(M.addText(n),n="",c[r]=(c[r]||0)+1,c[r]<=7&&(R+=i),e.startsWith("_"))n+=t[0];else{
|
||||
const n=y.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0]
|
||||
;e=N.keywordPatternRe.lastIndex,t=N.keywordPatternRe.exec(S)}var i
|
||||
;n+=S.substring(e),M.addText(n)}function d(){null!=N.subLanguage?(()=>{
|
||||
if(""===S)return;let e=null;if("string"==typeof N.subLanguage){
|
||||
if(!i[N.subLanguage])return void M.addText(S)
|
||||
;e=E(N.subLanguage,S,!0,k[N.subLanguage]),k[N.subLanguage]=e._top
|
||||
}else e=x(S,N.subLanguage.length?N.subLanguage:null)
|
||||
;N.relevance>0&&(R+=e.relevance),M.addSublanguage(e._emitter,e.language)
|
||||
})():l(),S=""}function u(e,t){let n=1;const i=t.length-1;for(;n<=i;){
|
||||
if(!e._emit[n]){n++;continue}const i=y.classNameAliases[e[n]]||e[n],r=t[n]
|
||||
;i?M.addKeyword(r,i):(S=r,l(),S=""),n++}}function h(e,t){
|
||||
return e.scope&&"string"==typeof e.scope&&M.openNode(y.classNameAliases[e.scope]||e.scope),
|
||||
e.beginScope&&(e.beginScope._wrap?(M.addKeyword(S,y.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),
|
||||
S=""):e.beginScope._multi&&(u(e.beginScope,t),S="")),N=Object.create(e,{parent:{
|
||||
value:N}}),N}function p(e,t,i){let r=((e,t)=>{const n=e&&e.exec(t)
|
||||
;return n&&0===n.index})(e.endRe,i);if(r){if(e["on:end"]){const i=new n(e)
|
||||
;e["on:end"](t,i),i.isMatchIgnored&&(r=!1)}if(r){
|
||||
for(;e.endsParent&&e.parent;)e=e.parent;return e}}
|
||||
if(e.endsWithParent)return p(e.parent,t,i)}function f(e){
|
||||
return 0===N.matcher.regexIndex?(S+=e[0],1):(I=!0,0)}function b(e){
|
||||
const n=e[0],i=t.substring(e.index),r=p(N,e,i);if(!r)return ee;const s=N
|
||||
;N.endScope&&N.endScope._wrap?(d(),
|
||||
M.addKeyword(n,N.endScope._wrap)):N.endScope&&N.endScope._multi?(d(),
|
||||
u(N.endScope,e)):s.skip?S+=n:(s.returnEnd||s.excludeEnd||(S+=n),
|
||||
d(),s.excludeEnd&&(S=n));do{
|
||||
N.scope&&M.closeNode(),N.skip||N.subLanguage||(R+=N.relevance),N=N.parent
|
||||
}while(N!==r.parent);return r.starts&&h(r.starts,e),s.returnEnd?0:n.length}
|
||||
let m={};function w(i,s){const a=s&&s[0];if(S+=i,null==a)return d(),0
|
||||
;if("begin"===m.type&&"end"===s.type&&m.index===s.index&&""===a){
|
||||
if(S+=t.slice(s.index,s.index+1),!o){const t=Error(`0 width match regex (${e})`)
|
||||
;throw t.languageName=e,t.badRule=m.rule,t}return 1}
|
||||
if(m=s,"begin"===s.type)return(e=>{
|
||||
const t=e[0],i=e.rule,r=new n(i),s=[i.__beforeBegin,i["on:begin"]]
|
||||
;for(const n of s)if(n&&(n(e,r),r.isMatchIgnored))return f(t)
|
||||
;return i.skip?S+=t:(i.excludeBegin&&(S+=t),
|
||||
d(),i.returnBegin||i.excludeBegin||(S=t)),h(i,e),i.returnBegin?0:t.length})(s)
|
||||
;if("illegal"===s.type&&!r){
|
||||
const e=Error('Illegal lexeme "'+a+'" for mode "'+(N.scope||"<unnamed>")+'"')
|
||||
;throw e.mode=N,e}if("end"===s.type){const e=b(s);if(e!==ee)return e}
|
||||
if("illegal"===s.type&&""===a)return 1
|
||||
;if(A>1e5&&A>3*s.index)throw Error("potential infinite loop, way more iterations than matches")
|
||||
;return S+=a,a.length}const y=O(e)
|
||||
;if(!y)throw K(a.replace("{}",e)),Error('Unknown language: "'+e+'"')
|
||||
;const _=V(y);let v="",N=s||_;const k={},M=new g.__emitter(g);(()=>{const e=[]
|
||||
;for(let t=N;t!==y;t=t.parent)t.scope&&e.unshift(t.scope)
|
||||
;e.forEach((e=>M.openNode(e)))})();let S="",R=0,j=0,A=0,I=!1;try{
|
||||
for(N.matcher.considerAll();;){
|
||||
A++,I?I=!1:N.matcher.considerAll(),N.matcher.lastIndex=j
|
||||
;const e=N.matcher.exec(t);if(!e)break;const n=w(t.substring(j,e.index),e)
|
||||
;j=e.index+n}
|
||||
return w(t.substring(j)),M.closeAllNodes(),M.finalize(),v=M.toHTML(),{
|
||||
language:e,value:v,relevance:R,illegal:!1,_emitter:M,_top:N}}catch(n){
|
||||
if(n.message&&n.message.includes("Illegal"))return{language:e,value:Y(t),
|
||||
illegal:!0,relevance:0,_illegalBy:{message:n.message,index:j,
|
||||
context:t.slice(j-100,j+100),mode:n.mode,resultSoFar:v},_emitter:M};if(o)return{
|
||||
language:e,value:Y(t),illegal:!1,relevance:0,errorRaised:n,_emitter:M,_top:N}
|
||||
;throw n}}function x(e,t){t=t||g.languages||Object.keys(i);const n=(e=>{
|
||||
const t={value:Y(e),illegal:!1,relevance:0,_top:c,_emitter:new g.__emitter(g)}
|
||||
;return t._emitter.addText(e),t})(e),r=t.filter(O).filter(N).map((t=>E(t,e,!1)))
|
||||
;r.unshift(n);const s=r.sort(((e,t)=>{
|
||||
if(e.relevance!==t.relevance)return t.relevance-e.relevance
|
||||
;if(e.language&&t.language){if(O(e.language).supersetOf===t.language)return 1
|
||||
;if(O(t.language).supersetOf===e.language)return-1}return 0})),[o,a]=s,l=o
|
||||
;return l.secondBest=a,l}function w(e){let t=null;const n=(e=>{
|
||||
let t=e.className+" ";t+=e.parentNode?e.parentNode.className:""
|
||||
;const n=g.languageDetectRe.exec(t);if(n){const t=O(n[1])
|
||||
;return t||(W(a.replace("{}",n[1])),
|
||||
W("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}
|
||||
return t.split(/\s+/).find((e=>b(e)||O(e)))})(e);if(b(n))return
|
||||
;if(k("before:highlightElement",{el:e,language:n
|
||||
}),e.children.length>0&&(g.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),
|
||||
console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),
|
||||
console.warn("The element with unescaped HTML:"),
|
||||
console.warn(e)),g.throwUnescapedHTML))throw new J("One of your code blocks includes unescaped HTML.",e.innerHTML)
|
||||
;t=e;const i=t.textContent,s=n?m(i,{language:n,ignoreIllegals:!0}):x(i)
|
||||
;e.innerHTML=s.value,((e,t,n)=>{const i=t&&r[t]||n
|
||||
;e.classList.add("hljs"),e.classList.add("language-"+i)
|
||||
})(e,n,s.language),e.result={language:s.language,re:s.relevance,
|
||||
relevance:s.relevance},s.secondBest&&(e.secondBest={
|
||||
language:s.secondBest.language,relevance:s.secondBest.relevance
|
||||
}),k("after:highlightElement",{el:e,result:s,text:i})}let y=!1;function _(){
|
||||
"loading"!==document.readyState?document.querySelectorAll(g.cssSelector).forEach(w):y=!0
|
||||
}function O(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]}
|
||||
function v(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{
|
||||
r[e.toLowerCase()]=t}))}function N(e){const t=O(e)
|
||||
;return t&&!t.disableAutodetect}function k(e,t){const n=e;s.forEach((e=>{
|
||||
e[n]&&e[n](t)}))}
|
||||
"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{
|
||||
y&&_()}),!1),Object.assign(t,{highlight:m,highlightAuto:x,highlightAll:_,
|
||||
highlightElement:w,
|
||||
highlightBlock:e=>(X("10.7.0","highlightBlock will be removed entirely in v12.0"),
|
||||
X("10.7.0","Please use highlightElement now."),w(e)),configure:e=>{g=Q(g,e)},
|
||||
initHighlighting:()=>{
|
||||
_(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},
|
||||
initHighlightingOnLoad:()=>{
|
||||
_(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")
|
||||
},registerLanguage:(e,n)=>{let r=null;try{r=n(t)}catch(t){
|
||||
if(K("Language definition for '{}' could not be registered.".replace("{}",e)),
|
||||
!o)throw t;K(t),r=c}
|
||||
r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&v(r.aliases,{
|
||||
languageName:e})},unregisterLanguage:e=>{delete i[e]
|
||||
;for(const t of Object.keys(r))r[t]===e&&delete r[t]},
|
||||
listLanguages:()=>Object.keys(i),getLanguage:O,registerAliases:v,
|
||||
autoDetection:N,inherit:Q,addPlugin:e=>{(e=>{
|
||||
e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{
|
||||
e["before:highlightBlock"](Object.assign({block:t.el},t))
|
||||
}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{
|
||||
e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)}
|
||||
}),t.debugMode=()=>{o=!1},t.safeMode=()=>{o=!0
|
||||
},t.versionString="11.7.0",t.regex={concat:p,lookahead:d,either:f,optional:h,
|
||||
anyNumberOfTimes:u};for(const t in A)"object"==typeof A[t]&&e.exports(A[t])
|
||||
;return Object.assign(t,A),t})({});return te}()
|
||||
;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `bash` grammar compiled for Highlight.js 11.7.0 */
|
||||
(()=>{var e=(()=>{"use strict";return e=>{const s=e.regex,t={},n={begin:/\$\{/,
|
||||
end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{
|
||||
className:"variable",variants:[{
|
||||
begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={
|
||||
className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={
|
||||
begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,
|
||||
end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,
|
||||
contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(c);const o={begin:/\$?\(\(/,
|
||||
end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]
|
||||
},r=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10
|
||||
}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,
|
||||
contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{
|
||||
name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,
|
||||
keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],
|
||||
literal:["true","false"],
|
||||
built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]
|
||||
},contains:[r,e.SHEBANG(),l,o,e.HASH_COMMENT_MODE,i,{match:/(\/[a-z._-]+)+/},c,{
|
||||
className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},t]}}})()
|
||||
;hljs.registerLanguage("bash",e)})();/*! `shell` grammar compiled for Highlight.js 11.7.0 */
|
||||
(()=>{var s=(()=>{"use strict";return s=>({name:"Shell Session",
|
||||
aliases:["console","shellsession"],contains:[{className:"meta.prompt",
|
||||
begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,
|
||||
subLanguage:"bash"}}]})})();hljs.registerLanguage("shell",s)})();/*! `nix` grammar compiled for Highlight.js 11.7.0 */
|
||||
(()=>{var e=(()=>{"use strict";return e=>{const n={
|
||||
keyword:["rec","with","let","in","inherit","assert","if","else","then"],
|
||||
literal:["true","false","or","and","null"],
|
||||
built_in:["import","abort","baseNameOf","dirOf","isNull","builtins","map","removeAttrs","throw","toString","derivation"]
|
||||
},s={className:"subst",begin:/\$\{/,end:/\}/,keywords:n},a={className:"string",
|
||||
contains:[{className:"char.escape",begin:/''\$/},s],variants:[{begin:"''",
|
||||
end:"''"},{begin:'"',end:'"'}]
|
||||
},i=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{
|
||||
begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{
|
||||
className:"attr",begin:/\S+/,relevance:.2}]}];return s.contains=i,{name:"Nix",
|
||||
aliases:["nixos"],keywords:n,contains:i}}})();hljs.registerLanguage("nix",e)
|
||||
})();
|
29
highlightjs/LICENSE
Normal file
|
@ -0,0 +1,29 @@
|
|||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2006, Ivan Sagalaev.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
8
highlightjs/highlight-style.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
pre {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
pre code.hljs {
|
||||
border: none;
|
||||
margin: 0;
|
||||
}
|
345
highlightjs/highlight.pack.js
Normal file
|
@ -0,0 +1,345 @@
|
|||
/*!
|
||||
Highlight.js v11.9.0 (git: b7ec4bfafc)
|
||||
(c) 2006-2023 undefined and other contributors
|
||||
License: BSD-3-Clause
|
||||
*/
|
||||
var hljs=function(){"use strict";function e(t){
|
||||
return t instanceof Map?t.clear=t.delete=t.set=()=>{
|
||||
throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{
|
||||
throw Error("set is read-only")
|
||||
}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{
|
||||
const i=t[n],s=typeof i;"object"!==s&&"function"!==s||Object.isFrozen(i)||e(i)
|
||||
})),t}class t{constructor(e){
|
||||
void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}
|
||||
ignoreMatch(){this.isMatchIgnored=!0}}function n(e){
|
||||
return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")
|
||||
}function i(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t]
|
||||
;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const s=e=>!!e.scope
|
||||
;class o{constructor(e,t){
|
||||
this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){
|
||||
this.buffer+=n(e)}openNode(e){if(!s(e))return;const t=((e,{prefix:t})=>{
|
||||
if(e.startsWith("language:"))return e.replace("language:","language-")
|
||||
;if(e.includes(".")){const n=e.split(".")
|
||||
;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")
|
||||
}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}
|
||||
closeNode(e){s(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){
|
||||
this.buffer+=`<span class="${e}">`}}const r=(e={})=>{const t={children:[]}
|
||||
;return Object.assign(t,e),t};class a{constructor(){
|
||||
this.rootNode=r(),this.stack=[this.rootNode]}get top(){
|
||||
return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
|
||||
this.top.children.push(e)}openNode(e){const t=r({scope:e})
|
||||
;this.add(t),this.stack.push(t)}closeNode(){
|
||||
if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
|
||||
for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
|
||||
walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){
|
||||
return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),
|
||||
t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){
|
||||
"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
|
||||
a._collapse(e)})))}}class c extends a{constructor(e){super(),this.options=e}
|
||||
addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){
|
||||
this.closeNode()}__addSublanguage(e,t){const n=e.root
|
||||
;t&&(n.scope="language:"+t),this.add(n)}toHTML(){
|
||||
return new o(this,this.options).value()}finalize(){
|
||||
return this.closeAllNodes(),!0}}function l(e){
|
||||
return e?"string"==typeof e?e:e.source:null}function g(e){return h("(?=",e,")")}
|
||||
function u(e){return h("(?:",e,")*")}function d(e){return h("(?:",e,")?")}
|
||||
function h(...e){return e.map((e=>l(e))).join("")}function f(...e){const t=(e=>{
|
||||
const t=e[e.length-1]
|
||||
;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}
|
||||
})(e);return"("+(t.capture?"":"?:")+e.map((e=>l(e))).join("|")+")"}
|
||||
function p(e){return RegExp(e.toString()+"|").exec("").length-1}
|
||||
const b=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./
|
||||
;function m(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n
|
||||
;let i=l(e),s="";for(;i.length>0;){const e=b.exec(i);if(!e){s+=i;break}
|
||||
s+=i.substring(0,e.index),
|
||||
i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?s+="\\"+(Number(e[1])+t):(s+=e[0],
|
||||
"("===e[0]&&n++)}return s})).map((e=>`(${e})`)).join(t)}
|
||||
const E="[a-zA-Z]\\w*",x="[a-zA-Z_]\\w*",w="\\b\\d+(\\.\\d+)?",y="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",_="\\b(0b[01]+)",O={
|
||||
begin:"\\\\[\\s\\S]",relevance:0},v={scope:"string",begin:"'",end:"'",
|
||||
illegal:"\\n",contains:[O]},k={scope:"string",begin:'"',end:'"',illegal:"\\n",
|
||||
contains:[O]},N=(e,t,n={})=>{const s=i({scope:"comment",begin:e,end:t,
|
||||
contains:[]},n);s.contains.push({scope:"doctag",
|
||||
begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
|
||||
end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0})
|
||||
;const o=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/)
|
||||
;return s.contains.push({begin:h(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s
|
||||
},S=N("//","$"),M=N("/\\*","\\*/"),R=N("#","$");var j=Object.freeze({
|
||||
__proto__:null,APOS_STRING_MODE:v,BACKSLASH_ESCAPE:O,BINARY_NUMBER_MODE:{
|
||||
scope:"number",begin:_,relevance:0},BINARY_NUMBER_RE:_,COMMENT:N,
|
||||
C_BLOCK_COMMENT_MODE:M,C_LINE_COMMENT_MODE:S,C_NUMBER_MODE:{scope:"number",
|
||||
begin:y,relevance:0},C_NUMBER_RE:y,END_SAME_AS_BEGIN:e=>Object.assign(e,{
|
||||
"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{
|
||||
t.data._beginMatch!==e[1]&&t.ignoreMatch()}}),HASH_COMMENT_MODE:R,IDENT_RE:E,
|
||||
MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+x,relevance:0},
|
||||
NUMBER_MODE:{scope:"number",begin:w,relevance:0},NUMBER_RE:w,
|
||||
PHRASAL_WORDS_MODE:{
|
||||
begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
||||
},QUOTE_STRING_MODE:k,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/,
|
||||
end:/\/[gimuy]*/,contains:[O,{begin:/\[/,end:/\]/,relevance:0,contains:[O]}]},
|
||||
RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
|
||||
SHEBANG:(e={})=>{const t=/^#![ ]*\//
|
||||
;return e.binary&&(e.begin=h(t,/.*\b/,e.binary,/\b.*/)),i({scope:"meta",begin:t,
|
||||
end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},
|
||||
TITLE_MODE:{scope:"title",begin:E,relevance:0},UNDERSCORE_IDENT_RE:x,
|
||||
UNDERSCORE_TITLE_MODE:{scope:"title",begin:x,relevance:0}});function A(e,t){
|
||||
"."===e.input[e.index-1]&&t.ignoreMatch()}function I(e,t){
|
||||
void 0!==e.className&&(e.scope=e.className,delete e.className)}function T(e,t){
|
||||
t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",
|
||||
e.__beforeBegin=A,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,
|
||||
void 0===e.relevance&&(e.relevance=0))}function L(e,t){
|
||||
Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function B(e,t){
|
||||
if(e.match){
|
||||
if(e.begin||e.end)throw Error("begin & end are not supported with match")
|
||||
;e.begin=e.match,delete e.match}}function P(e,t){
|
||||
void 0===e.relevance&&(e.relevance=1)}const D=(e,t)=>{if(!e.beforeMatch)return
|
||||
;if(e.starts)throw Error("beforeMatch cannot be used with starts")
|
||||
;const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]
|
||||
})),e.keywords=n.keywords,e.begin=h(n.beforeMatch,g(n.begin)),e.starts={
|
||||
relevance:0,contains:[Object.assign(n,{endsParent:!0})]
|
||||
},e.relevance=0,delete n.beforeMatch
|
||||
},H=["of","and","for","in","not","or","if","then","parent","list","value"],C="keyword"
|
||||
;function $(e,t,n=C){const i=Object.create(null)
|
||||
;return"string"==typeof e?s(n,e.split(" ")):Array.isArray(e)?s(n,e):Object.keys(e).forEach((n=>{
|
||||
Object.assign(i,$(e[n],t,n))})),i;function s(e,n){
|
||||
t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|")
|
||||
;i[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){
|
||||
return t?Number(t):(e=>H.includes(e.toLowerCase()))(e)?0:1}const z={},W=e=>{
|
||||
console.error(e)},X=(e,...t)=>{console.log("WARN: "+e,...t)},G=(e,t)=>{
|
||||
z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),z[`${e}/${t}`]=!0)
|
||||
},K=Error();function F(e,t,{key:n}){let i=0;const s=e[n],o={},r={}
|
||||
;for(let e=1;e<=t.length;e++)r[e+i]=s[e],o[e+i]=!0,i+=p(t[e-1])
|
||||
;e[n]=r,e[n]._emit=o,e[n]._multi=!0}function Z(e){(e=>{
|
||||
e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,
|
||||
delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={
|
||||
_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope
|
||||
}),(e=>{if(Array.isArray(e.begin)){
|
||||
if(e.skip||e.excludeBegin||e.returnBegin)throw W("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
|
||||
K
|
||||
;if("object"!=typeof e.beginScope||null===e.beginScope)throw W("beginScope must be object"),
|
||||
K;F(e,e.begin,{key:"beginScope"}),e.begin=m(e.begin,{joinWith:""})}})(e),(e=>{
|
||||
if(Array.isArray(e.end)){
|
||||
if(e.skip||e.excludeEnd||e.returnEnd)throw W("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
|
||||
K
|
||||
;if("object"!=typeof e.endScope||null===e.endScope)throw W("endScope must be object"),
|
||||
K;F(e,e.end,{key:"endScope"}),e.end=m(e.end,{joinWith:""})}})(e)}function V(e){
|
||||
function t(t,n){
|
||||
return RegExp(l(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))
|
||||
}class n{constructor(){
|
||||
this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}
|
||||
addRule(e,t){
|
||||
t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),
|
||||
this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null)
|
||||
;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(m(e,{joinWith:"|"
|
||||
}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex
|
||||
;const t=this.matcherRe.exec(e);if(!t)return null
|
||||
;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n]
|
||||
;return t.splice(0,n),Object.assign(t,i)}}class s{constructor(){
|
||||
this.rules=[],this.multiRegexes=[],
|
||||
this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
|
||||
if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n
|
||||
;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),
|
||||
t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){
|
||||
return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){
|
||||
this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){
|
||||
const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex
|
||||
;let n=t.exec(e)
|
||||
;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{
|
||||
const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}
|
||||
return n&&(this.regexIndex+=n.position+1,
|
||||
this.regexIndex===this.count&&this.considerAll()),n}}
|
||||
if(e.compilerExtensions||(e.compilerExtensions=[]),
|
||||
e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
|
||||
;return e.classNameAliases=i(e.classNameAliases||{}),function n(o,r){const a=o
|
||||
;if(o.isCompiled)return a
|
||||
;[I,B,Z,D].forEach((e=>e(o,r))),e.compilerExtensions.forEach((e=>e(o,r))),
|
||||
o.__beforeBegin=null,[T,L,P].forEach((e=>e(o,r))),o.isCompiled=!0;let c=null
|
||||
;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),
|
||||
c=o.keywords.$pattern,
|
||||
delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=$(o.keywords,e.case_insensitive)),
|
||||
a.keywordPatternRe=t(c,!0),
|
||||
r&&(o.begin||(o.begin=/\B|\b/),a.beginRe=t(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),
|
||||
o.end&&(a.endRe=t(a.end)),
|
||||
a.terminatorEnd=l(a.end)||"",o.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),
|
||||
o.illegal&&(a.illegalRe=t(o.illegal)),
|
||||
o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>i(e,{
|
||||
variants:null},t)))),e.cachedVariants?e.cachedVariants:q(e)?i(e,{
|
||||
starts:e.starts?i(e.starts):null
|
||||
}):Object.isFrozen(e)?i(e):e))("self"===e?o:e)))),o.contains.forEach((e=>{n(e,a)
|
||||
})),o.starts&&n(o.starts,r),a.matcher=(e=>{const t=new s
|
||||
;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"
|
||||
}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"
|
||||
}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function q(e){
|
||||
return!!e&&(e.endsWithParent||q(e.starts))}class J extends Error{
|
||||
constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}
|
||||
const Y=n,Q=i,ee=Symbol("nomatch"),te=n=>{
|
||||
const i=Object.create(null),s=Object.create(null),o=[];let r=!0
|
||||
;const a="Could not find the language '{}', did you forget to load/include a language module?",l={
|
||||
disableAutodetect:!0,name:"Plain text",contains:[]};let p={
|
||||
ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,
|
||||
languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",
|
||||
cssSelector:"pre code",languages:null,__emitter:c};function b(e){
|
||||
return p.noHighlightRe.test(e)}function m(e,t,n){let i="",s=""
|
||||
;"object"==typeof t?(i=e,
|
||||
n=t.ignoreIllegals,s=t.language):(G("10.7.0","highlight(lang, code, ...args) has been deprecated."),
|
||||
G("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),
|
||||
s=e,i=t),void 0===n&&(n=!0);const o={code:i,language:s};N("before:highlight",o)
|
||||
;const r=o.result?o.result:E(o.language,o.code,n)
|
||||
;return r.code=o.code,N("after:highlight",r),r}function E(e,n,s,o){
|
||||
const c=Object.create(null);function l(){if(!N.keywords)return void M.addText(R)
|
||||
;let e=0;N.keywordPatternRe.lastIndex=0;let t=N.keywordPatternRe.exec(R),n=""
|
||||
;for(;t;){n+=R.substring(e,t.index)
|
||||
;const s=_.case_insensitive?t[0].toLowerCase():t[0],o=(i=s,N.keywords[i]);if(o){
|
||||
const[e,i]=o
|
||||
;if(M.addText(n),n="",c[s]=(c[s]||0)+1,c[s]<=7&&(j+=i),e.startsWith("_"))n+=t[0];else{
|
||||
const n=_.classNameAliases[e]||e;u(t[0],n)}}else n+=t[0]
|
||||
;e=N.keywordPatternRe.lastIndex,t=N.keywordPatternRe.exec(R)}var i
|
||||
;n+=R.substring(e),M.addText(n)}function g(){null!=N.subLanguage?(()=>{
|
||||
if(""===R)return;let e=null;if("string"==typeof N.subLanguage){
|
||||
if(!i[N.subLanguage])return void M.addText(R)
|
||||
;e=E(N.subLanguage,R,!0,S[N.subLanguage]),S[N.subLanguage]=e._top
|
||||
}else e=x(R,N.subLanguage.length?N.subLanguage:null)
|
||||
;N.relevance>0&&(j+=e.relevance),M.__addSublanguage(e._emitter,e.language)
|
||||
})():l(),R=""}function u(e,t){
|
||||
""!==e&&(M.startScope(t),M.addText(e),M.endScope())}function d(e,t){let n=1
|
||||
;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}
|
||||
const i=_.classNameAliases[e[n]]||e[n],s=t[n];i?u(s,i):(R=s,l(),R=""),n++}}
|
||||
function h(e,t){
|
||||
return e.scope&&"string"==typeof e.scope&&M.openNode(_.classNameAliases[e.scope]||e.scope),
|
||||
e.beginScope&&(e.beginScope._wrap?(u(R,_.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),
|
||||
R=""):e.beginScope._multi&&(d(e.beginScope,t),R="")),N=Object.create(e,{parent:{
|
||||
value:N}}),N}function f(e,n,i){let s=((e,t)=>{const n=e&&e.exec(t)
|
||||
;return n&&0===n.index})(e.endRe,i);if(s){if(e["on:end"]){const i=new t(e)
|
||||
;e["on:end"](n,i),i.isMatchIgnored&&(s=!1)}if(s){
|
||||
for(;e.endsParent&&e.parent;)e=e.parent;return e}}
|
||||
if(e.endsWithParent)return f(e.parent,n,i)}function b(e){
|
||||
return 0===N.matcher.regexIndex?(R+=e[0],1):(T=!0,0)}function m(e){
|
||||
const t=e[0],i=n.substring(e.index),s=f(N,e,i);if(!s)return ee;const o=N
|
||||
;N.endScope&&N.endScope._wrap?(g(),
|
||||
u(t,N.endScope._wrap)):N.endScope&&N.endScope._multi?(g(),
|
||||
d(N.endScope,e)):o.skip?R+=t:(o.returnEnd||o.excludeEnd||(R+=t),
|
||||
g(),o.excludeEnd&&(R=t));do{
|
||||
N.scope&&M.closeNode(),N.skip||N.subLanguage||(j+=N.relevance),N=N.parent
|
||||
}while(N!==s.parent);return s.starts&&h(s.starts,e),o.returnEnd?0:t.length}
|
||||
let w={};function y(i,o){const a=o&&o[0];if(R+=i,null==a)return g(),0
|
||||
;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===a){
|
||||
if(R+=n.slice(o.index,o.index+1),!r){const t=Error(`0 width match regex (${e})`)
|
||||
;throw t.languageName=e,t.badRule=w.rule,t}return 1}
|
||||
if(w=o,"begin"===o.type)return(e=>{
|
||||
const n=e[0],i=e.rule,s=new t(i),o=[i.__beforeBegin,i["on:begin"]]
|
||||
;for(const t of o)if(t&&(t(e,s),s.isMatchIgnored))return b(n)
|
||||
;return i.skip?R+=n:(i.excludeBegin&&(R+=n),
|
||||
g(),i.returnBegin||i.excludeBegin||(R=n)),h(i,e),i.returnBegin?0:n.length})(o)
|
||||
;if("illegal"===o.type&&!s){
|
||||
const e=Error('Illegal lexeme "'+a+'" for mode "'+(N.scope||"<unnamed>")+'"')
|
||||
;throw e.mode=N,e}if("end"===o.type){const e=m(o);if(e!==ee)return e}
|
||||
if("illegal"===o.type&&""===a)return 1
|
||||
;if(I>1e5&&I>3*o.index)throw Error("potential infinite loop, way more iterations than matches")
|
||||
;return R+=a,a.length}const _=O(e)
|
||||
;if(!_)throw W(a.replace("{}",e)),Error('Unknown language: "'+e+'"')
|
||||
;const v=V(_);let k="",N=o||v;const S={},M=new p.__emitter(p);(()=>{const e=[]
|
||||
;for(let t=N;t!==_;t=t.parent)t.scope&&e.unshift(t.scope)
|
||||
;e.forEach((e=>M.openNode(e)))})();let R="",j=0,A=0,I=0,T=!1;try{
|
||||
if(_.__emitTokens)_.__emitTokens(n,M);else{for(N.matcher.considerAll();;){
|
||||
I++,T?T=!1:N.matcher.considerAll(),N.matcher.lastIndex=A
|
||||
;const e=N.matcher.exec(n);if(!e)break;const t=y(n.substring(A,e.index),e)
|
||||
;A=e.index+t}y(n.substring(A))}return M.finalize(),k=M.toHTML(),{language:e,
|
||||
value:k,relevance:j,illegal:!1,_emitter:M,_top:N}}catch(t){
|
||||
if(t.message&&t.message.includes("Illegal"))return{language:e,value:Y(n),
|
||||
illegal:!0,relevance:0,_illegalBy:{message:t.message,index:A,
|
||||
context:n.slice(A-100,A+100),mode:t.mode,resultSoFar:k},_emitter:M};if(r)return{
|
||||
language:e,value:Y(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:N}
|
||||
;throw t}}function x(e,t){t=t||p.languages||Object.keys(i);const n=(e=>{
|
||||
const t={value:Y(e),illegal:!1,relevance:0,_top:l,_emitter:new p.__emitter(p)}
|
||||
;return t._emitter.addText(e),t})(e),s=t.filter(O).filter(k).map((t=>E(t,e,!1)))
|
||||
;s.unshift(n);const o=s.sort(((e,t)=>{
|
||||
if(e.relevance!==t.relevance)return t.relevance-e.relevance
|
||||
;if(e.language&&t.language){if(O(e.language).supersetOf===t.language)return 1
|
||||
;if(O(t.language).supersetOf===e.language)return-1}return 0})),[r,a]=o,c=r
|
||||
;return c.secondBest=a,c}function w(e){let t=null;const n=(e=>{
|
||||
let t=e.className+" ";t+=e.parentNode?e.parentNode.className:""
|
||||
;const n=p.languageDetectRe.exec(t);if(n){const t=O(n[1])
|
||||
;return t||(X(a.replace("{}",n[1])),
|
||||
X("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}
|
||||
return t.split(/\s+/).find((e=>b(e)||O(e)))})(e);if(b(n))return
|
||||
;if(N("before:highlightElement",{el:e,language:n
|
||||
}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e)
|
||||
;if(e.children.length>0&&(p.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),
|
||||
console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),
|
||||
console.warn("The element with unescaped HTML:"),
|
||||
console.warn(e)),p.throwUnescapedHTML))throw new J("One of your code blocks includes unescaped HTML.",e.innerHTML)
|
||||
;t=e;const i=t.textContent,o=n?m(i,{language:n,ignoreIllegals:!0}):x(i)
|
||||
;e.innerHTML=o.value,e.dataset.highlighted="yes",((e,t,n)=>{const i=t&&s[t]||n
|
||||
;e.classList.add("hljs"),e.classList.add("language-"+i)
|
||||
})(e,n,o.language),e.result={language:o.language,re:o.relevance,
|
||||
relevance:o.relevance},o.secondBest&&(e.secondBest={
|
||||
language:o.secondBest.language,relevance:o.secondBest.relevance
|
||||
}),N("after:highlightElement",{el:e,result:o,text:i})}let y=!1;function _(){
|
||||
"loading"!==document.readyState?document.querySelectorAll(p.cssSelector).forEach(w):y=!0
|
||||
}function O(e){return e=(e||"").toLowerCase(),i[e]||i[s[e]]}
|
||||
function v(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{
|
||||
s[e.toLowerCase()]=t}))}function k(e){const t=O(e)
|
||||
;return t&&!t.disableAutodetect}function N(e,t){const n=e;o.forEach((e=>{
|
||||
e[n]&&e[n](t)}))}
|
||||
"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{
|
||||
y&&_()}),!1),Object.assign(n,{highlight:m,highlightAuto:x,highlightAll:_,
|
||||
highlightElement:w,
|
||||
highlightBlock:e=>(G("10.7.0","highlightBlock will be removed entirely in v12.0"),
|
||||
G("10.7.0","Please use highlightElement now."),w(e)),configure:e=>{p=Q(p,e)},
|
||||
initHighlighting:()=>{
|
||||
_(),G("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},
|
||||
initHighlightingOnLoad:()=>{
|
||||
_(),G("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")
|
||||
},registerLanguage:(e,t)=>{let s=null;try{s=t(n)}catch(t){
|
||||
if(W("Language definition for '{}' could not be registered.".replace("{}",e)),
|
||||
!r)throw t;W(t),s=l}
|
||||
s.name||(s.name=e),i[e]=s,s.rawDefinition=t.bind(null,n),s.aliases&&v(s.aliases,{
|
||||
languageName:e})},unregisterLanguage:e=>{delete i[e]
|
||||
;for(const t of Object.keys(s))s[t]===e&&delete s[t]},
|
||||
listLanguages:()=>Object.keys(i),getLanguage:O,registerAliases:v,
|
||||
autoDetection:k,inherit:Q,addPlugin:e=>{(e=>{
|
||||
e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{
|
||||
e["before:highlightBlock"](Object.assign({block:t.el},t))
|
||||
}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{
|
||||
e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),o.push(e)},
|
||||
removePlugin:e=>{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}),n.debugMode=()=>{
|
||||
r=!1},n.safeMode=()=>{r=!0},n.versionString="11.9.0",n.regex={concat:h,
|
||||
lookahead:g,either:f,optional:d,anyNumberOfTimes:u}
|
||||
;for(const t in j)"object"==typeof j[t]&&e(j[t]);return Object.assign(n,j),n
|
||||
},ne=te({});return ne.newInstance=()=>te({}),ne}()
|
||||
;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `bash` grammar compiled for Highlight.js 11.9.0 */
|
||||
(()=>{var e=(()=>{"use strict";return e=>{const s=e.regex,t={},n={begin:/\$\{/,
|
||||
end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{
|
||||
className:"variable",variants:[{
|
||||
begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={
|
||||
className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]
|
||||
},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={
|
||||
begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,
|
||||
end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,
|
||||
contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(o);const r={begin:/\$?\(\(/,
|
||||
end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]
|
||||
},l=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10
|
||||
}),m={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,
|
||||
contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{
|
||||
name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,
|
||||
keyword:["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],
|
||||
literal:["true","false"],
|
||||
built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]
|
||||
},contains:[l,e.SHEBANG(),m,r,i,c,{match:/(\/[a-z._-]+)+/},o,{match:/\\"/},{
|
||||
className:"string",begin:/'/,end:/'/},{match:/\\'/},t]}}})()
|
||||
;hljs.registerLanguage("bash",e)})();/*! `nix` grammar compiled for Highlight.js 11.9.0 */
|
||||
(()=>{var e=(()=>{"use strict";return e=>{const n={
|
||||
keyword:["rec","with","let","in","inherit","assert","if","else","then"],
|
||||
literal:["true","false","or","and","null"],
|
||||
built_in:["import","abort","baseNameOf","dirOf","isNull","builtins","map","removeAttrs","throw","toString","derivation"]
|
||||
},s={className:"subst",begin:/\$\{/,end:/\}/,keywords:n},a={className:"string",
|
||||
contains:[{className:"char.escape",begin:/''\$/},s],variants:[{begin:"''",
|
||||
end:"''"},{begin:'"',end:'"'}]
|
||||
},i=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{
|
||||
begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{
|
||||
className:"attr",begin:/\S+/,relevance:.2}]}];return s.contains=i,{name:"Nix",
|
||||
aliases:["nixos"],keywords:n,contains:i}}})();hljs.registerLanguage("nix",e)
|
||||
})();/*! `shell` grammar compiled for Highlight.js 11.9.0 */
|
||||
(()=>{var s=(()=>{"use strict";return s=>({name:"Shell Session",
|
||||
aliases:["console","shellsession"],contains:[{className:"meta.prompt",
|
||||
begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,
|
||||
subLanguage:"bash"}}]})})();hljs.registerLanguage("shell",s)})();
|
6
highlightjs/loader.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
/* This file is NOT part of highlight.js */
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
document.querySelectorAll('.programlisting, .screen').forEach((element) => {
|
||||
hljs.highlightElement(element);
|
||||
});
|
||||
});
|
56
highlightjs/mono-blue.css
Normal file
|
@ -0,0 +1,56 @@
|
|||
pre code.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 1em
|
||||
}
|
||||
code.hljs {
|
||||
padding: 3px 5px
|
||||
}
|
||||
/*
|
||||
Five-color theme from a single blue hue.
|
||||
*/
|
||||
.hljs {
|
||||
background: #eaeef3;
|
||||
color: #00193a
|
||||
}
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-doctag,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold
|
||||
}
|
||||
.hljs-comment {
|
||||
color: #738191
|
||||
}
|
||||
.hljs-string,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-built_in,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-addition,
|
||||
.hljs-tag,
|
||||
.hljs-quote,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #0048ab
|
||||
}
|
||||
.hljs-meta,
|
||||
.hljs-subst,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-attribute,
|
||||
.hljs-deletion,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-bullet {
|
||||
color: #4c81c9
|
||||
}
|
||||
.hljs-emphasis {
|
||||
font-style: italic
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M10.428,10.411h0.56c3.78,0,4.788-1.96,4.872-3.444h3.22v19.88h-3.92V13.154h-4.732V10.411z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 703 B |
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.815,10.758h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.11H3.815V10.758z"/>
|
||||
<path style="fill:#FFFFFF;" d="M22.175,7.806c4.009,0,5.904,2.76,5.904,8.736c0,5.975-1.896,8.76-5.904,8.76
|
||||
c-4.008,0-5.904-2.785-5.904-8.76C16.271,10.566,18.167,7.806,22.175,7.806z M22.175,22.613c1.921,0,2.448-1.68,2.448-6.071
|
||||
c0-4.393-0.527-6.049-2.448-6.049c-1.92,0-2.448,1.656-2.448,6.049C19.727,20.934,20.255,22.613,22.175,22.613z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1 KiB |
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M5.209,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H5.209V10.412z"/>
|
||||
<path style="fill:#FFFFFF;" d="M18.553,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.359V12.764h-4.056V10.412z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 827 B |
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M4.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.813V10.412z"/>
|
||||
<path style="fill:#FFFFFF;" d="M17.316,13.484c0-5.545,4.056-6.024,5.568-6.024c3.265,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.553,5.544c-2.256,1.584-3.432,2.353-3.815,3.145h7.392V24.5h-11.64c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.353-2.424c-2.352,0-2.423,1.944-2.447,3.192H17.316z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1 KiB |
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H3.813V10.412z"/>
|
||||
<path style="fill:#FFFFFF;" d="M20.611,14.636h0.529c1.008,0,2.855-0.096,2.855-2.304c0-0.624-0.288-2.185-2.137-2.185
|
||||
c-2.303,0-2.303,2.185-2.303,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.279,0,5.279,1.152,5.279,4.752
|
||||
c0,1.728-1.08,2.808-2.039,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.377,5.496-5.809,5.496
|
||||
c-1.607,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.52-0.911,2.52-2.808
|
||||
c0-2.328-2.256-2.424-3.816-2.424V14.636z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M4.146,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.146V10.412z"/>
|
||||
<path style="fill:#FFFFFF;" d="M28.457,20.732h-1.896V24.5h-3.36v-3.768h-6.72v-2.904L22.746,7.46h3.815v10.656h1.896V20.732z
|
||||
M23.201,18.116c0-4.128,0.072-6.792,0.072-7.32h-0.048l-4.272,7.32H23.201z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 906 B |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.479,11.079h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.43H3.479V11.079z"/>
|
||||
<path style="fill:#FFFFFF;" d="M19.342,14.943c0.625-0.433,1.392-0.937,3.048-0.937c2.279,0,5.16,1.584,5.16,5.496
|
||||
c0,2.328-1.176,6.121-6.192,6.121c-2.664,0-5.376-1.584-5.544-5.016h3.36c0.144,1.391,0.888,2.326,2.376,2.326
|
||||
c1.607,0,2.544-1.367,2.544-3.191c0-1.512-0.72-3.047-2.496-3.047c-0.456,0-1.608,0.023-2.256,1.223l-3-0.143l1.176-9.361h9.36
|
||||
v2.832h-6.937L19.342,14.943z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H3.813V10.412z"/>
|
||||
<path style="fill:#FFFFFF;" d="M24.309,11.78c-0.097-0.96-0.721-1.633-1.969-1.633c-2.184,0-2.688,2.496-2.808,4.704L19.58,14.9
|
||||
c0.456-0.624,1.296-1.416,3.191-1.416c3.529,0,5.209,2.712,5.209,5.256c0,3.72-2.28,6.216-5.568,6.216
|
||||
c-5.16,0-6.168-4.32-6.168-8.568c0-3.24,0.432-8.928,6.336-8.928c0.695,0,2.641,0.264,3.48,1.104
|
||||
c0.936,0.912,1.271,1.416,1.584,3.217H24.309z M22.172,16.172c-1.271,0-2.568,0.792-2.568,2.928c0,1.849,1.056,3.168,2.664,3.168
|
||||
c1.225,0,2.353-0.936,2.353-3.239C24.62,16.868,23.229,16.172,22.172,16.172z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.479,11.079h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.43H3.479V11.079z"/>
|
||||
<path style="fill:#FFFFFF;" d="M27.838,11.006c-1.631,1.776-5.807,6.816-6.215,14.16h-3.457c0.36-6.816,4.632-12.24,6.072-13.776
|
||||
h-8.472l0.072-2.976h12V11.006z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 866 B |
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M4.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.813V10.412z"/>
|
||||
<path style="fill:#FFFFFF;" d="M23.172,24.956c-4.392,0-5.904-2.856-5.904-5.185c0-0.863,0-3.119,2.592-4.319
|
||||
c-1.344-0.672-2.064-1.752-2.064-3.336c0-2.904,2.328-4.656,5.304-4.656c3.528,0,5.4,2.088,5.4,4.44
|
||||
c0,1.464-0.6,2.712-1.968,3.432c1.632,0.815,2.544,1.896,2.544,4.104C29.076,21.596,27.684,24.956,23.172,24.956z M23.124,16.916
|
||||
c-1.224,0-2.4,0.792-2.4,2.64c0,1.632,0.936,2.712,2.472,2.712c1.752,0,2.424-1.512,2.424-2.688
|
||||
C25.62,18.38,24.996,16.916,23.124,16.916z M25.284,12.26c0-1.296-0.888-2.112-1.968-2.112c-1.512,0-2.305,0.864-2.305,2.112
|
||||
c0,1.008,0.744,2.112,2.185,2.112C24.516,14.372,25.284,13.484,25.284,12.26z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.3 KiB |
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M4.146,10.746h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.041h-3.36V13.097H4.146V10.746z"/>
|
||||
<path style="fill:#FFFFFF;" d="M20.225,20.898v0.023c0.192,1.176,0.936,1.68,1.968,1.68c1.392,0,2.783-1.176,2.808-4.752
|
||||
l-0.048-0.049c-0.768,1.152-2.088,1.441-3.24,1.441c-3.264,0-5.16-2.473-5.16-5.329c0-4.176,2.472-6.12,5.808-6.12
|
||||
c5.904,0,6,6.36,6,8.76c0,6.601-3.12,8.736-6.192,8.736c-2.904,0-4.992-1.68-5.28-4.391H20.225z M22.434,16.553
|
||||
c1.176,0,2.472-0.84,2.472-2.855c0-1.944-0.841-3.145-2.568-3.145c-0.864,0-2.424,0.433-2.424,2.88
|
||||
C19.913,16.001,21.161,16.553,22.434,16.553z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M9.668,12.328c0-6.469,4.732-7.028,6.496-7.028c3.808,0,6.833,2.24,6.833,6.271
|
||||
c0,3.416-2.213,5.152-4.145,6.469c-2.632,1.848-4.004,2.744-4.452,3.668h8.624v3.472H9.444c0.14-2.324,0.308-4.76,4.62-7.896
|
||||
c3.584-2.604,5.012-3.612,5.012-5.853c0-1.315-0.84-2.828-2.744-2.828c-2.744,0-2.828,2.269-2.856,3.725H9.668z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 926 B |
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M23.172,7.46c4.008,0,5.904,2.76,5.904,8.736c0,5.976-1.896,8.76-5.904,8.76
|
||||
s-5.904-2.784-5.904-8.76C17.268,10.22,19.164,7.46,23.172,7.46z M23.172,22.268c1.92,0,2.448-1.68,2.448-6.071
|
||||
c0-4.393-0.528-6.049-2.448-6.049s-2.448,1.656-2.448,6.049C20.724,20.588,21.252,22.268,23.172,22.268z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M5.306,13.151c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392v2.976H5.114c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H5.306z"/>
|
||||
<path style="fill:#FFFFFF;" d="M19.49,10.079h0.48c3.239,0,4.104-1.681,4.176-2.952h2.761v17.04h-3.361V12.431H19.49V10.079z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1 KiB |
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M17.316,13.484c0-5.545,4.056-6.024,5.568-6.024c3.265,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.553,5.544c-2.256,1.584-3.432,2.353-3.815,3.145h7.392V24.5h-11.64c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.353-2.424c-2.352,0-2.423,1.944-2.447,3.192H17.316z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M21.612,14.636h0.528c1.008,0,2.855-0.096,2.855-2.304c0-0.624-0.287-2.185-2.136-2.185
|
||||
c-2.304,0-2.304,2.185-2.304,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.28,0,5.28,1.152,5.28,4.752
|
||||
c0,1.728-1.08,2.808-2.04,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.377,5.496-5.809,5.496
|
||||
c-1.607,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.521-0.911,2.521-2.808
|
||||
c0-2.328-2.257-2.424-3.816-2.424V14.636z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M4.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H4.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H4.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M30.124,20.732h-1.896V24.5h-3.36v-3.768h-6.72v-2.904L24.412,7.46h3.816v10.656h1.896V20.732z
|
||||
M24.868,18.116c0-4.128,0.071-6.792,0.071-7.32h-0.047l-4.272,7.32H24.868z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M20.676,14.276c0.624-0.433,1.393-0.937,3.049-0.937c2.279,0,5.16,1.584,5.16,5.496
|
||||
c0,2.328-1.177,6.12-6.193,6.12c-2.664,0-5.375-1.584-5.543-5.016h3.36c0.144,1.392,0.889,2.327,2.376,2.327
|
||||
c1.608,0,2.544-1.367,2.544-3.191c0-1.513-0.72-3.048-2.496-3.048c-0.455,0-1.607,0.023-2.256,1.224l-3-0.144l1.176-9.36h9.36
|
||||
v2.832h-6.937L20.676,14.276z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.3 KiB |
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M25.309,11.78c-0.097-0.96-0.721-1.633-1.969-1.633c-2.184,0-2.688,2.496-2.808,4.704L20.58,14.9
|
||||
c0.456-0.624,1.296-1.416,3.191-1.416c3.529,0,5.209,2.712,5.209,5.256c0,3.72-2.28,6.216-5.568,6.216
|
||||
c-5.16,0-6.168-4.32-6.168-8.568c0-3.24,0.432-8.928,6.336-8.928c0.695,0,2.641,0.264,3.48,1.104
|
||||
c0.936,0.912,1.271,1.416,1.584,3.217H25.309z M23.172,16.172c-1.271,0-2.568,0.792-2.568,2.928c0,1.849,1.056,3.168,2.664,3.168
|
||||
c1.225,0,2.353-0.936,2.353-3.239C25.62,16.868,24.229,16.172,23.172,16.172z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M29.172,10.34c-1.632,1.776-5.808,6.816-6.216,14.16H19.5c0.36-6.816,4.632-12.24,6.072-13.776
|
||||
H17.1l0.072-2.976h12V10.34z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M23.172,24.956c-4.392,0-5.904-2.856-5.904-5.185c0-0.863,0-3.119,2.592-4.319
|
||||
c-1.344-0.672-2.064-1.752-2.064-3.336c0-2.904,2.328-4.656,5.304-4.656c3.528,0,5.4,2.088,5.4,4.44
|
||||
c0,1.464-0.6,2.712-1.968,3.432c1.632,0.815,2.544,1.896,2.544,4.104C29.076,21.596,27.684,24.956,23.172,24.956z M23.124,16.916
|
||||
c-1.224,0-2.4,0.792-2.4,2.64c0,1.632,0.936,2.712,2.472,2.712c1.752,0,2.424-1.512,2.424-2.688
|
||||
C25.62,18.38,24.996,16.916,23.124,16.916z M25.284,12.26c0-1.296-0.888-2.112-1.968-2.112c-1.512,0-2.305,0.864-2.305,2.112
|
||||
c0,1.008,0.744,2.112,2.185,2.112C24.516,14.372,25.284,13.484,25.284,12.26z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.5 KiB |
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
|
||||
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
|
||||
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
|
||||
<path style="fill:#FFFFFF;" d="M20.893,20.564v0.023c0.191,1.176,0.936,1.68,1.967,1.68c1.393,0,2.785-1.176,2.809-4.752
|
||||
l-0.048-0.048c-0.769,1.152-2.088,1.44-3.24,1.44c-3.264,0-5.16-2.473-5.16-5.328c0-4.176,2.472-6.12,5.807-6.12
|
||||
c5.904,0,6.001,6.36,6.001,8.76c0,6.601-3.12,8.736-6.192,8.736c-2.904,0-4.992-1.68-5.28-4.392H20.893z M23.1,16.22
|
||||
c1.176,0,2.473-0.84,2.473-2.855c0-1.944-0.84-3.145-2.568-3.145c-0.863,0-2.424,0.433-2.424,2.88
|
||||
C20.58,15.668,21.828,16.22,23.1,16.22z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M15.127,14.005h0.616c1.176,0,3.332-0.112,3.332-2.688c0-0.728-0.336-2.548-2.492-2.548
|
||||
c-2.688,0-2.688,2.548-2.688,3.248h-3.64c0-3.724,2.1-6.384,6.58-6.384c2.66,0,6.16,1.344,6.16,5.544
|
||||
c0,2.016-1.261,3.276-2.38,3.78v0.056c0.699,0.196,2.996,1.232,2.996,4.62c0,3.752-2.772,6.412-6.776,6.412
|
||||
c-1.876,0-6.916-0.42-6.916-6.636h3.836l-0.028,0.027c0,1.064,0.28,3.473,2.912,3.473c1.568,0,2.94-1.064,2.94-3.276
|
||||
c0-2.716-2.632-2.828-4.452-2.828V14.005z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1 KiB |
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M8.268,14.636h0.528c1.008,0,2.856-0.096,2.856-2.304c0-0.624-0.288-2.185-2.136-2.185
|
||||
c-2.304,0-2.304,2.185-2.304,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.28,0,5.28,1.152,5.28,4.752
|
||||
c0,1.728-1.08,2.808-2.04,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.376,5.496-5.808,5.496
|
||||
c-1.608,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.52-0.911,2.52-2.808
|
||||
c0-2.328-2.256-2.424-3.816-2.424V14.636z"/>
|
||||
<path style="fill:#FFFFFF;" d="M23.172,7.46c4.008,0,5.904,2.76,5.904,8.736c0,5.976-1.896,8.76-5.904,8.76
|
||||
s-5.904-2.784-5.904-8.76C17.268,10.22,19.164,7.46,23.172,7.46z M23.172,22.268c1.92,0,2.448-1.68,2.448-6.071
|
||||
c0-4.393-0.528-6.049-2.448-6.049s-2.448,1.656-2.448,6.049C20.724,20.588,21.252,22.268,23.172,22.268z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M21.891,20.784h-2.212v4.396h-3.92v-4.396h-7.84v-3.389L15.227,5.3h4.452v12.432h2.212V20.784z
|
||||
M15.759,17.731c0-4.815,0.084-7.924,0.084-8.54h-0.056l-4.984,8.54H15.759z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 783 B |
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M14.035,14.252c0.728-0.504,1.624-1.092,3.556-1.092c2.66,0,6.02,1.848,6.02,6.411
|
||||
c0,2.717-1.372,7.141-7.224,7.141c-3.108,0-6.272-1.849-6.468-5.853h3.92c0.168,1.624,1.036,2.717,2.772,2.717
|
||||
c1.876,0,2.968-1.597,2.968-3.725c0-1.764-0.839-3.556-2.912-3.556c-0.532,0-1.876,0.028-2.632,1.428l-3.5-0.168l1.372-10.92
|
||||
h10.919v3.304h-8.092L14.035,14.252z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 967 B |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M19.106,10.673c-0.112-1.12-0.84-1.904-2.296-1.904c-2.548,0-3.136,2.912-3.276,5.488l0.056,0.056
|
||||
c0.532-0.728,1.512-1.651,3.724-1.651c4.116,0,6.077,3.164,6.077,6.131c0,4.34-2.66,7.252-6.497,7.252
|
||||
c-6.02,0-7.196-5.039-7.196-9.996c0-3.78,0.504-10.416,7.392-10.416c0.812,0,3.08,0.308,4.061,1.288
|
||||
c1.092,1.063,1.483,1.652,1.848,3.752H19.106z M16.614,15.797c-1.484,0-2.996,0.924-2.996,3.416c0,2.156,1.232,3.697,3.108,3.697
|
||||
c1.428,0,2.745-1.094,2.745-3.781C19.471,16.609,17.846,15.797,16.614,15.797z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M24.28,9.66c-1.904,2.071-6.776,7.951-7.252,16.52h-4.032c0.42-7.952,5.404-14.28,7.084-16.072
|
||||
h-9.884l0.084-3.472h14V9.66z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 738 B |
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M16.28,26.712c-5.124,0-6.888-3.332-6.888-6.048c0-1.009,0-3.641,3.024-5.04
|
||||
c-1.568-0.784-2.408-2.044-2.408-3.893c0-3.388,2.716-5.432,6.188-5.432c4.116,0,6.3,2.436,6.3,5.18
|
||||
c0,1.708-0.7,3.164-2.296,4.004c1.903,0.952,2.968,2.212,2.968,4.788C23.168,22.792,21.544,26.712,16.28,26.712z M16.224,17.332
|
||||
c-1.428,0-2.8,0.924-2.8,3.08c0,1.903,1.092,3.164,2.884,3.164c2.043,0,2.829-1.765,2.829-3.137
|
||||
C19.137,19.04,18.408,17.332,16.224,17.332z M18.744,11.899c0-1.512-1.036-2.464-2.296-2.464c-1.764,0-2.688,1.008-2.688,2.464
|
||||
c0,1.177,0.868,2.464,2.548,2.464C17.848,14.363,18.744,13.328,18.744,11.899z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
|
||||
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
|
||||
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
|
||||
<g>
|
||||
<g style="enable-background:new ;">
|
||||
<path style="fill:#FFFFFF;" d="M13.953,21.921v0.027c0.224,1.372,1.092,1.961,2.296,1.961c1.624,0,3.248-1.372,3.276-5.545
|
||||
l-0.057-0.056c-0.896,1.344-2.436,1.68-3.78,1.68c-3.808,0-6.02-2.884-6.02-6.216c0-4.872,2.884-7.14,6.776-7.14
|
||||
c6.888,0,7,7.42,7,10.22c0,7.7-3.641,10.192-7.224,10.192c-3.388,0-5.824-1.96-6.16-5.124H13.953z M16.529,16.853
|
||||
c1.372,0,2.884-0.979,2.884-3.332c0-2.268-0.98-3.668-2.996-3.668c-1.008,0-2.828,0.504-2.828,3.36
|
||||
C13.589,16.209,15.045,16.853,16.529,16.853z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1 KiB |
673
index.html
964
index.xhtml
Normal file
|
@ -0,0 +1,964 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Home Manager Manual</title>
|
||||
<link rel="stylesheet" type="text/css" href="/nix/store/pxpsr0b80pfn3i5pvq8kqq3z1bwlqcig-source/static/style.css" /><link rel="stylesheet" type="text/css" href="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/tomorrow-night.min.css" /><link rel="stylesheet" type="text/css" href="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/highlight-style.css" />
|
||||
<script src="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/highlight.pack.js" type="text/javascript"></script><script src="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/loader.js" type="text/javascript"></script>
|
||||
<meta name="generator" content="nixos-render-docs" />
|
||||
<link rel="home" href="index.xhtml" title="Home Manager Manual" />
|
||||
<link rel="next" href="options.html" title="Appendix A. Home Manager Configuration Options" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr>
|
||||
<th colspan="3" align="center">Home Manager Manual</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" align="left"> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="options.html">Next</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="book">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div><h1 class="title"><a id="home-manager-manual"></a>Home Manager Manual</h1></div>
|
||||
<div><h2 class="subtitle">Version 23.11</h2></div>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="preface"> <a href="index.xhtml#preface">Preface</a> </span></dt><dt> <span class="part"> <a href="index.xhtml#ch-installation">Installing Home Manager</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-install-standalone">Standalone installation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nix-darwin-module">nix-darwin module</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-usage">Using Home Manager</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-usage-configuration">Configuration Example</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-rollbacks">Rollbacks</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-dotfiles">Keeping your ~ safe from harm</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-graphical">Graphical services</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-updating">Updating</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-nix-flakes">Nix Flakes</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-flakes-prerequisites">Prerequisites</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-standalone">Standalone setup</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nix-darwin-module">nix-darwin module</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-writing-modules">Writing Home Manager Modules</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-option-types">Option Types</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-contributing">Contributing</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-news">News</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-tests">Tests</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-3rd-party">Third-Party Tools and Extensions</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-3rd-party-module-collections">Module Collections</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-faq">Frequently Asked Questions (FAQ)</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#_why_is_there_a_collision_error_when_switching_generation">Why is there a collision error when switching generation?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_are_the_session_variables_not_set">Why are the session variables not set?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_to_set_up_a_configuration_for_multiple_users_machines">How to set up a configuration for multiple users/machines?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal">Why do I get an error message about <code class="literal">ca.desrt.dconf</code> or <code class="literal">dconf.service</code>?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_install_packages_from_nixpkgs_unstable">How do I install packages from Nixpkgs unstable?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_override_the_package_used_by_a_module">How do I override the package used by a module?</a> </span></dt></dl></dd><dt> <span class="appendix"> <a href="options.html">A. Home Manager Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="nixos-options.html">B. NixOS Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="nix-darwin-options.html">C. nix-darwin Configuration Options</a> </span></dt> </dl></div>
|
||||
<div class="preface"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="preface"></a>Preface </h1> </div> </div></div><p>This manual will eventually describe how to install, use, and extend Home
|
||||
Manager.</p><p>If you encounter problems then please reach out on the IRC channel
|
||||
<a class="link" href="https://webchat.oftc.net/?channels=home-manager" target="_top">#home-manager</a>
|
||||
hosted by <a class="link" href="https://oftc.net/" target="_top">OFTC</a>.
|
||||
There is also a <a class="link" href="https://matrix.to/#/%23hm:rycee.net" target="_top">Matrix room</a>,
|
||||
which is bridged to the IRC channel.
|
||||
If your problem is caused by a bug in Home Manager then it should
|
||||
be reported on the
|
||||
<a class="link" href="https://github.com/nix-community/home-manager/issues" target="_top">Home Manager issue tracker</a>.</p><div class="note"><h3 class="title">Note</h3><p>Commands prefixed with <code class="literal">$ sudo</code> have to be run as root, either
|
||||
requiring to login as root user or temporarily switching to it using
|
||||
<code class="literal">sudo</code> for example.</p></div>
|
||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-installation"></a>Installing Home Manager </h1> </div> </div></div><div class="partintro"><p>Home Manager can be used in three primary ways:</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>Using the standalone <code class="literal">home-manager</code> tool. For platforms other than
|
||||
NixOS and Darwin, this is the only available choice. It is also
|
||||
recommended for people on NixOS or Darwin that want to manage their
|
||||
home directory independently of the system as a whole. See
|
||||
<a class="link" href="index.xhtml#sec-install-standalone" title="Standalone installation" >Standalone installation</a> for instructions
|
||||
on how to perform this installation.</p></li><li class="listitem"><p>As a module within a NixOS system configuration. This allows the
|
||||
user profiles to be built together with the system when running
|
||||
<code class="literal">nixos-rebuild</code>. See <a class="link" href="index.xhtml#sec-install-nixos-module" title="NixOS module" >NixOS module</a> for a
|
||||
description of this setup.</p></li><li class="listitem"><p>As a module within a
|
||||
<a class="link" href="https://github.com/LnL7/nix-darwin/" target="_top">nix-darwin</a> system
|
||||
configuration. This allows the user profiles to be built together
|
||||
with the system when running <code class="literal">darwin-rebuild</code>. See <a class="link" href="index.xhtml#sec-install-nix-darwin-module" title="nix-darwin module" >nix-darwin
|
||||
module</a> for a description of this
|
||||
setup.</p></li></ol></div><div class="note"><h3 class="title">Note</h3><p>In this chapter we describe how to install Home Manager in the standard
|
||||
way using channels. If you prefer to use <a class="link" href="https://nixos.wiki/wiki/Flakes" target="_top">Nix
|
||||
Flakes</a> then please see the instructions
|
||||
in <a class="link" href="index.xhtml#ch-nix-flakes" title="Nix Flakes" >nix flakes</a>.</p></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-install-standalone">Standalone installation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nix-darwin-module">nix-darwin module</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-install-standalone"></a>Standalone installation </h2> </div> </div></div><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>Make sure you have a working Nix installation. Specifically, make
|
||||
sure that your user is able to build and install Nix packages. For
|
||||
example, you should be able to successfully run a command like
|
||||
<code class="literal">nix-instantiate '<nixpkgs>' -A hello</code> without having to switch to
|
||||
the root user. For a multi-user install of Nix this means that your
|
||||
user must be covered by the
|
||||
<a class="link" href="https://nixos.org/nix/manual/#conf-allowed-users" target="_top"><code class="literal">allowed-users</code></a>
|
||||
Nix option. On NixOS you can control this option using the
|
||||
<a class="link" href="https://nixos.org/manual/nixos/stable/options.html#opt-nix.settings.allowed-users" target="_top"><code class="literal">nix.settings.allowed-users</code></a>
|
||||
system option.</p></li><li class="listitem"><p>Add the appropriate Home Manager channel. If you are following
|
||||
Nixpkgs master or an unstable channel you can run</p><pre><code class="programlisting shell">$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
</code></pre><p>and if you follow a Nixpkgs version 23.11 channel you can run</p><pre><code class="programlisting shell">$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
</code></pre></li><li class="listitem"><p>Run the Home Manager installation command and create the first Home
|
||||
Manager generation:</p><pre><code class="programlisting shell">$ nix-shell '<home-manager>' -A install
|
||||
</code></pre><p>Once finished, Home Manager should be active and available in your
|
||||
user environment.</p></li><li class="listitem"><p>If you do not plan on having Home Manager manage your shell
|
||||
configuration then you must source the</p><pre><code class="programlisting bash">$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
</code></pre><p>file in your shell configuration. Alternatively source</p><pre><code class="programlisting bash">/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh
|
||||
</code></pre><p>when managing home configuration together with system configuration.</p><p>This file can be sourced directly by POSIX.2-like shells such as
|
||||
<a class="link" href="https://www.gnu.org/software/bash/" target="_top">Bash</a> or <a class="link" href="http://zsh.sourceforge.net/" target="_top">Z
|
||||
shell</a>. <a class="link" href="https://fishshell.com" target="_top">Fish</a>
|
||||
users can use utilities such as
|
||||
<a class="link" href="https://github.com/oh-my-fish/plugin-foreign-env" target="_top">foreign-env</a> or
|
||||
<a class="link" href="https://github.com/bouk/babelfish" target="_top">babelfish</a>.</p><p>For example, if you use Bash then add</p><pre><code class="programlisting bash">. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
</code></pre><p>to your <code class="literal">~/.profile</code> file.</p></li></ol></div><p>If instead of using channels you want to run Home Manager from a Git
|
||||
checkout of the repository then you can use the
|
||||
<a class="link" href="options.html#opt-programs.home-manager.path" >home-manager.path</a> option to specify the absolute
|
||||
path to the repository.</p><p>Once installed you can see <a class="link" href="index.xhtml#ch-usage" title="Using Home Manager" >Using Home Manager</a> for a more detailed
|
||||
description of Home Manager and how to use it.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-install-nixos-module"></a>NixOS module </h2> </div> </div></div><p>Home Manager provides a NixOS module that allows you to prepare user
|
||||
environments directly from the system configuration file, which often is
|
||||
more convenient than using the <code class="literal">home-manager</code> tool. It also opens up
|
||||
additional possibilities, for example, to automatically configure user
|
||||
environments in NixOS declarative containers or on systems deployed
|
||||
through NixOps.</p><p>To make the NixOS module available for use you must <code class="literal">import</code> it into
|
||||
your system configuration. This is most conveniently done by adding a
|
||||
Home Manager channel to the root user. For example, if you are following
|
||||
Nixpkgs master or an unstable channel, you can run</p><pre><code class="programlisting shell">$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||||
$ sudo nix-channel --update
|
||||
</code></pre><p>and if you follow a Nixpkgs version 23.11 channel, you can run</p><pre><code class="programlisting shell">$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
|
||||
$ sudo nix-channel --update
|
||||
</code></pre><p>It is then possible to add</p><pre><code class="programlisting nix">imports = [ <home-manager/nixos> ];
|
||||
</code></pre><p>to your system <code class="literal">configuration.nix</code> file, which will introduce a new
|
||||
NixOS option called <code class="literal">home-manager.users</code> whose type is an attribute set
|
||||
that maps user names to Home Manager configurations.</p><p>For example, a NixOS configuration may include the lines</p><pre><code class="programlisting nix">users.users.eve.isNormalUser = true;
|
||||
home-manager.users.eve = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.atool pkgs.httpie ];
|
||||
programs.bash.enable = true;
|
||||
|
||||
# The state version is required and should stay at the version you
|
||||
# originally installed.
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
</code></pre><p>and after a <code class="literal">sudo nixos-rebuild switch</code> the user eve’s environment
|
||||
should include a basic Bash configuration and the packages atool and
|
||||
httpie.</p><div class="note"><h3 class="title">Note</h3><p>If <code class="literal">nixos-rebuild switch</code> does not result in the environment you expect,
|
||||
you can take a look at the output of the Home Manager activation script
|
||||
output using</p><pre><code class="programlisting shell">$ systemctl status "home-manager-$USER.service"
|
||||
</code></pre></div><p>If you do not plan on having Home Manager manage your shell
|
||||
configuration then you must add either</p><pre><code class="programlisting bash">. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
</code></pre><p>or</p><pre><code class="programlisting bash">. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
|
||||
</code></pre><p>to your shell configuration, depending on whether
|
||||
<a class="link" href="nixos-options.html#nixos-opt-home-manager.useUserPackages" >home-manager.useUserPackages</a> is enabled. This file can
|
||||
be sourced directly by POSIX.2-like shells such as
|
||||
<a class="link" href="https://www.gnu.org/software/bash/" target="_top">Bash</a> or <a class="link" href="http://zsh.sourceforge.net/" target="_top">Z
|
||||
shell</a>. <a class="link" href="https://fishshell.com" target="_top">Fish</a> users
|
||||
can use utilities such as
|
||||
<a class="link" href="https://github.com/oh-my-fish/plugin-foreign-env" target="_top">foreign-env</a> or
|
||||
<a class="link" href="https://github.com/bouk/babelfish" target="_top">babelfish</a>.</p><div class="note"><h3 class="title">Note</h3><p>By default packages will be installed to <code class="literal">$HOME/.nix-profile</code> but they
|
||||
can be installed to <code class="literal">/etc/profiles</code> if</p><pre><code class="programlisting nix">home-manager.useUserPackages = true;
|
||||
</code></pre><p>is added to the system configuration. This is necessary if, for example,
|
||||
you wish to use <code class="literal">nixos-rebuild build-vm</code>. This option may become the
|
||||
default value in the future.</p></div><div class="note"><h3 class="title">Note</h3><p>By default, Home Manager uses a private <code class="literal">pkgs</code> instance that is
|
||||
configured via the <code class="literal">home-manager.users.<name>.nixpkgs</code> options. To
|
||||
instead use the global <code class="literal">pkgs</code> that is configured via the system level
|
||||
<code class="literal">nixpkgs</code> options, set</p><pre><code class="programlisting nix">home-manager.useGlobalPkgs = true;
|
||||
</code></pre><p>This saves an extra Nixpkgs evaluation, adds consistency, and removes
|
||||
the dependency on <code class="literal">NIX_PATH</code>, which is otherwise used for importing
|
||||
Nixpkgs.</p></div><div class="note"><h3 class="title">Note</h3><p>Home Manager will pass <code class="literal">osConfig</code> as a module argument to any modules
|
||||
you create. This contains the system’s NixOS configuration.</p><pre><code class="programlisting nix">{ lib, pkgs, osConfig, ... }:
|
||||
</code></pre></div><p>Once installed you can see <a class="link" href="index.xhtml#ch-usage" title="Using Home Manager" >Using Home Manager</a> for a more detailed
|
||||
description of Home Manager and how to use it.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-install-nix-darwin-module"></a>nix-darwin module </h2> </div> </div></div><p>Home Manager provides a module that allows you to prepare user
|
||||
environments directly from the
|
||||
<a class="link" href="https://github.com/LnL7/nix-darwin/" target="_top">nix-darwin</a> configuration file,
|
||||
which often is more convenient than using the <code class="literal">home-manager</code> tool.</p><p>To make the NixOS module available for use you must <code class="literal">import</code> it into
|
||||
your system configuration. This is most conveniently done by adding a
|
||||
Home Manager channel. For example, if you are following Nixpkgs master
|
||||
or an unstable channel, you can run</p><pre><code class="programlisting shell">$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
</code></pre><p>and if you follow a Nixpkgs version 23.11 channel, you can run</p><pre><code class="programlisting shell">$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
|
||||
$ nix-channel --update
|
||||
</code></pre><p>It is then possible to add</p><pre><code class="programlisting nix">imports = [ <home-manager/nix-darwin> ];
|
||||
</code></pre><p>to your nix-darwin <code class="literal">configuration.nix</code> file, which will introduce a new
|
||||
NixOS option called <code class="literal">home-manager</code> whose type is an attribute set that
|
||||
maps user names to Home Manager configurations.</p><p>For example, a nix-darwin configuration may include the lines</p><pre><code class="programlisting nix">users.users.eve = {
|
||||
name = "eve";
|
||||
home = "/Users/eve";
|
||||
}
|
||||
home-manager.users.eve = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.atool pkgs.httpie ];
|
||||
programs.bash.enable = true;
|
||||
|
||||
# The state version is required and should stay at the version you
|
||||
# originally installed.
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
</code></pre><p>and after a <code class="literal">darwin-rebuild switch</code> the user eve’s environment should
|
||||
include a basic Bash configuration and the packages atool and httpie.</p><p>If you do not plan on having Home Manager manage your shell
|
||||
configuration then you must add either</p><pre><code class="programlisting bash">. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
</code></pre><p>or</p><pre><code class="programlisting bash">. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
|
||||
</code></pre><p>to your shell configuration, depending on whether
|
||||
<a class="link" href="nix-darwin-options.html#nix-darwin-opt-home-manager.useUserPackages" >home-manager.useUserPackages</a> is enabled. This
|
||||
file can be sourced directly by POSIX.2-like shells such as
|
||||
<a class="link" href="https://www.gnu.org/software/bash/" target="_top">Bash</a> or <a class="link" href="http://zsh.sourceforge.net/" target="_top">Z
|
||||
shell</a>. <a class="link" href="https://fishshell.com" target="_top">Fish</a> users
|
||||
can use utilities such as
|
||||
<a class="link" href="https://github.com/oh-my-fish/plugin-foreign-env" target="_top">foreign-env</a> or
|
||||
<a class="link" href="https://github.com/bouk/babelfish" target="_top">babelfish</a>.</p><div class="note"><h3 class="title">Note</h3><p>By default user packages will not be ignored in favor of
|
||||
<code class="literal">environment.systemPackages</code>, but they will be installed to
|
||||
<code class="literal">/etc/profiles/per-user/$USERNAME</code> if</p><pre><code class="programlisting nix">home-manager.useUserPackages = true;
|
||||
</code></pre><p>is added to the nix-darwin configuration. This option may become the
|
||||
default value in the future.</p></div><div class="note"><h3 class="title">Note</h3><p>By default, Home Manager uses a private <code class="literal">pkgs</code> instance that is
|
||||
configured via the <code class="literal">home-manager.users.<name>.nixpkgs</code> options. To
|
||||
instead use the global <code class="literal">pkgs</code> that is configured via the system level
|
||||
<code class="literal">nixpkgs</code> options, set</p><pre><code class="programlisting nix">home-manager.useGlobalPkgs = true;
|
||||
</code></pre><p>This saves an extra Nixpkgs evaluation, adds consistency, and removes
|
||||
the dependency on <code class="literal">NIX_PATH</code>, which is otherwise used for importing
|
||||
Nixpkgs.</p></div><div class="note"><h3 class="title">Note</h3><p>Home Manager will pass <code class="literal">osConfig</code> as a module argument to any modules
|
||||
you create. This contains the system’s nix-darwin configuration.</p><pre><code class="programlisting nix">{ lib, pkgs, osConfig, ... }:
|
||||
</code></pre></div><p>Once installed you can see <a class="link" href="index.xhtml#ch-usage" title="Using Home Manager" >Using Home Manager</a> for a more detailed
|
||||
description of Home Manager and how to use it.</p>
|
||||
</div>
|
||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-usage"></a>Using Home Manager </h1> </div> </div></div><div class="partintro"><p>Your use of Home Manager is centered around the configuration file,
|
||||
which is typically found at <code class="literal">~/.config/home-manager/home.nix</code> in the
|
||||
standard installation or <code class="literal">~/.config/home-manager/flake.nix</code> in a Nix
|
||||
flake based installation.</p><div class="note"><h3 class="title">Note</h3><p>The default configuration used to be placed in <code class="literal">~/.config/nixpkgs</code>¸ so
|
||||
you may see references to that elsewhere. The old directory still works
|
||||
but Home Manager will print a warning message when used.</p></div><p>This configuration file can be <span class="emphasis"><em>built</em></span> and <span class="emphasis"><em>activated</em></span>.</p><p>Building a configuration produces a directory in the Nix store that
|
||||
contains all files and programs that should be available in your home
|
||||
directory and Nix user profile, respectively. The build step also checks
|
||||
that the configuration is valid and it will fail with an error if you,
|
||||
for example, assign a value to an option that does not exist or assign a
|
||||
value of the wrong type. Some modules also have custom assertions that
|
||||
perform more detailed, module specific, checks.</p><p>Concretely, if your configuration contains</p><pre><code class="programlisting nix">programs.emacs.enable = "yes";
|
||||
</code></pre><p>then building it, for example using <code class="literal">home-manager build</code>, will result in
|
||||
an error message saying something like</p><pre><code class="programlisting console">$ home-manager build
|
||||
error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values:
|
||||
- In `/home/jdoe/.config/home-manager/home.nix': "yes"
|
||||
(use '--show-trace' to show detailed location information)
|
||||
</code></pre><p>The message indicates that you must provide a Boolean value for this
|
||||
option, that is, either <code class="literal">true</code> or <code class="literal">false</code>. The documentation of each
|
||||
option will state the expected type, for
|
||||
<a class="link" href="options.html#opt-programs.emacs.enable" >programs.emacs.enable</a> you will see “Type: boolean”. You
|
||||
there also find information about the default value and a description of
|
||||
the option. You can find the complete option documentation in
|
||||
<a class="link" href="options.html" title="Appendix A. Home Manager Configuration Options" >Home Manager Configuration Options</a> or directly in the terminal by running</p><pre><code class="programlisting shell">man home-configuration.nix
|
||||
</code></pre><p>Once a configuration is successfully built, it can be activated. The
|
||||
activation performs the steps necessary to make the files, programs, and
|
||||
services available in your user environment. The <code class="literal">home-manager switch</code>
|
||||
command performs a combined build and activation.</p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-usage-configuration">Configuration Example</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-rollbacks">Rollbacks</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-dotfiles">Keeping your ~ safe from harm</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-graphical">Graphical services</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-updating">Updating</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-usage-configuration"></a>Configuration Example </h2> </div> </div></div><p>A fresh install of Home Manager will generate a minimal
|
||||
<code class="literal">~/.config/home-manager/home.nix</code> file containing something like</p><pre><code class="programlisting nix">{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home.username = "jdoe";
|
||||
home.homeDirectory = "/home/jdoe";
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
</code></pre><p>You can use this as a base for your further configurations.</p><div class="note"><h3 class="title">Note</h3><p>If you are not very familiar with the Nix language and NixOS modules
|
||||
then it is encouraged to start with small and simple changes. As you
|
||||
learn you can gradually grow the configuration with confidence.</p></div><p>As an example, let us expand the initial configuration file to also
|
||||
install the htop and fortune packages, install Emacs with a few extra
|
||||
packages available, and enable the user gpg-agent service.</p><p>To satisfy the above setup we should elaborate the <code class="literal">home.nix</code> file as
|
||||
follows:</p><pre><code class="programlisting nix">{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home.username = "jdoe";
|
||||
home.homeDirectory = "/home/jdoe";
|
||||
|
||||
# Packages that should be installed to the user profile.
|
||||
home.packages = [
|
||||
pkgs.htop
|
||||
pkgs.fortune
|
||||
];
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
extraPackages = epkgs: [
|
||||
epkgs.nix-mode
|
||||
epkgs.magit
|
||||
];
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 1800;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
}
|
||||
</code></pre><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Nixpkgs packages can be installed to the user profile using
|
||||
<a class="link" href="opt-home.packages" target="_top">???</a>.</p></li><li class="listitem"><p>The option names of a program module typically start with
|
||||
<code class="literal">programs.<package name></code>.</p></li><li class="listitem"><p>Similarly, for a service module, the names start with
|
||||
<code class="literal">services.<package name></code>. Note in some cases a package has both
|
||||
programs <span class="emphasis"><em>and</em></span> service options – Emacs is such an example.</p></li></ul></div><p>To activate this configuration you can run</p><pre><code class="programlisting shell">home-manager switch
|
||||
</code></pre><p>or if you are not feeling so lucky,</p><pre><code class="programlisting shell">home-manager build
|
||||
</code></pre><p>which will create a <code class="literal">result</code> link to a directory containing an
|
||||
activation script and the generated home directory files.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-usage-rollbacks"></a>Rollbacks </h2> </div> </div></div><p>While the <code class="literal">home-manager</code> tool does not explicitly support rollbacks at
|
||||
the moment it is relatively easy to perform one manually. The steps to
|
||||
do so are</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>Run <code class="literal">home-manager generations</code> to determine which generation you
|
||||
wish to rollback to:</p><pre><code class="programlisting shell">$ home-manager generations
|
||||
2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation
|
||||
2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation
|
||||
2018-01-01 12:21 : id 763 -> /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
|
||||
2017-12-29 21:03 : id 762 -> /nix/store/6c0k1r03fxckql4vgqcn9ccb616ynb94-home-manager-generation
|
||||
2017-12-25 18:51 : id 761 -> /nix/store/czc5y6vi1rvnkfv83cs3rn84jarcgsgh-home-manager-generation
|
||||
…
|
||||
</code></pre></li><li class="listitem"><p>Copy the Nix store path of the generation you chose, e.g.,</p><pre><code class="programlisting">/nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
|
||||
</code></pre><p>for generation 763.</p></li><li class="listitem"><p>Run the <code class="literal">activate</code> script inside the copied store path:</p><pre><code class="programlisting shell">$ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate
|
||||
Starting home manager activation
|
||||
…
|
||||
</code></pre></li></ol></div>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-usage-dotfiles"></a>Keeping your ~ safe from harm </h2> </div> </div></div><p>To configure programs and services Home Manager must write various
|
||||
things to your home directory. To prevent overwriting any existing files
|
||||
when switching to a new generation, Home Manager will attempt to detect
|
||||
collisions between existing files and generated files. If any such
|
||||
collision is detected the activation will terminate before changing
|
||||
anything on your computer.</p><p>For example, suppose you have a wonderful, painstakingly created
|
||||
<code class="literal">~/.config/git/config</code> and add</p><pre><code class="programlisting nix">{
|
||||
# …
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Jane Doe";
|
||||
userEmail = "jane.doe@example.org";
|
||||
};
|
||||
|
||||
# …
|
||||
}
|
||||
</code></pre><p>to your configuration. Attempting to switch to the generation will then
|
||||
result in</p><pre><code class="programlisting shell">$ home-manager switch
|
||||
…
|
||||
Activating checkLinkTargets
|
||||
Existing file '/home/jdoe/.config/git/config' is in the way
|
||||
Please move the above files and try again
|
||||
</code></pre>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-usage-graphical"></a>Graphical services </h2> </div> </div></div><p>Home Manager includes a number of services intended to run in a
|
||||
graphical session, for example <code class="literal">xscreensaver</code> and <code class="literal">dunst</code>.
|
||||
Unfortunately, such services will not be started automatically unless
|
||||
you let Home Manager start your X session. That is, you have something
|
||||
like</p><pre><code class="programlisting nix">{
|
||||
# …
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
# …
|
||||
}
|
||||
</code></pre><p>in your system configuration and</p><pre><code class="programlisting nix">{
|
||||
# …
|
||||
|
||||
xsession.enable = true;
|
||||
xsession.windowManager.command = "…";
|
||||
|
||||
# …
|
||||
}
|
||||
</code></pre><p>in your Home Manager configuration.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-updating"></a>Updating </h2> </div> </div></div><p>If you have installed Home Manager using the Nix channel method then
|
||||
updating Home Manager is done by first updating the channel. You can
|
||||
then switch to the updated Home Manager environment.</p><pre><code class="programlisting shell">$ nix-channel --update
|
||||
…
|
||||
unpacking channels...
|
||||
$ home-manager switch
|
||||
</code></pre>
|
||||
</div>
|
||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-nix-flakes"></a>Nix Flakes </h1> </div> </div></div><div class="partintro"><p>Home Manager is compatible with <a class="link" href="https://nixos.wiki/wiki/Flakes" target="_top">Nix
|
||||
Flakes</a>. But please be aware that the
|
||||
support it is still experimental and may change in backwards
|
||||
incompatible ways.</p><p>Just like in the standard installation you can use the Home Manager
|
||||
flake in three ways:</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>Using the standalone <code class="literal">home-manager</code> tool. For platforms other than
|
||||
NixOS and Darwin, this is the only available choice. It is also
|
||||
recommended for people on NixOS or Darwin that want to manage their
|
||||
home directory independently of the system as a whole. See
|
||||
<a class="link" href="index.xhtml#sec-flakes-standalone" title="Standalone setup" >Standalone setup</a> for instructions on how
|
||||
to perform this installation.</p></li><li class="listitem"><p>As a module within a NixOS system configuration. This allows the
|
||||
user profiles to be built together with the system when running
|
||||
<code class="literal">nixos-rebuild</code>. See <a class="link" href="index.xhtml#sec-flakes-nixos-module" title="NixOS module" >NixOS module</a> for a
|
||||
description of this setup.</p></li><li class="listitem"><p>This allows the user profiles to be built together with the system
|
||||
when running <code class="literal">darwin-rebuild</code>. See <a class="link" href="index.xhtml#sec-flakes-nix-darwin-module" title="nix-darwin module" >nix-darwin
|
||||
module</a> for a description of this
|
||||
setup.</p></li></ol></div><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-flakes-prerequisites">Prerequisites</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-standalone">Standalone setup</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nix-darwin-module">nix-darwin module</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-flakes-prerequisites"></a>Prerequisites </h2> </div> </div></div><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Install Nix 2.4 or later, or have it in <code class="literal">nix-shell</code>.</p></li><li class="listitem"><p>Enable experimental features <code class="literal">nix-command</code> and <code class="literal">flakes</code>.</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: circle;"><li class="listitem"><p>When using NixOS, add the following to your <code class="literal">configuration.nix</code>
|
||||
and rebuild your system.</p><pre><code class="programlisting nix">nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
</code></pre></li><li class="listitem"><p>If you are not using NixOS, add the following to <code class="literal">nix.conf</code>
|
||||
(located at <code class="literal">~/.config/nix/</code> or <code class="literal">/etc/nix/nix.conf</code>).</p><pre><code class="programlisting bash">experimental-features = nix-command flakes
|
||||
</code></pre><p>You may need to restart the Nix daemon with, for example,
|
||||
<code class="literal">sudo systemctl restart nix-daemon.service</code>.</p></li><li class="listitem"><p>Alternatively, you can enable flakes on a per-command basis with
|
||||
the following additional flags to <code class="literal">nix</code> and <code class="literal">home-manager</code>:</p><pre><code class="programlisting shell">$ nix --extra-experimental-features "nix-command flakes" <sub-commands>
|
||||
$ home-manager --extra-experimental-features "nix-command flakes" <sub-commands>
|
||||
</code></pre></li></ul></div></li><li class="listitem"><p>Prepare your Home Manager configuration (<code class="literal">home.nix</code>).</p><p>Unlike the channel-based setup, <code class="literal">home.nix</code> will be evaluated when
|
||||
the flake is built, so it must be present before bootstrap of Home
|
||||
Manager from the flake. See <a class="link" href="index.xhtml#sec-usage-configuration" title="Configuration Example" >Configuration Example</a> for
|
||||
introduction about writing a Home Manager configuration.</p></li></ul></div>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-flakes-standalone"></a>Standalone setup </h2> </div> </div></div><p>To prepare an initial Home Manager configuration for your logged in
|
||||
user, you can run the Home Manager <code class="literal">init</code> command directly from its
|
||||
flake.</p><p>For example, if you are using the unstable version of Nixpkgs or NixOS,
|
||||
then to generate and activate a basic configuration run the command</p><pre><code class="programlisting shell">$ nix run home-manager/master -- init --switch
|
||||
</code></pre><p>For Nixpkgs or NixOS version 23.11 run</p><pre><code class="programlisting shell">$ nix run home-manager/release-23.11 -- init --switch
|
||||
</code></pre><p>This will generate a <code class="literal">flake.nix</code> and a <code class="literal">home.nix</code> file in
|
||||
<code class="literal">~/.config/home-manager</code>, creating the directory if it does not exist.</p><p>If you omit the <code class="literal">--switch</code> option then the activation will not happen.
|
||||
This is useful if you want to inspect and edit the configuration before
|
||||
activating it.</p><pre><code class="programlisting shell">$ nix run home-manager/$branch -- init
|
||||
$ # Edit files in ~/.config/home-manager
|
||||
$ nix run home-manager/$branch -- init --switch
|
||||
</code></pre><p>Where <code class="literal">$branch</code> is one of <code class="literal">master</code> or <code class="literal">release-23.11</code>.</p><p>After the initial activation has completed successfully then building
|
||||
and activating your flake-based configuration is as simple as</p><pre><code class="programlisting shell">$ home-manager switch
|
||||
</code></pre><p>It is possible to override the default configuration directory, if you
|
||||
want. For example,</p><pre><code class="programlisting shell">$ nix run home-manager/$branch -- init --switch ~/hmconf
|
||||
$ # And after the initial activation.
|
||||
$ home-manager switch --flake ~/hmconf
|
||||
</code></pre><div class="note"><h3 class="title">Note</h3><p>The flake inputs are not automatically updated by Home Manager. You need
|
||||
to use the standard <code class="literal">nix flake update</code> command for that.</p><p>If you only want to update a single flake input, then the command
|
||||
<code class="literal">nix flake lock --update-input <input></code> can be used.</p><p>You can also pass flake-related options such as <code class="literal">--recreate-lock-file</code>
|
||||
or <code class="literal">--update-input <input></code> to <code class="literal">home-manager</code> when building or
|
||||
switching, and these options will be forwarded to <code class="literal">nix build</code>. See the
|
||||
<a class="link" href="https://nixos.wiki/wiki/Flakes" target="_top">NixOS Wiki page</a> for details.</p></div>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-flakes-nixos-module"></a>NixOS module </h2> </div> </div></div><p>To use Home Manager as a NixOS module, a bare-minimum <code class="literal">flake.nix</code> would
|
||||
be as follows:</p><pre><code class="programlisting nix">{
|
||||
description = "NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, home-manager, ... }: {
|
||||
nixosConfigurations = {
|
||||
hostname = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jdoe = import ./home.nix;
|
||||
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||
# arguments to home.nix
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
</code></pre><p>The Home Manager configuration is then part of the NixOS configuration
|
||||
and is automatically rebuilt with the system when using the appropriate
|
||||
command for the system, such as
|
||||
<code class="literal">nixos-rebuild switch --flake <flake-uri></code>.</p><p>You can use the above <code class="literal">flake.nix</code> as a template in <code class="literal">/etc/nixos</code> by</p><pre><code class="programlisting shell">$ nix flake new /etc/nixos -t github:nix-community/home-manager#nixos
|
||||
</code></pre>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-flakes-nix-darwin-module"></a>nix-darwin module </h2> </div> </div></div><p>The flake-based setup of the Home Manager nix-darwin module is similar
|
||||
to that of NixOS. The <code class="literal">flake.nix</code> would be:</p><pre><code class="programlisting nix">{
|
||||
description = "Darwin configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
darwin.url = "github:lnl7/nix-darwin";
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, home-manager, darwin, ... }: {
|
||||
darwinConfigurations = {
|
||||
hostname = darwin.lib.darwinSystem {
|
||||
system = "x86_64-darwin";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jdoe = import ./home.nix;
|
||||
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||
# arguments to home.nix
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
</code></pre><p>and it is also rebuilt with the nix-darwin generations. The rebuild
|
||||
command here may be <code class="literal">darwin-rebuild switch --flake <flake-uri></code>.</p><p>You can use the above <code class="literal">flake.nix</code> as a template in <code class="literal">~/.config/darwin</code> by</p><pre><code class="programlisting shell">$ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin
|
||||
</code></pre>
|
||||
</div>
|
||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-writing-modules"></a>Writing Home Manager Modules </h1> </div> </div></div><div class="partintro"><p>The module system in Home Manager is based entirely on the NixOS module
|
||||
system so we will here only highlight aspects that are specific for Home
|
||||
Manager. For information about the module system as such please refer to
|
||||
the <a class="link" href="https://nixos.org/nixos/manual/index.html#sec-writing-modules" target="_top">Writing NixOS
|
||||
Modules</a>
|
||||
chapter of the NixOS manual.</p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-option-types">Option Types</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-option-types"></a>Option Types </h2> </div> </div></div><p>Overall the basic option types are the same in Home Manager as NixOS. A
|
||||
few Home Manager options, however, make use of custom types that are
|
||||
worth describing in more detail. These are the option types <code class="literal">dagOf</code> and
|
||||
<code class="literal">gvariant</code> that are used, for example, by
|
||||
<a class="link" href="options.html#opt-programs.ssh.matchBlocks" >programs.ssh.matchBlocks</a> and <a class="link" href="options.html#opt-dconf.settings" >dconf.settings</a>.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><a id="sec-option-types-dag" /><code class="literal">hm.types.dagOf</code></span></dt><dd><p>Options of this type have attribute sets as values where each member
|
||||
is a node in a <a class="link" href="https://en.wikipedia.org/w/index.php?title=Directed_acyclic_graph&oldid=939656095" target="_top">directed acyclic
|
||||
graph</a>
|
||||
(DAG). This allows the attribute set entries to express dependency
|
||||
relations among themselves. This can, for example, be used to
|
||||
control the order of match blocks in a OpenSSH client configuration
|
||||
or the order of activation script blocks in
|
||||
<a class="link" href="options.html#opt-home.activation" >home.activation</a>.</p><p>A number of functions are provided to create DAG nodes. The
|
||||
functions are shown below with examples using an option <code class="literal">foo.bar</code> of
|
||||
type <code class="literal">hm.types.dagOf types.int</code>.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><a id="sec-option-types-dag-entryAnywhere" /><code class="literal">hm.dag.entryAnywhere (value: T) : DagEntry<T></code></span></dt><dd><p>Indicates that <code class="literal">value</code> can be placed anywhere within the DAG.
|
||||
This is also the default for plain attribute set entries, that
|
||||
is</p><pre><code class="programlisting nix">foo.bar = {
|
||||
a = hm.dag.entryAnywhere 0;
|
||||
}
|
||||
</code></pre><p>and</p><pre><code class="programlisting nix">foo.bar = {
|
||||
a = 0;
|
||||
}
|
||||
</code></pre><p>are equivalent.</p></dd><dt><span class="term"><a id="sec-option-types-dag-entryAfter" /><code class="literal">hm.dag.entryAfter (afters: list string) (value: T) : DagEntry<T></code></span></dt><dd><p>Indicates that <code class="literal">value</code> must be placed <span class="emphasis"><em>after</em></span> each of the
|
||||
attribute names in the given list. For example</p><pre><code class="programlisting nix">foo.bar = {
|
||||
a = 0;
|
||||
b = hm.dag.entryAfter [ "a" ] 1;
|
||||
}
|
||||
</code></pre><p>would place <code class="literal">b</code> after <code class="literal">a</code> in the graph.</p></dd><dt><span class="term"><a id="sec-option-types-dag-entryBefore" /><code class="literal">hm.dag.entryBefore (befores: list string) (value: T) : DagEntry<T></code></span></dt><dd><p>Indicates that <code class="literal">value</code> must be placed <span class="emphasis"><em>before</em></span> each of the
|
||||
attribute names in the given list. For example</p><pre><code class="programlisting nix">foo.bar = {
|
||||
b = hm.dag.entryBefore [ "a" ] 1;
|
||||
a = 0;
|
||||
}
|
||||
</code></pre><p>would place <code class="literal">b</code> before <code class="literal">a</code> in the graph.</p></dd><dt><span class="term"><a id="sec-option-types-dag-entryBetween" /><code class="literal">hm.dag.entryBetween (befores: list string) (afters: list string) (value: T) : DagEntry<T></code></span></dt><dd><p>Indicates that <code class="literal">value</code> must be placed <span class="emphasis"><em>before</em></span> the attribute
|
||||
names in the first list and <span class="emphasis"><em>after</em></span> the attribute names in the
|
||||
second list. For example</p><pre><code class="programlisting nix">foo.bar = {
|
||||
a = 0;
|
||||
c = hm.dag.entryBetween [ "b" ] [ "a" ] 2;
|
||||
b = 1;
|
||||
}
|
||||
</code></pre><p>would place <code class="literal">c</code> before <code class="literal">b</code> and after <code class="literal">a</code> in the graph.</p></dd></dl></div><p>There are also a set of functions that generate a DAG from a list.
|
||||
These are convenient when you just want to have a linear list of DAG
|
||||
entries, without having to manually enter the relationship between
|
||||
each entry. Each of these functions take a <code class="literal">tag</code> as argument and the
|
||||
DAG entries will be named <code class="literal">${tag}-${index}</code>.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><a id="sec-option-types-dag-entriesAnywhere" /><code class="literal">hm.dag.entriesAnywhere (tag: string) (values: [T]) : Dag<T></code></span></dt><dd><p>Creates a DAG with the given values with each entry labeled
|
||||
using the given tag. For example</p><pre><code class="programlisting nix">foo.bar = hm.dag.entriesAnywhere "a" [ 0 1 ];
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||
a-0 = 0;
|
||||
a-1 = hm.dag.entryAfter [ "a-0" ] 1;
|
||||
}
|
||||
</code></pre></dd><dt><span class="term"><a id="sec-option-types-dag-entriesAfter" /><code class="literal">hm.dag.entriesAfter (tag: string) (afters: list string) (values: [T]) : Dag<T></code></span></dt><dd><p>Creates a DAG with the given values with each entry labeled
|
||||
using the given tag. The list of values are placed are placed
|
||||
<span class="emphasis"><em>after</em></span> each of the attribute names in <code class="literal">afters</code>. For example</p><pre><code class="programlisting nix">foo.bar =
|
||||
{ b = 0; }
|
||||
// hm.dag.entriesAfter "a" [ "b" ] [ 1 2 ];
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||
b = 0;
|
||||
a-0 = hm.dag.entryAfter [ "b" ] 1;
|
||||
a-1 = hm.dag.entryAfter [ "a-0" ] 2;
|
||||
}
|
||||
</code></pre></dd><dt><span class="term"><a id="sec-option-types-dag-entriesBefore" /><code class="literal">hm.dag.entriesBefore (tag: string) (befores: list string) (values: [T]) : Dag<T></code></span></dt><dd><p>Creates a DAG with the given values with each entry labeled
|
||||
using the given tag. The list of values are placed <span class="emphasis"><em>before</em></span> each
|
||||
of the attribute names in <code class="literal">befores</code>. For example</p><pre><code class="programlisting nix">foo.bar =
|
||||
{ b = 0; }
|
||||
// hm.dag.entriesBefore "a" [ "b" ] [ 1 2 ];
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||
b = 0;
|
||||
a-0 = 1;
|
||||
a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2;
|
||||
}
|
||||
</code></pre></dd><dt><span class="term"><a id="sec-option-types-dag-entriesBetween" /><code class="literal">hm.dag.entriesBetween (tag: string) (befores: list string) (afters: list string) (values: [T]) : Dag<T></code></span></dt><dd><p>Creates a DAG with the given values with each entry labeled
|
||||
using the given tag. The list of values are placed <span class="emphasis"><em>before</em></span> each
|
||||
of the attribute names in <code class="literal">befores</code> and <span class="emphasis"><em>after</em></span> each of the
|
||||
attribute names in <code class="literal">afters</code>. For example</p><pre><code class="programlisting nix">foo.bar =
|
||||
{ b = 0; c = 3; }
|
||||
// hm.dag.entriesBetween "a" [ "b" ] [ "c" ] [ 1 2 ];
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = {
|
||||
b = 0;
|
||||
c = 3;
|
||||
a-0 = hm.dag.entryAfter [ "c" ] 1;
|
||||
a-1 = hm.dag.entryBetween [ "b" ] [ "a-0" ] 2;
|
||||
}
|
||||
</code></pre></dd></dl></div></dd><dt><span class="term"><a id="sec-option-types-gvariant" /><code class="literal">hm.types.gvariant</code></span></dt><dd><p>This type is useful for options representing
|
||||
<a class="link" href="https://docs.gtk.org/glib/struct.Variant.html#description" target="_top">GVariant</a>
|
||||
values. The type accepts all primitive GVariant types as well as
|
||||
arrays, tuples, “maybe” types, and dictionaries.</p><p>Some Nix values are automatically coerced to matching GVariant value
|
||||
but the GVariant model is richer so you may need to use one of the
|
||||
provided constructor functions. Examples assume an option <code class="literal">foo.bar</code>
|
||||
of type <code class="literal">hm.types.gvariant</code>.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><a id="sec-option-types-gvariant-mkBoolean" /><code class="literal">hm.gvariant.mkBoolean (v: bool)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">boolean</code> value (GVariant
|
||||
format string <code class="literal">b</code>). Note, Nix booleans are automatically coerced
|
||||
using this function. That is,</p><pre><code class="programlisting nix">foo.bar = hm.gvariant.mkBoolean true;
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = true;
|
||||
</code></pre></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkString" /><code class="literal">hm.gvariant.mkString (v: string)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">string</code> value (GVariant
|
||||
format string <code class="literal">s</code>). Note, Nix strings are automatically coerced
|
||||
using this function. That is,</p><pre><code class="programlisting nix">foo.bar = hm.gvariant.mkString "a string";
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = "a string";
|
||||
</code></pre></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkObjectpath" /><code class="literal">hm.gvariant.mkObjectpath (v: string)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">objectpath</code> value (GVariant
|
||||
format string <code class="literal">o</code>).</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkUchar" /><code class="literal">hm.gvariant.mkUchar (v: string)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">uchar</code> value (GVariant
|
||||
format string <code class="literal">y</code>).</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkInt16" /><code class="literal">hm.gvariant.mkInt16 (v: int)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">int16</code> value (GVariant
|
||||
format string <code class="literal">n</code>).</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkUint16" /><code class="literal">hm.gvariant.mkUint16 (v: int)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">uint16</code> value (GVariant
|
||||
format string <code class="literal">q</code>).</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkInt32" /><code class="literal">hm.gvariant.mkInt32 (v: int)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">int32</code> value (GVariant
|
||||
format string <code class="literal">i</code>). Note, Nix integers are automatically coerced
|
||||
using this function. That is,</p><pre><code class="programlisting nix">foo.bar = hm.gvariant.mkInt32 7;
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = 7;
|
||||
</code></pre></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkUint32" /><code class="literal">hm.gvariant.mkUint32 (v: int)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">uint32</code> value (GVariant
|
||||
format string <code class="literal">u</code>).</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkInt64" /><code class="literal">hm.gvariant.mkInt64 (v: int)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">int64</code> value (GVariant
|
||||
format string <code class="literal">x</code>).</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkUint64" /><code class="literal">hm.gvariant.mkUint64 (v: int)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">uint64</code> value (GVariant
|
||||
format string <code class="literal">t</code>).</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkDouble" /><code class="literal">hm.gvariant.mkDouble (v: double)</code></span></dt><dd><p>Takes a Nix value <code class="literal">v</code> to a GVariant <code class="literal">double</code> value (GVariant
|
||||
format string <code class="literal">d</code>). Note, Nix floats are automatically coerced
|
||||
using this function. That is,</p><pre><code class="programlisting nix">foo.bar = hm.gvariant.mkDouble 3.14;
|
||||
</code></pre><p>is equivalent to</p><pre><code class="programlisting nix">foo.bar = 3.14;
|
||||
</code></pre></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkArray" /><code class="literal">hm.gvariant.mkArray type elements</code></span></dt><dd><p>Builds a GVariant array containing the given list of elements,
|
||||
where each element is a GVariant value of the given type
|
||||
(GVariant format string <code class="literal">a${type}</code>). The <code class="literal">type</code> value can be
|
||||
constructed using</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p><code class="literal">hm.gvariant.type.string</code> (GVariant format string <code class="literal">s</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.boolean</code> (GVariant format string <code class="literal">b</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.uchar</code> (GVariant format string <code class="literal">y</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.int16</code> (GVariant format string <code class="literal">n</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.uint16</code> (GVariant format string <code class="literal">q</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.int32</code> (GVariant format string <code class="literal">i</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.uint32</code> (GVariant format string <code class="literal">u</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.int64</code> (GVariant format string <code class="literal">x</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.uint64</code> (GVariant format string <code class="literal">t</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.double</code> (GVariant format string <code class="literal">d</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.variant</code> (GVariant format string <code class="literal">v</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.arrayOf type</code> (GVariant format string
|
||||
<code class="literal">a${type}</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.maybeOf type</code> (GVariant format string
|
||||
<code class="literal">m${type}</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.tupleOf types</code> (GVariant format string
|
||||
<code class="literal">(${lib.concatStrings types})</code>)</p></li><li class="listitem"><p><code class="literal">hm.gvariant.type.dictionaryEntryOf [keyType valueType]</code>
|
||||
(GVariant format string <code class="literal">{${keyType}${valueType}}</code>)</p></li></ul></div><p>where <code class="literal">type</code> and <code class="literal">types</code> are themselves a type and list of
|
||||
types, respectively.</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkEmptyArray" /><code class="literal">hm.gvariant.mkEmptyArray type</code></span></dt><dd><p>An alias of
|
||||
<a class="link" href="index.xhtml#sec-option-types-gvariant-mkArray" ><code class="literal">hm.gvariant.mkArray type []</code></a>.</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkNothing" /><code class="literal">hm.gvariant.mkNothing type</code></span></dt><dd><p>Builds a GVariant maybe value (GVariant format string
|
||||
<code class="literal">m${type}</code>) whose (non-existent) element is of the given type.
|
||||
The <code class="literal">type</code> value is constructed as described for the
|
||||
<a class="link" href="index.xhtml#sec-option-types-gvariant-mkArray" ><code class="literal">mkArray</code></a> function above.</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkJust" /><code class="literal">hm.gvariant.mkJust element</code></span></dt><dd><p>Builds a GVariant maybe value (GVariant format string
|
||||
<code class="literal">m${element.type}</code>) containing the given GVariant element.</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkTuple" /><code class="literal">hm.gvariant.mkTuple elements</code></span></dt><dd><p>Builds a GVariant tuple containing the given list of elements,
|
||||
where each element is a GVariant value.</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkVariant" /><code class="literal">hm.gvariant.mkVariant element</code></span></dt><dd><p>Builds a GVariant variant (GVariant format string <code class="literal">v</code>) which
|
||||
contains the value of a GVariant element.</p></dd><dt><span class="term"><a id="sec-option-types-gvariant-mkDictionaryEntry" /><code class="literal">hm.gvariant.mkDictionaryEntry [key value]</code></span></dt><dd><p>Builds a GVariant dictionary entry containing the given list of
|
||||
elements (GVariant format string <code class="literal">{${key.type}${value.type}}</code>),
|
||||
where each element is a GVariant value.</p></dd></dl></div></dd></dl></div>
|
||||
</div>
|
||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-contributing"></a>Contributing </h1> </div> </div></div><div class="partintro"><p>Contributions to Home Manager are very welcome. To make the process as
|
||||
smooth as possible for both you and the Home Manager maintainers we
|
||||
provide some guidelines that we ask you to follow. See <a class="link" href="index.xhtml#sec-contrib-getting-started" title="Getting started" >Getting
|
||||
started</a> for information on how to set up
|
||||
a suitable development environment and <a class="link" href="index.xhtml#sec-guidelines" title="Guidelines" >Guidelines</a> for
|
||||
the actual guidelines.</p><p>This text is mainly directed at those who would like to make code
|
||||
contributions to Home Manager. If you just want to report a bug then
|
||||
first look among the already <a class="link" href="https://github.com/nix-community/home-manager/issues" target="_top">open
|
||||
issues</a>, if you
|
||||
find one matching yours then feel free to comment on it to add any
|
||||
additional information you may have. If no matching issue exists then go
|
||||
to the <a class="link" href="https://github.com/nix-community/home-manager/issues/new" target="_top">new
|
||||
issue</a> page
|
||||
and write a description of your problem. Include as much information as
|
||||
you can, ideally also include relevant excerpts from your Home Manager
|
||||
configuration.</p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-news">News</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-tests">Tests</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-contrib-getting-started"></a>Getting started </h2> </div> </div></div><p>If you have not previously forked Home Manager then you need to do that
|
||||
first. Have a look at GitHub’s <a class="link" href="https://help.github.com/articles/fork-a-repo/" target="_top">Fork a
|
||||
repo</a> for instructions on
|
||||
how to do this.</p><p>Once you have a fork of Home Manager you should create a branch starting
|
||||
at the most recent <code class="literal">master</code> branch. Give your branch a reasonably
|
||||
descriptive name. Commit your changes to this branch and when you are
|
||||
happy with the result and it fulfills <a class="link" href="index.xhtml#sec-guidelines" title="Guidelines" >Guidelines</a> then
|
||||
push the branch to GitHub and <a class="link" href="https://help.github.com/articles/creating-a-pull-request/" target="_top">create a pull
|
||||
request</a>.</p><p>Assuming your clone is at <code class="literal">$HOME/devel/home-manager</code> then you can make
|
||||
the <code class="literal">home-manager</code> command use it by either</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>overriding the default path by using the <code class="literal">-I</code> command line option:</p><pre><code class="programlisting shell">$ home-manager -I home-manager=$HOME/devel/home-manager
|
||||
</code></pre><p>or, if using <a class="link" href="index.xhtml#sec-flakes-standalone" title="Standalone setup" >flakes</a>:</p><pre><code class="programlisting shell">$ home-manager --override-input home-manager ~/devel/home-manager
|
||||
</code></pre><p>or</p></li><li class="listitem"><p>changing the default path by ensuring your configuration includes</p><pre><code class="programlisting nix">programs.home-manager.enable = true;
|
||||
programs.home-manager.path = "$HOME/devel/home-manager";
|
||||
</code></pre><p>and running <code class="literal">home-manager switch</code> to activate the change.
|
||||
Afterwards, <code class="literal">home-manager build</code> and <code class="literal">home-manager switch</code> will use
|
||||
your cloned repository.</p></li></ol></div><p>The first option is good if you only temporarily want to use your clone.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-guidelines"></a>Guidelines </h2> </div> </div></div><div class="toc"> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-guidelines-back-compat">Maintain backward compatibility</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-forward-compat">Keep forward compatibility in mind</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-valuable-options">Add only valuable options</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-add-tests">Add relevant tests</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-module-maintainer">Add relevant documentation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_add_yourself_as_a_module_maintainer">Add yourself as a module maintainer</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-code-style">Format your code</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-commit-message-style">Format your commit messages</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-news-style">Format your news entries</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-conditional-modules">Use conditional modules and news</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines-licensing">Mind the license</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-commit-style">Commits</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#ex-commit-message">Example commit</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-code-style">Code Style</a> </span></dt> </dl></div><p>If your contribution satisfy the following rules then there is a good
|
||||
chance it will be merged without too much trouble. The rules are
|
||||
enforced by the Home Manager maintainers and to a lesser extent the Home
|
||||
Manager CI system.</p><p>If you are uncertain how these rules affect the change you would like to
|
||||
make then feel free to start a discussion in the
|
||||
<a class="link" href="https://webchat.oftc.net/?channels=home-manager" target="_top">#home-manager</a> IRC
|
||||
channel, ideally before you start developing.</p><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-back-compat"></a>Maintain backward compatibility </h3> </div> </div></div><p>Your contribution should not cause another user’s existing configuration
|
||||
to break unless there is a very good reason and the change should be
|
||||
announced to the user through an
|
||||
<a class="link" href="https://nixos.org/manual/nixos/stable/index.html#sec-assertions" target="_top">assertion</a>
|
||||
or similar.</p><p>Remember that Home Manager is used in many different environments and
|
||||
you should consider how your change may effect others. For example,</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Does your change work for people that do not use NixOS? Consider
|
||||
other GNU/Linux distributions and macOS.</p></li><li class="listitem"><p>Does your change work for people whose configuration is built on one
|
||||
system and deployed on another system?</p></li></ul></div>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-forward-compat"></a>Keep forward compatibility in mind </h3> </div> </div></div><p>The master branch of Home Manager tracks the unstable channel of
|
||||
Nixpkgs, which may update package versions at any time. It is therefore
|
||||
important to consider how a package update may affect your code and try
|
||||
to reduce the risk of breakage.</p><p>The most effective way to reduce this risk is to follow the advice in
|
||||
<a class="link" href="index.xhtml#sec-guidelines-valuable-options" title="Add only valuable options" >Add only valuable options</a>.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-valuable-options"></a>Add only valuable options </h3> </div> </div></div><p>When creating a new module it is tempting to include every option
|
||||
supported by the software. This is <span class="emphasis"><em>strongly</em></span> discouraged. Providing
|
||||
many options increases maintenance burden and risk of breakage
|
||||
considerably. This is why only the most <a class="link" href="https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md#valuable-options" target="_top">important software
|
||||
options</a>
|
||||
should be modeled explicitly. Less important options should be
|
||||
expressible through an <code class="literal">extraConfig</code> escape hatch.</p><p>A good rule of thumb for the first implementation of a module is to only
|
||||
add explicit options for those settings that absolutely must be set for
|
||||
the software to function correctly. It follows that a module for
|
||||
software that provides sensible default values for all settings would
|
||||
require no explicit options at all.</p><p>If the software uses a structured configuration format like a JSON,
|
||||
YAML, INI, TOML, or even a plain list of key/value pairs then consider
|
||||
using a <code class="literal">settings</code> option as described in <a class="link" href="https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md" target="_top">Nix RFC
|
||||
42</a>.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-add-tests"></a>Add relevant tests </h3> </div> </div></div><p>If at all possible, make sure to add new tests and expand existing tests
|
||||
so that your change will keep working in the future. See
|
||||
<a class="link" href="index.xhtml#sec-tests" title="Tests" >Tests</a> for more information about the Home Manager test
|
||||
suite.</p><p>All contributed code <span class="emphasis"><em>must</em></span> pass the test suite.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-module-maintainer"></a>Add relevant documentation </h3> </div> </div></div><p>Many code changes require changing the documentation as well. Module
|
||||
options should be documented with <a class="link" href="https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup" target="_top">Nixpkgs-flavoured
|
||||
Markdown</a>.
|
||||
Home Manager is itself documented using a combination of
|
||||
<a class="link" href="https://tdg.docbook.org/" target="_top">DocBook</a> and
|
||||
<a class="link" href="https://asciidoc.org/" target="_top">AsciiDoc</a>. All text is hosted in Home Manager’s
|
||||
Git repository.</p><p>The HTML version of the manual containing both the module option
|
||||
descriptions and the documentation of Home Manager can be generated and
|
||||
opened by typing the following in a shell within a clone of the Home
|
||||
Manager Git repository:</p><pre><code class="programlisting shell">$ nix-build -A docs.html
|
||||
$ xdg-open ./result/share/doc/home-manager/index.html
|
||||
</code></pre><p>When you have made changes to a module, it is a good idea to check that
|
||||
the man page version of the module options looks good:</p><pre><code class="programlisting shell">$ nix-build -A docs.manPages
|
||||
$ man ./result/share/man/man5/home-configuration.nix.5.gz
|
||||
</code></pre>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="_add_yourself_as_a_module_maintainer"></a>Add yourself as a module maintainer </h3> </div> </div></div><p>Every new module <span class="emphasis"><em>must</em></span> include a named maintainer using the
|
||||
<code class="literal">meta.maintainers</code> attribute. If you are a user of a module that
|
||||
currently lacks a maintainer then please consider adopting it.</p><p>If you are present in the nixpkgs maintainer list then you can use that
|
||||
entry. If you are not then you can add yourself to
|
||||
<code class="literal">modules/lib/maintainers.nix</code> in the Home Manager project.</p><p>Maintainers are encouraged to join the IRC or Matrix channel and
|
||||
participate when they have opportunity.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-code-style"></a>Format your code </h3> </div> </div></div><p>Make sure your code is formatted as described in <a class="link" href="index.xhtml#sec-code-style" title="Code Style" >Code
|
||||
Style</a>. To maintain consistency throughout the project
|
||||
you are encouraged to browse through existing code and adopt its style
|
||||
also in new code.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-commit-message-style"></a>Format your commit messages </h3> </div> </div></div><p>Similar to <a class="link" href="index.xhtml#sec-guidelines-code-style" title="Format your code" >Format your code</a> we encourage a
|
||||
consistent commit message format as described in
|
||||
<a class="link" href="index.xhtml#sec-commit-style" title="Commits" >Commits</a>.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-news-style"></a>Format your news entries </h3> </div> </div></div><p>If your contribution includes a change that should be communicated to
|
||||
users of Home Manager then you can add a news entry. The entry must be
|
||||
formatted as described in <a class="link" href="index.xhtml#sec-news" title="News" >News</a>.</p><p>When new modules are added a news entry should be included but you do
|
||||
not need to create this entry manually. The merging maintainer will
|
||||
create the entry for you. This is to reduce the risk of merge conflicts.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-conditional-modules"></a>Use conditional modules and news </h3> </div> </div></div><p>Home Manager includes a number of modules that are only usable on some
|
||||
of the supported platforms. The most common example of platform specific
|
||||
modules are those that define systemd user services, which only works on
|
||||
Linux systems.</p><p>If you add a module that is platform specific then make sure to include
|
||||
a condition in the <code class="literal">loadModule</code> function call. This will make the module
|
||||
accessible only on systems where the condition evaluates to <code class="literal">true</code>.</p><p>Similarly, if you are adding a news entry then it should be shown only
|
||||
to users that may find it relevant, see <a class="link" href="index.xhtml#sec-news" title="News" >News</a> for a
|
||||
description of conditional news.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-guidelines-licensing"></a>Mind the license </h3> </div> </div></div><p>The Home Manager project is covered by the MIT license and we can only
|
||||
accept contributions that fall under this license, or are licensed in a
|
||||
compatible way. When you contribute self written code and documentation
|
||||
it is assumed that you are doing so under the MIT license.</p><p>A potential gotcha with respect to licensing are option descriptions.
|
||||
Often it is convenient to copy from the upstream software documentation.
|
||||
When this is done it is important to verify that the license of the
|
||||
upstream documentation allows redistribution under the terms of the MIT
|
||||
license.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-commit-style"></a>Commits </h3> </div> </div></div><p>The commits in your pull request should be reasonably self-contained,
|
||||
that is, each commit should make sense in isolation. In particular, you
|
||||
will be asked to amend any commit that introduces syntax errors or
|
||||
similar problems even if they are fixed in a later commit.</p><p>The commit messages should follow the <a class="link" href="https://chris.beams.io/posts/git-commit/#seven-rules" target="_top">seven
|
||||
rules</a>, except for
|
||||
"Capitalize the subject line". We also ask you to include the affected
|
||||
code component or module in the first line. That is, a commit message
|
||||
should follow the template</p><pre><code class="programlisting">{component}: {description}
|
||||
|
||||
{long description}
|
||||
</code></pre><p>where <code class="literal">{component}</code> refers to the code component (or module) your change
|
||||
affects, <code class="literal">{description}</code> is a very brief description of your change, and
|
||||
<code class="literal">{long description}</code> is an optional clarifying description. As a rare
|
||||
exception, if there is no clear component, or your change affects many
|
||||
components, then the <code class="literal">{component}</code> part is optional. See
|
||||
<a class="link" href="index.xhtml#ex-commit-message" title="Example commit" >example_title</a> for a commit message that fulfills
|
||||
these requirements.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="ex-commit-message"></a>Example commit </h3> </div> </div></div><p>The commit
|
||||
<a class="link" href="https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef" target="_top">69f8e47e9e74c8d3d060ca22e18246b7f7d988ef</a>
|
||||
contains the commit message</p><pre><code class="programlisting">
|
||||
starship: allow running in Emacs if vterm is used
|
||||
|
||||
The vterm buffer is backed by libvterm and can handle Starship prompts
|
||||
without issues.
|
||||
</code></pre><p>which ticks all the boxes necessary to be accepted in Home Manager.</p><p>Finally, when adding a new module, say <code class="literal">programs/foo.nix</code>, we use the
|
||||
fixed commit format <code class="literal">foo: add module</code>. You can, of course, still include
|
||||
a long description if you wish.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h3 class="title" > <a id="sec-code-style"></a>Code Style </h3> </div> </div></div><p>The code in Home Manager is formatted by the
|
||||
<a class="link" href="https://github.com/serokell/nixfmt/" target="_top">nixfmt</a> tool and the formatting is
|
||||
checked in the pull request tests. Run the <code class="literal">format</code> tool inside the
|
||||
project repository before submitting your pull request.</p><p>Keep lines at a reasonable width, ideally 80 characters or less. This
|
||||
also applies to string literals.</p><p>We prefer <code class="literal">lowerCamelCase</code> for variable and attribute names with the
|
||||
accepted exception of variables directly referencing packages in Nixpkgs
|
||||
which use a hyphenated style. For example, the Home Manager option
|
||||
<code class="literal">services.gpg-agent.enableSshSupport</code> references the <code class="literal">gpg-agent</code> package
|
||||
in Nixpkgs.</p>
|
||||
</div>
|
||||
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-news"></a>News </h2> </div> </div></div><p>Home Manager includes a system for presenting news to the user. When
|
||||
making a change you, therefore, have the option to also include an
|
||||
associated news entry. In general, a news entry should only be added for
|
||||
truly noteworthy news. For example, a bug fix or new option does
|
||||
generally not need a news entry.</p><p>If you do have a change worthy of a news entry then please add one in
|
||||
<a class="link" href="https://github.com/nix-community/home-manager/blob/master/modules/misc/news.nix" target="_top"><code class="literal">news.nix</code></a>
|
||||
but you should follow some basic guidelines:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>The entry timestamp should be in ISO-8601 format having "+00:00"
|
||||
as time zone. For example, "2017-09-13T17:10:14+00:00". A suitable
|
||||
timestamp can be produced by the command</p><pre><code class="programlisting shell">$ date --iso-8601=second --universal
|
||||
</code></pre></li><li class="listitem"><p>The entry condition should be as specific as possible. For example,
|
||||
if you are changing or deprecating a specific option then you could
|
||||
restrict the news to those users who actually use this option.</p></li><li class="listitem"><p>Wrap the news message so that it will fit in the typical terminal,
|
||||
that is, at most 80 characters wide. Ideally a bit less.</p></li><li class="listitem"><p>Unlike commit messages, news will be read without any connection to
|
||||
the Home Manager source code. It is therefore important to make the
|
||||
message understandable in isolation and to those who do not have
|
||||
knowledge of the Home Manager internals. To this end it should be
|
||||
written in more descriptive, prose like way.</p></li><li class="listitem"><p>If you refer to an option then write its full attribute path. That
|
||||
is, instead of writing</p><pre><code class="programlisting">The option 'foo' has been deprecated, please use 'bar' instead.
|
||||
</code></pre><p>it should read</p><pre><code class="programlisting">The option 'services.myservice.foo' has been deprecated, please
|
||||
use 'services.myservice.bar' instead.
|
||||
</code></pre></li><li class="listitem"><p>A new module, say <code class="literal">foo.nix</code>, should always include a news entry that
|
||||
has a message along the lines of</p><pre><code class="programlisting">A new module is available: 'services.foo'.
|
||||
</code></pre><p>If the module is platform specific, e.g., a service module using
|
||||
systemd, then a condition like</p><pre><code class="programlisting nix">condition = hostPlatform.isLinux;
|
||||
</code></pre><p>should be added. If you contribute a module then you don’t need to
|
||||
add this entry, the merger will create an entry for you.</p></li></ul></div>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-tests"></a>Tests </h2> </div> </div></div><p>Home Manager includes a basic test suite and it is highly recommended to
|
||||
include at least one test when adding a module. Tests are typically in
|
||||
the form of "golden tests" where, for example, a generated
|
||||
configuration file is compared to a known correct file.</p><p>It is relatively easy to create tests by modeling the existing tests,
|
||||
found in the <code class="literal">tests</code> project directory. For a full reference to the
|
||||
functions available in test scripts, you can look at NMT’s
|
||||
<a class="link" href="https://git.sr.ht/~rycee/nmt/tree/master/item/bash-lib" target="_top">bash-lib</a>.</p><p>The full Home Manager test suite can be run by executing</p><pre><code class="programlisting shell">$ nix-shell --pure tests -A run.all
|
||||
</code></pre><p>in the project root. List all test cases through</p><pre><code class="programlisting shell">$ nix-shell --pure tests -A list
|
||||
</code></pre><p>and run an individual test, for example <code class="literal">alacritty-empty-settings</code>,
|
||||
through</p><pre><code class="programlisting shell">$ nix-shell --pure tests -A run.alacritty-empty-settings
|
||||
</code></pre><p>However, those invocations will impurely source the system’s nixpkgs,
|
||||
and may cause failures. To run against the nixpkgs from the flake.lock,
|
||||
use instead e.g.</p><pre><code class="programlisting shell">$ nix develop --ignore-environment .#all
|
||||
</code></pre>
|
||||
</div>
|
||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-3rd-party"></a>Third-Party Tools and Extensions </h1> </div> </div></div><div class="partintro"><p>Here is a collection of tools and extensions that relate to Home
|
||||
Manager. Note, these are maintained outside the regular Home Manager
|
||||
flow so quality and support may vary wildly. If you encounter problems
|
||||
then please raise them in the corresponding project, not as issues in
|
||||
the Home Manager tracker.</p><p>If you have made something interesting related to Home Manager then you
|
||||
are encouraged to create a PR that expands this chapter.</p><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#sec-3rd-party-module-collections">Module Collections</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="sec-3rd-party-module-collections"></a>Module Collections </h2> </div> </div></div><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p><a class="link" href="https://github.com/schuelermine/xhmm" target="_top">xhmm — extra Home Manager
|
||||
modules</a></p><p>A collection of modules maintained by Anselm Schüler.</p></li><li class="listitem"><p><a class="link" href="https://github.com/danth/stylix/" target="_top">Stylix — System-wide colorscheming and
|
||||
typography</a></p><p>Configure your applications to get coherent color scheme and font.</p></li></ul></div>
|
||||
</div>
|
||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-faq"></a>Frequently Asked Questions (FAQ) </h1> </div> </div></div><div class="partintro"><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#_why_is_there_a_collision_error_when_switching_generation">Why is there a collision error when switching generation?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_are_the_session_variables_not_set">Why are the session variables not set?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_to_set_up_a_configuration_for_multiple_users_machines">How to set up a configuration for multiple users/machines?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal">Why do I get an error message about <code class="literal">ca.desrt.dconf</code> or <code class="literal">dconf.service</code>?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_install_packages_from_nixpkgs_unstable">How do I install packages from Nixpkgs unstable?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_override_the_package_used_by_a_module">How do I override the package used by a module?</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_why_is_there_a_collision_error_when_switching_generation"></a>Why is there a collision error when switching generation? </h2> </div> </div></div><p>Home Manager currently installs packages into the user environment,
|
||||
precisely as if the packages were installed through <code class="literal">nix-env --install</code>.
|
||||
This means that you will get a collision error if your Home Manager
|
||||
configuration attempts to install a package that you already have
|
||||
installed manually, that is, packages that shows up when you run
|
||||
<code class="literal">nix-env --query</code>.</p><p>For example, imagine you have the <code class="literal">hello</code> package installed in your
|
||||
environment</p><pre><code class="programlisting shell">$ nix-env --query
|
||||
hello-2.10
|
||||
</code></pre><p>and your Home Manager configuration contains</p><pre><code class="programlisting nix">home.packages = [ pkgs.hello ];
|
||||
</code></pre><p>Then attempting to switch to this configuration will result in an error
|
||||
similar to</p><pre><code class="programlisting shell">$ home-manager switch
|
||||
these derivations will be built:
|
||||
/nix/store/xg69wsnd1rp8xgs9qfsjal017nf0ldhm-home-manager-path.drv
|
||||
[…]
|
||||
Activating installPackages
|
||||
replacing old ‘home-manager-path’
|
||||
installing ‘home-manager-path’
|
||||
building path(s) ‘/nix/store/b5c0asjz9f06l52l9812w6k39ifr49jj-user-environment’
|
||||
Wide character in die at /nix/store/64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79.
|
||||
collision between ‘/nix/store/fmwa4axzghz11cnln5absh31nbhs9lq1-home-manager-path/bin/hello’ and ‘/nix/store/c2wyl8b9p4afivpcz8jplc9kis8rj36d-hello-2.10/bin/hello’; use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of one of the conflicting packages
|
||||
builder for ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed with exit code 2
|
||||
error: build of ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed
|
||||
</code></pre><p>The solution is typically to uninstall the package from the environment
|
||||
using <code class="literal">nix-env --uninstall</code> and reattempt the Home Manager generation
|
||||
switch.</p><p>You could also opt to unistall <span class="emphasis"><em>all</em></span> of the packages from your profile
|
||||
with <code class="literal">nix-env --uninstall '*'</code>.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_why_are_the_session_variables_not_set"></a>Why are the session variables not set? </h2> </div> </div></div><p>Home Manager is only able to set session variables automatically if it
|
||||
manages your Bash, Z shell, or fish shell configuration. To enable such
|
||||
management you use <a class="link" href="options.html#opt-programs.bash.enable" >programs.bash.enable</a>,
|
||||
<a class="link" href="options.html#opt-programs.zsh.enable" >programs.zsh.enable</a>, or <a class="link" href="options.html#opt-programs.fish.enable" >programs.fish.enable</a>.</p><p>If you don’t want to let Home Manager manage your shell then you will
|
||||
have to manually source the
|
||||
<code class="literal">~/.nix-profile/etc/profile.d/hm-session-vars.sh</code> file in an appropriate
|
||||
way. In Bash and Z shell this can be done by adding</p><pre><code class="programlisting bash">. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
</code></pre><p>to your <code class="literal">.profile</code> and <code class="literal">.zshrc</code> files, respectively. The
|
||||
<code class="literal">hm-session-vars.sh</code> file should work in most Bourne-like shells. For
|
||||
fish shell, it is possible to source it using <a class="link" href="https://github.com/oh-my-fish/plugin-foreign-env" target="_top">the foreign-env
|
||||
plugin</a></p><pre><code class="programlisting bash">fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" > /dev/null
|
||||
</code></pre>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_how_to_set_up_a_configuration_for_multiple_users_machines"></a>How to set up a configuration for multiple users/machines? </h2> </div> </div></div><p>A typical way to prepare a repository of configurations for multiple
|
||||
logins and machines is to prepare one "top-level" file for each unique
|
||||
combination.</p><p>For example, if you have two machines, called "kronos" and "rhea" on
|
||||
which you want to configure your user "jane" then you could create the
|
||||
files</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p><code class="literal">kronos-jane.nix</code>,</p></li><li class="listitem"><p><code class="literal">rhea-jane.nix</code>, and</p></li><li class="listitem"><p><code class="literal">common.nix</code></p></li></ul></div><p>in your repository. On the kronos and rhea machines you can then make
|
||||
<code class="literal">~jane/.config/home-manager/home.nix</code> be a symbolic link to the
|
||||
corresponding file in your configuration repository.</p><p>The <code class="literal">kronos-jane.nix</code> and <code class="literal">rhea-jane.nix</code> files follow the format</p><pre><code class="programlisting nix">{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ];
|
||||
|
||||
# Various options that are specific for this machine/user.
|
||||
}
|
||||
</code></pre><p>while the <code class="literal">common.nix</code> file contains configuration shared across the two
|
||||
logins. Of course, instead of just a single <code class="literal">common.nix</code> file you can
|
||||
have multiple ones, even one per program or service.</p><p>You can get some inspiration from the <a class="link" href="https://www.reddit.com/r/NixOS/comments/9bb9h9/post_your_homemanager_homenix_file/" target="_top">Post your home-manager home.nix
|
||||
file!</a>
|
||||
Reddit thread.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal"></a>Why do I get an error message about <code class="literal">ca.desrt.dconf</code> or <code class="literal">dconf.service</code>? </h2> </div> </div></div><p>You are most likely trying to configure something that uses dconf but
|
||||
the DBus session is not aware of the dconf service. The full error you
|
||||
might get is</p><pre><code class="programlisting">error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files
|
||||
</code></pre><p>or</p><pre><code class="programlisting">error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dconf.service not found.
|
||||
</code></pre><p>The solution on NixOS is to add</p><pre><code class="programlisting nix">programs.dconf.enable = true;
|
||||
</code></pre><p>to your system configuration.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_how_do_i_install_packages_from_nixpkgs_unstable"></a>How do I install packages from Nixpkgs unstable? </h2> </div> </div></div><p>If you are using a stable version of Nixpkgs but would like to install
|
||||
some particular packages from Nixpkgs unstable – or some other channel
|
||||
– then you can import the unstable Nixpkgs and refer to its packages
|
||||
within your configuration. Something like</p><pre><code class="programlisting nix">{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
|
||||
pkgsUnstable = import <nixpkgs-unstable> {};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
pkgsUnstable.foo
|
||||
];
|
||||
|
||||
# …
|
||||
}
|
||||
</code></pre><p>should work provided you have a Nix channel called <code class="literal">nixpkgs-unstable</code>.</p><p>You can add the <code class="literal">nixpkgs-unstable</code> channel by running</p><pre><code class="programlisting shell">$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
|
||||
$ nix-channel --update
|
||||
</code></pre><p>Note, the package will not be affected by any package overrides,
|
||||
overlays, etc.</p>
|
||||
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_how_do_i_override_the_package_used_by_a_module"></a>How do I override the package used by a module? </h2> </div> </div></div><p>By default Home Manager will install the package provided by your chosen
|
||||
<code class="literal">nixpkgs</code> channel but occasionally you might end up needing to change
|
||||
this package. This can typically be done in two ways.</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>If the module provides a <code class="literal">package</code> option, such as
|
||||
<code class="literal">programs.beets.package</code>, then this is the recommended way to
|
||||
perform the override. For example,</p><pre><code class="programlisting nix">programs.beets.package = pkgs.beets.override { enableCheck = true; };
|
||||
</code></pre></li><li class="listitem"><p>If no <code class="literal">package</code> option is available then you can typically override
|
||||
the relevant package using an
|
||||
<a class="link" href="https://nixos.org/nixpkgs/manual/#chap-overlays" target="_top">overlay</a>.</p><p>For example, if you want to use the <code class="literal">programs.skim</code> module but use
|
||||
the <code class="literal">skim</code> package from Nixpkgs unstable, then a configuration like</p><pre><code class="programlisting nix">{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
|
||||
pkgsUnstable = import <nixpkgs-unstable> {};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
programs.skim.enable = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
skim = pkgsUnstable.skim;
|
||||
})
|
||||
];
|
||||
|
||||
# …
|
||||
}
|
||||
</code></pre><p>should work OK.</p></li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navfooter">
|
||||
<hr />
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="options.html">Next</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top"> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right" valign="top"> Appendix A. Home Manager Configuration Options</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,41 +1,239 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix C. nix-darwin Module Options</title><link rel="stylesheet" type="text/css" href="style.css" /><script src="highlight.min.js" type="text/javascript"></script><script src="highlight.load.js" type="text/javascript"></script><meta name="generator" content="DocBook XSL Stylesheets V1.79.2" /><link rel="home" href="index.html" title="Home Manager Manual" /><link rel="up" href="index.html" title="Home Manager Manual" /><link rel="prev" href="nixos-options.html" title="Appendix B. NixOS Module Options" /><link rel="next" href="tools.html" title="Appendix D. Tools" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix C. nix-darwin Module Options</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="nixos-options.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="tools.html">Next</a></td></tr></table><hr /></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="ch-nix-darwin-options"></a>Appendix C. nix-darwin Module Options</h1></div></div></div><div class="variablelist"><a id="nix-darwin-options"></a><dl class="variablelist"><dt><span class="term"><a id="nix-darwin-opt-home-manager.backupFileExtension"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.backupFileExtension"><code class="option">home-manager.backupFileExtension</code></a></span></dt><dd><p>On activation move existing files by appending the given
|
||||
file extension rather than exiting with an error.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"backup"</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Appendix C. nix-darwin Configuration Options</title>
|
||||
<link rel="stylesheet" type="text/css" href="/nix/store/pxpsr0b80pfn3i5pvq8kqq3z1bwlqcig-source/static/style.css" /><link rel="stylesheet" type="text/css" href="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/tomorrow-night.min.css" /><link rel="stylesheet" type="text/css" href="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/highlight-style.css" />
|
||||
<script src="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/highlight.pack.js" type="text/javascript"></script><script src="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/loader.js" type="text/javascript"></script>
|
||||
<meta name="generator" content="nixos-render-docs" />
|
||||
<link rel="home" href="index.xhtml" title="Home Manager Manual" />
|
||||
<link rel="up" href="index.xhtml" title="Home Manager Manual" /><link rel="prev" href="nixos-options.html" title="Appendix B. NixOS Configuration Options" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr>
|
||||
<th colspan="3" align="center">Appendix C. nix-darwin Configuration Options</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" align="left"><a accesskey="p" href="nixos-options.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
</div><div class="appendix"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-nix-darwin-options"></a>Appendix C. nix-darwin Configuration Options </h1> </div> </div></div><div class="variablelist">
|
||||
<a id="nix-darwin-options"></a>
|
||||
<dl class="variablelist">
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nix-darwin-opt-home-manager.backupFileExtension"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.backupFileExtension"><code class="option">home-manager.backupFileExtension</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>On activation move existing files by appending the given
|
||||
file extension rather than exiting with an error.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"backup"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nix-darwin-opt-home-manager.extraSpecialArgs"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.extraSpecialArgs"><code class="option">home-manager.extraSpecialArgs</code></a></span></dt><dd><p>Extra <code class="literal">specialArgs</code> passed to Home Manager. This
|
||||
option can be used to pass additional arguments to all modules.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">{ inherit emacs-overlay; }</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nix-darwin-opt-home-manager.extraSpecialArgs"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.extraSpecialArgs"><code class="option">home-manager.extraSpecialArgs</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Extra <code class="literal">specialArgs</code> passed to Home Manager. This
|
||||
option can be used to pass additional arguments to all modules.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">{ inherit emacs-overlay; }</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nix-darwin-opt-home-manager.sharedModules"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.sharedModules"><code class="option">home-manager.sharedModules</code></a></span></dt><dd><p>Extra modules added to all users.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
list of raw value</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">[ ]</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">[ { home.packages = [ nixpkgs-fmt ]; } ]</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nix-darwin-opt-home-manager.sharedModules"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.sharedModules"><code class="option">home-manager.sharedModules</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Extra modules added to all users.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
list of raw value</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">[ ]</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">[ { home.packages = [ nixpkgs-fmt ]; } ]</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nix-darwin-opt-home-manager.useGlobalPkgs"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.useGlobalPkgs"><code class="option">home-manager.useGlobalPkgs</code></a></span></dt><dd><p>Whether to enable using the system configuration’s <code class="literal">pkgs</code>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nix-darwin-opt-home-manager.useGlobalPkgs"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.useGlobalPkgs"><code class="option">home-manager.useGlobalPkgs</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable using the system configuration’s <code class="literal">pkgs</code>
|
||||
argument in Home Manager. This disables the Home Manager
|
||||
options <code class="option">nixpkgs.*</code>.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
options <code class="option">nixpkgs.*</code>.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nix-darwin-opt-home-manager.useUserPackages"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.useUserPackages"><code class="option">home-manager.useUserPackages</code></a></span></dt><dd><p>Whether to enable installation of user packages through the
|
||||
<code class="option">users.users.<name>.packages</code> option.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nix-darwin-opt-home-manager.useUserPackages"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.useUserPackages"><code class="option">home-manager.useUserPackages</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable installation of user packages through the
|
||||
<code class="option">users.users.<name>.packages</code> option.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nix-darwin-opt-home-manager.users"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.users"><code class="option">home-manager.users</code></a></span></dt><dd><p>Per-user Home Manager configuration.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set of (Home Manager module)</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nix-darwin-opt-home-manager.users"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.users"><code class="option">home-manager.users</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Per-user Home Manager configuration.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set of (Home Manager module)</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nix-darwin-opt-home-manager.verbose"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.verbose"><code class="option">home-manager.verbose</code></a></span></dt><dd><p>Whether to enable verbose output on activation.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nix-darwin-opt-home-manager.verbose"></a><a class="term" href="nix-darwin-options.html#nix-darwin-opt-home-manager.verbose"><code class="option">home-manager.verbose</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable verbose output on activation.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="nixos-options.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="tools.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B. NixOS Module Options </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix D. Tools</td></tr></table></div></body></html>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div> <div class="navfooter">
|
||||
<hr />
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left"><a accesskey="p" href="nixos-options.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">Appendix B. NixOS Configuration Options </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="index.xhtml">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,41 +1,239 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix B. NixOS Module Options</title><link rel="stylesheet" type="text/css" href="style.css" /><script src="highlight.min.js" type="text/javascript"></script><script src="highlight.load.js" type="text/javascript"></script><meta name="generator" content="DocBook XSL Stylesheets V1.79.2" /><link rel="home" href="index.html" title="Home Manager Manual" /><link rel="up" href="index.html" title="Home Manager Manual" /><link rel="prev" href="options.html" title="Appendix A. Configuration Options" /><link rel="next" href="nix-darwin-options.html" title="Appendix C. nix-darwin Module Options" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. NixOS Module Options</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="options.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="nix-darwin-options.html">Next</a></td></tr></table><hr /></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="ch-nixos-options"></a>Appendix B. NixOS Module Options</h1></div></div></div><div class="variablelist"><a id="nixos-options"></a><dl class="variablelist"><dt><span class="term"><a id="nixos-opt-home-manager.backupFileExtension"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.backupFileExtension"><code class="option">home-manager.backupFileExtension</code></a></span></dt><dd><p>On activation move existing files by appending the given
|
||||
file extension rather than exiting with an error.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"backup"</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Appendix B. NixOS Configuration Options</title>
|
||||
<link rel="stylesheet" type="text/css" href="/nix/store/pxpsr0b80pfn3i5pvq8kqq3z1bwlqcig-source/static/style.css" /><link rel="stylesheet" type="text/css" href="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/tomorrow-night.min.css" /><link rel="stylesheet" type="text/css" href="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/highlight-style.css" />
|
||||
<script src="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/highlight.pack.js" type="text/javascript"></script><script src="/nix/store/nldgsy5s3zyr7dh964hbc9qg2ng9ja0y-home-manager-manual/share/doc/home-manager/highlightjs/loader.js" type="text/javascript"></script>
|
||||
<meta name="generator" content="nixos-render-docs" />
|
||||
<link rel="home" href="index.xhtml" title="Home Manager Manual" />
|
||||
<link rel="up" href="index.xhtml" title="Home Manager Manual" /><link rel="prev" href="options.html" title="Appendix A. Home Manager Configuration Options" /><link rel="next" href="nix-darwin-options.html" title="Appendix C. nix-darwin Configuration Options" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="navheader">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<tr>
|
||||
<th colspan="3" align="center">Appendix B. NixOS Configuration Options</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20%" align="left"><a accesskey="p" href="options.html">Prev</a> </td>
|
||||
<th width="60%" align="center"> </th>
|
||||
<td width="20%" align="right"> <a accesskey="n" href="nix-darwin-options.html">Next</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
</div><div class="appendix"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-nixos-options"></a>Appendix B. NixOS Configuration Options </h1> </div> </div></div><div class="variablelist">
|
||||
<a id="nixos-options"></a>
|
||||
<dl class="variablelist">
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nixos-opt-home-manager.backupFileExtension"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.backupFileExtension"><code class="option">home-manager.backupFileExtension</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>On activation move existing files by appending the given
|
||||
file extension rather than exiting with an error.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
null or string</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">null</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">"backup"</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nixos-opt-home-manager.extraSpecialArgs"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.extraSpecialArgs"><code class="option">home-manager.extraSpecialArgs</code></a></span></dt><dd><p>Extra <code class="literal">specialArgs</code> passed to Home Manager. This
|
||||
option can be used to pass additional arguments to all modules.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">{ inherit emacs-overlay; }</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nixos-opt-home-manager.extraSpecialArgs"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.extraSpecialArgs"><code class="option">home-manager.extraSpecialArgs</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Extra <code class="literal">specialArgs</code> passed to Home Manager. This
|
||||
option can be used to pass additional arguments to all modules.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">{ inherit emacs-overlay; }</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nixos-opt-home-manager.sharedModules"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.sharedModules"><code class="option">home-manager.sharedModules</code></a></span></dt><dd><p>Extra modules added to all users.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
list of raw value</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">[ ]</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">[ { home.packages = [ nixpkgs-fmt ]; } ]</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nixos-opt-home-manager.sharedModules"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.sharedModules"><code class="option">home-manager.sharedModules</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Extra modules added to all users.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
list of raw value</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">[ ]</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">[ { home.packages = [ nixpkgs-fmt ]; } ]</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nixos-opt-home-manager.useGlobalPkgs"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.useGlobalPkgs"><code class="option">home-manager.useGlobalPkgs</code></a></span></dt><dd><p>Whether to enable using the system configuration’s <code class="literal">pkgs</code>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nixos-opt-home-manager.useGlobalPkgs"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.useGlobalPkgs"><code class="option">home-manager.useGlobalPkgs</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable using the system configuration’s <code class="literal">pkgs</code>
|
||||
argument in Home Manager. This disables the Home Manager
|
||||
options <code class="option">nixpkgs.*</code>.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
options <code class="option">nixpkgs.*</code>.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nixos-opt-home-manager.useUserPackages"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.useUserPackages"><code class="option">home-manager.useUserPackages</code></a></span></dt><dd><p>Whether to enable installation of user packages through the
|
||||
<code class="option">users.users.<name>.packages</code> option.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nixos-opt-home-manager.useUserPackages"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.useUserPackages"><code class="option">home-manager.useUserPackages</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable installation of user packages through the
|
||||
<code class="option">users.users.<name>.packages</code> option.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nixos-opt-home-manager.users"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.users"><code class="option">home-manager.users</code></a></span></dt><dd><p>Per-user Home Manager configuration.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set of (Home Manager module)</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nixos-opt-home-manager.users"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.users"><code class="option">home-manager.users</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Per-user Home Manager configuration.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
attribute set of (Home Manager module)</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">{ }</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd><dt><span class="term"><a id="nixos-opt-home-manager.verbose"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.verbose"><code class="option">home-manager.verbose</code></a></span></dt><dd><p>Whether to enable verbose output on activation.</p><p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p><p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p><p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p><p><span class="emphasis"><em>Declared by:</em></span></p><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<a id="nixos-opt-home-manager.verbose"></a><a class="term" href="nixos-options.html#nixos-opt-home-manager.verbose"><code class="option">home-manager.verbose</code>
|
||||
</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>Whether to enable verbose output on activation.</p>
|
||||
|
||||
<p><span class="emphasis"><em>Type:</em></span>
|
||||
boolean</p>
|
||||
|
||||
<p><span class="emphasis"><em>Default:</em></span>
|
||||
<code class="literal">false</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Example:</em></span>
|
||||
<code class="literal">true</code></p>
|
||||
|
||||
<p><span class="emphasis"><em>Declared by:</em></span></p>
|
||||
<table border="0" summary="Simple list" class="simplelist">
|
||||
<tr><td>
|
||||
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix" target="_top">
|
||||
<home-manager/nixos/common.nix>
|
||||
</a></code></td></tr></table></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="options.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="nix-darwin-options.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix A. Configuration Options </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. nix-darwin Module Options</td></tr></table></div></body></html>
|
||||
</a></code>
|
||||
</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div> <div class="navfooter">
|
||||
<hr />
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<tr>
|
||||
<td width="40%" align="left"><a accesskey="p" href="options.html">Prev</a> </td>
|
||||
<td width="20%" align="center"> </td>
|
||||
<td width="40%" align="right"> <a accesskey="n" href="nix-darwin-options.html">Next</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">Appendix A. Home Manager Configuration Options </td>
|
||||
<td width="20%" align="center"><a accesskey="h" href="index.xhtml">Home</a></td>
|
||||
<td width="40%" align="right" valign="top"> Appendix C. nix-darwin Configuration Options</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
84415
options.html
7
tomorrow.min.css
vendored
|
@ -1,7 +0,0 @@
|
|||
/*!
|
||||
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}
|
322
tools.html
|
@ -1,322 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix D. Tools</title><link rel="stylesheet" type="text/css" href="style.css" /><script src="highlight.min.js" type="text/javascript"></script><script src="highlight.load.js" type="text/javascript"></script><meta name="generator" content="DocBook XSL Stylesheets V1.79.2" /><link rel="home" href="index.html" title="Home Manager Manual" /><link rel="up" href="index.html" title="Home Manager Manual" /><link rel="prev" href="nix-darwin-options.html" title="Appendix C. nix-darwin Module Options" /><link rel="next" href="release-notes.html" title="Appendix E. Release Notes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. Tools</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="nix-darwin-options.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="release-notes.html">Next</a></td></tr></table><hr /></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="ch-tools"></a>Appendix D. Tools</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="tools.html#id-1.13.2"><span class="command"><strong>home-manager</strong></span>
|
||||
</a></span><span class="refpurpose"> — reconfigure a user environment</span></dt></dl></div><div class="refentry"><a id="id-1.13.2"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p><span class="command"><strong>home-manager</strong></span>
|
||||
— reconfigure a user environment</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">home-manager</code> {
|
||||
build
|
||||
|
|
||||
init [--switch] [<em class="replaceable"><code>dir</code></em>]
|
||||
|
|
||||
instantiate
|
||||
|
|
||||
edit
|
||||
|
|
||||
expire-generations <em class="replaceable"><code>timestamp</code></em>
|
||||
|
|
||||
generations
|
||||
|
|
||||
help
|
||||
|
|
||||
news
|
||||
|
|
||||
option <em class="replaceable"><code>option.name</code></em>
|
||||
|
|
||||
packages
|
||||
|
|
||||
remove-generations <em class="replaceable"><code>ID …</code></em>
|
||||
|
|
||||
switch
|
||||
|
|
||||
uninstall
|
||||
}<br /> [
|
||||
-A <em class="replaceable"><code>attrPath</code></em>
|
||||
] [
|
||||
-I <em class="replaceable"><code>path</code></em>
|
||||
] [
|
||||
--flake <em class="replaceable"><code>flake-uri</code></em>
|
||||
] [
|
||||
-b <em class="replaceable"><code>ext</code></em>
|
||||
] [
|
||||
{
|
||||
-f
|
||||
|
|
||||
--file
|
||||
} <em class="replaceable"><code>path</code></em>
|
||||
] [
|
||||
{
|
||||
-h
|
||||
|
|
||||
--help
|
||||
}
|
||||
] [
|
||||
--version
|
||||
] [
|
||||
{
|
||||
-n
|
||||
|
|
||||
--dry-run
|
||||
}
|
||||
] [
|
||||
--option <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>value</code></em>
|
||||
] [
|
||||
--cores <em class="replaceable"><code>number</code></em>
|
||||
] [
|
||||
{
|
||||
-j
|
||||
|
|
||||
--max-jobs
|
||||
}
|
||||
<em class="replaceable"><code>number</code></em>
|
||||
] [
|
||||
--debug
|
||||
] [
|
||||
--impure
|
||||
] [
|
||||
--keep-failed
|
||||
] [
|
||||
--keep-going
|
||||
] [
|
||||
{
|
||||
-L
|
||||
|
|
||||
--print-build-logs
|
||||
}
|
||||
] [
|
||||
--show-trace
|
||||
] [
|
||||
--(no-)substitute
|
||||
] [
|
||||
--no-out-link
|
||||
] [
|
||||
--refresh
|
||||
] [
|
||||
{
|
||||
-v
|
||||
|
|
||||
--verbose
|
||||
}
|
||||
]</p></div></div><div class="refsection"><a id="id-1.13.2.4"></a><h2>Description</h2><p>
|
||||
This command updates the user environment so that it corresponds to the
|
||||
configuration specified in
|
||||
<code class="filename">$XDG_CONFIG_HOME/home-manager/home.nix</code> or
|
||||
<code class="filename">$XDG_CONFIG_HOME/home-manager/flake.nix</code>.
|
||||
</p><p>
|
||||
All operations using this tool expects a sub-command that indicates the
|
||||
operation to perform. It must be one of
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
|
||||
<code class="option">build</code>
|
||||
</span></dt><dd><p>
|
||||
Build configuration into a <code class="filename">result</code> directory.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">init</code> [<code class="option">--switch</code>] [<em class="replaceable"><code>dir</code></em>]
|
||||
</span></dt><dd><p class="simpara">
|
||||
Generates an initial <code class="filename">home.nix</code> file for the
|
||||
current user. If Nix flakes are enabled, then this command also
|
||||
generates a <code class="filename">flake.nix</code> file.
|
||||
</p><p class="simpara">
|
||||
If a path <em class="replaceable"><code>dir</code></em> is given then the
|
||||
configuration will be generated in that directory. Otherwise, the
|
||||
configuration will be generated in
|
||||
<code class="filename">~/.config/home-manager</code>. The output directory will
|
||||
be created if it does not exist.
|
||||
</p><p class="simpara">
|
||||
If the <code class="option">--switch</code> option is given, then the generated
|
||||
configuration is activated.
|
||||
</p><p class="simpara">
|
||||
Note, this command will not overwrite any existing files. It is
|
||||
therefore safe to initialize a configuration, edit it, and then re-run
|
||||
the <code class="option">init</code> command with <code class="option">--switch</code>
|
||||
enabled to activate the configuration.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">instantiate</code>
|
||||
</span></dt><dd><p>
|
||||
Instantiate the configuration and print the resulting derivation.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">edit</code>
|
||||
</span></dt><dd><p>
|
||||
Open the home configuration using the editor indicated by
|
||||
<code class="envar">EDITOR</code>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">expire-generations <em class="replaceable"><code>timestamp</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Remove generations older than <em class="replaceable"><code>timestamp</code></em> where
|
||||
<em class="replaceable"><code>timestamp</code></em> is interpreted as in the
|
||||
<code class="option">-d</code> argument of the <span class="citerefentry"><span class="refentrytitle">date</span>(1)</span> tool. For example <code class="literal">-30
|
||||
days</code> or <code class="literal">2018-01-01</code>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">generations</code>
|
||||
</span></dt><dd><p>
|
||||
List all home environment generations.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">help</code>
|
||||
</span></dt><dd><p>
|
||||
Print tool help.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">news</code>
|
||||
</span></dt><dd><p>
|
||||
Show news entries in a pager.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">option <em class="replaceable"><code>option.name</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Inspect the given option name in the home configuration, like <span class="citerefentry"><span class="refentrytitle">nixos-option</span>(8)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">packages</code>
|
||||
</span></dt><dd><p>
|
||||
List all packages installed in <code class="varname">home-manager-path</code>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">remove-generations <em class="replaceable"><code>ID …</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Remove indicated generations. Use the <code class="option">generations</code>
|
||||
sub-command to find suitable generation numbers.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">switch</code>
|
||||
</span></dt><dd><p>
|
||||
Build and activate the configuration.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">uninstall</code>
|
||||
</span></dt><dd><p>
|
||||
Remove Home Manager from the user environment. This will
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
|
||||
remove all managed files from the home directory,
|
||||
</p></li><li class="listitem"><p>
|
||||
remove packages installed through Home Manager from the user profile,
|
||||
and
|
||||
</p></li><li class="listitem"><p>
|
||||
remove all Home Manager generations and make them available
|
||||
for immediate garbage collection.
|
||||
</p></li></ul></div><p>
|
||||
</p></dd></dl></div><p>
|
||||
</p></div><div class="refsection"><a id="id-1.13.2.5"></a><h2>Options</h2><p>
|
||||
The tool accepts the options
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
|
||||
<code class="option">-A <em class="replaceable"><code>attrPath</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Optional attribute that selects a configuration expression in the
|
||||
configuration file. That is, if <code class="filename">home.nix</code> contains
|
||||
</p><pre class="programlisting nix">
|
||||
{
|
||||
joe-at-work = {pkgs, ...}: { home.packages = [ pkgs.fortune ]; };
|
||||
joe-at-home = {pkgs, ...}: { home.packages = [ pkgs.cowsay ]; };
|
||||
}
|
||||
</pre><p>
|
||||
then the command <span class="command"><strong>home-manager switch -A joe-at-work</strong></span>
|
||||
will activate the profile containing the fortune program.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-I <em class="replaceable"><code>path</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Add a path to the Nix expression search path. For example, to build a
|
||||
Home Manager profile using a specific Nixpkgs run <span class="command"><strong>home-manager
|
||||
-I nixpkgs=/absolute/path/to/nixpkgs build</strong></span>. By default
|
||||
<code class="literal"><nixpkgs></code> is used.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--flake <em class="replaceable"><code>flake-uri[#name]</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Build Home Manager configuration from the flake, which must contain the
|
||||
output homeConfigurations.name. If no name is specified it will first try
|
||||
username@hostname and then username.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-b <em class="replaceable"><code>extension</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Enable automatic resolution of collisions between unmanaged and managed
|
||||
files. The name of the original file will be suffixed by the given
|
||||
extension. For example,
|
||||
</p><pre class="screen">
|
||||
<code class="prompt">$</code> <strong class="userinput"><code>home-manager -b bck switch</code></strong>
|
||||
</pre><p>
|
||||
will cause a colliding file <code class="filename">~/.config/foo.conf</code> to be
|
||||
moved to <code class="filename">~/.config/foo.conf.bck</code>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-f <em class="replaceable"><code>path</code></em></code>
|
||||
, </span><span class="term">
|
||||
<code class="option">--file <em class="replaceable"><code>path</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Indicates the path to the Home Manager configuration file. If not given,
|
||||
<code class="filename">$XDG_CONFIG_HOME/home-manager/home.nix</code> is used.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-h</code>
|
||||
, </span><span class="term">
|
||||
<code class="option">--help</code>
|
||||
</span></dt><dd><p>
|
||||
Prints usage information for the <span class="command"><strong>home-manager</strong></span> tool.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--version</code>
|
||||
</span></dt><dd><p>
|
||||
Prints the version number of the <span class="command"><strong>home-manager</strong></span> tool.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-n</code>
|
||||
, </span><span class="term">
|
||||
<code class="option">--dry-run</code>
|
||||
</span></dt><dd><p>
|
||||
Perform a dry-run of the given operation, only prints what actions would
|
||||
be taken.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--option <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>value</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--cores <em class="replaceable"><code>number</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-j <em class="replaceable"><code>number</code></em></code>
|
||||
, </span><span class="term">
|
||||
<code class="option">--max-jobs <em class="replaceable"><code>number</code></em></code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--debug</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--impure</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--keep-failed</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--keep-going</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-L</code>
|
||||
, </span><span class="term">
|
||||
<code class="option">--print-build-logs</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix build</span></span>
|
||||
when building from a flake.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--show-trace</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--(no-)substitute</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--no-out-link</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>
|
||||
when running <span class="command"><strong>home-manager build</strong></span>.
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">--refresh</code>
|
||||
</span></dt><dd><p>
|
||||
Passed on to <span class="citerefentry"><span class="refentrytitle">nix-build</span>(1)</span>
|
||||
</p></dd><dt><span class="term">
|
||||
<code class="option">-v</code>
|
||||
, </span><span class="term">
|
||||
<code class="option">--verbose</code>
|
||||
</span></dt><dd><p>
|
||||
Activates verbose output.
|
||||
</p></dd></dl></div></div><div class="refsection"><a id="id-1.13.2.6"></a><h2>Files</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">
|
||||
<code class="filename">$XDG_DATA_HOME/home-manager/news-read-ids</code>
|
||||
</span></dt><dd><p>
|
||||
Identifiers of news items that have been shown. Can be deleted to reset
|
||||
the read news indicator.
|
||||
</p></dd></dl></div></div><div class="refsection"><a id="id-1.13.2.7"></a><h2>Bugs</h2><p>
|
||||
Please report any bugs on the
|
||||
<a class="link" href="https://github.com/nix-community/home-manager/issues" target="_top">project
|
||||
issue tracker</a>.
|
||||
</p></div><div class="refsection"><a id="id-1.13.2.8"></a><h2>See also</h2><p>
|
||||
<span class="citerefentry"><span class="refentrytitle">home-configuration.nix</span>(5)</span>
|
||||
</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="nix-darwin-options.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="release-notes.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C. nix-darwin Module Options </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix E. Release Notes</td></tr></table></div></body></html>
|