docs: update readme

This commit is contained in:
Leon Schwarzäugl 2025-12-31 12:35:50 +01:00 committed by Leon Schwarzäugl
parent 39ca62476f
commit 2685c81714
2 changed files with 440 additions and 60 deletions

8
.github/README.md vendored
View file

@ -273,9 +273,8 @@
These are in random order (also known as 'the order in which I discovered them'). I would like to express my gratitude to:
- All the great people who have contributed code for the nix-community, with special mentions for (this list is unfairly incomplete):
<details>
<summary>Click here to expand...</summary>
<summary>The great people who have contributed code for the nix-community, with special mentions for (this list is unfairly incomplete)</summary>
- [guibou](https://github.com/guibou/)
- [rycee](https://github.com/rycee)
@ -300,9 +299,8 @@
- [oddlama](https://github.com/oddlama)
</details>
- All the people who have inspired me with their configurations (sadly also highly incomplete):
<details>
<summary>Click here to expand...</summary>
<summary>The people who have inspired me with their configurations (sadly also highly incomplete)</summary>
- [theSuess](https://github.com/theSuess) with their [home-manager](https://code.kulupu.party/thesuess/home-manager)
- [hlissner](https://github.com/hlissner) with their [dotfiles](https://github.com/hlissner/dotfiles)
@ -315,7 +313,7 @@
- [EmergentMind](https://github.com/EmergentMind) with their [nix-config](https://github.com/EmergentMind/nix-config)
- [librephoenix](https://github.com/librephoenix) with their [nixos-config](https://github.com/librephoenix/nixos-config)
- [Xe](https://github.com/Xe) with their [blog](https://xeiaso.net/blog/)
- [oddlama](https://github.com/oddlama) with their absolutely incredible [nix-config](https:/github.com/oddlama/nix-config)
- [oddlama](https://github.com/oddlama) with their [nix-config](https:/github.com/oddlama/nix-config)
</details>
If you feel that I forgot to pay you tribute for code that I used in this repository, please shoot me a message and I will fix it :)

View file

@ -85,7 +85,46 @@ By using the configuration offered by this file, the file you are reading right
#+end_src
The =.html= version of this page can be generated by calling the chord =C-SPC o e=, or by executing the below block
- [[#h:dae0c5bb-edb7-4fe4-ae31-9f8f064cc53c][Appendix A: Noweb-Ref blocks]]
This section holds code that can be templated by other parts of the configuration.
These blocks were used in several places throughout the configurations, but not on all machines necessarily. For example, the theming section used need to be in a NixOS block on NixOS machines but in a home-manager block on non-NixOS.
Originally, I used this method a lot throughout my configuration. However, as my knowledge of NixOS grew, I have been weeding these snippets out more and more as I find more efficient native solutions. Now, only the theming block remains. For example, the above problem can be solved by defining a =theme= attribute set and using =lib.recursiveUpdate= as shown in [[#h:79f7150f-b162-4f57-abdf-07f40dffd932][Shared Configuration Options (holds firefox & stylix config parts)]] and [[#h:a92318cd-413e-4e78-a478-e63b09df019c][Theme (stylix)]]. Nowadays I use this mostly for some meta information in this file, e.g. for definining the [[#h:3bb92528-c61c-4b8d-8214-bf2a40baaa32][Programs]], [[#h:191e82b6-6ae5-4ec8-ae6d-dc683ce325d9][Services]] and [[#h:48e0cb2c-e412-4ae3-a244-80a8c09dbb02][Hosts]] blocks only once. I also use it to merge the [[#h:ed34ee4d-31f9-4d27-bc6e-ba37ee502d5a][Manual steps when setting up a new machine]].
As such, this served to reduce code duplication in this file. The tangled files experienced no size reduction, since noweb-ref only substitutes these blocks in.
An example of using a noweb-ref block:
#+begin_src nix-ts :tangle no :noweb-ref blockName
enable = true;
#+end_src
which can then be used in a block like:
#+begin_src markdown :tangle no :noweb yes
<<blockName>>
#+end_src
#+RESULTS:
: enable = true;
Note that noweb-reffed blocks will not be indented correctly. You will want to account for that when checking your nix flake with the formatter of your choice. Personally, I have solved this issue using the functions defined in [[#h:59d4306e-9b73-4b2c-b039-6a6518c357fc][org-mode: Upon-save actions (Auto-tangle, export to html, formatting)]]. Originally, I also automatically exported to html there, but it incurred a too high memory penalty which made Emacs become sluggish over time - instead I now build the website version whenever I push to GitHub.
- [[#h:8fc9f66a-7412-4091-8dee-a06f897baf67][Appendix B: Supplementary Files]]
This section holds files that are not written in nix but are still referenced in the configuration in some way. This is mostly used for configuration of programs that have no native nix support, like tridactyl. Note that shell scripts are still defined under their respective entry in [[#h:64a5cc16-6b16-4802-b421-c67ccef853e1][Packages]]. Over time, the goal is to reduce this section to a minimum, but things like the aforementioned tridactyl might stay for a long time, until we have a stable interface to configure browser plugins.
- [[#h:8ea35dcc-ef94-4c10-9112-8be8efd6f424][Appendix C: Explanations to nix functions and operators]]
When I started to learn about nix, I found that journey quite arduous; while I disagree with the general public in that the documentation is too sparse, I will say that, while it is very good, reading (and understanding!) it requires a certain level of existing nix knowledge that one will problably not have when starging out. Hence, the goal of this document is to explain common nix functions as they come up in this document (I thing I wrote this before :sweat:), in hopes that you will be able to understand most of the code. When a new function appears for the first time, I will try to link to an entry in the appendix.
*** HTML version of this document
:PROPERTIES:
:CUSTOM_ID: h:12880c64-229c-4063-9eea-387a97490676
:END:
The =.html= version of this page is normally built by a GitHub workflow; it can be generated manually by calling the chord =C-SPC o e=, or by executing the below block
#+begin_src emacs-lisp :tangle no :export both :results silent
@ -93,32 +132,41 @@ The =.html= version of this page can be generated by calling the chord =C-SPC o
#+end_src
The web version is useful because it allows navigation using org-mode links, which makes the configuration easier to follow (I hope!).
Lastly, I add this javascript bit to the file in order to have a darkmode toggle when exporting to html:
The web version is useful because it allows navigation using org-mode links, which makes the configuration easier to follow in a number of ways:
- mobile-friendly documentation
- Functionality to save links to certain headers in a "Pinned" menu that can be toggled
- These links are locally saved
I add a javascript bit to the file in order to have a darkmode toggle when exporting to html. NOTE: What I am doing is defining an elisp multiline string which gives me heredoc capabilities for defining blocks that should be both exported to the final =.html= but should also be shown in the document itself (only putting a =#+[begin/end]_export= block would not show the block in the content of the page) which is then output as html and exported to both.
#+begin_src elisp :noweb yes :exports both :results html
(concat
"<script src=\"https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js\"></script>\n"
"<script>\n"
"function addDarkmodeWidget() {\n"
"new Darkmode().showWidget();\n"
"}\n"
"window.addEventListener('load', addDarkmodeWidget);\n"
"</script>")
"
<script src='https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js'></script>
<script>
function addDarkmodeWidget() {
new Darkmode({label:'[☀︎]'}).showWidget();
}
window.addEventListener('load', addDarkmodeWidget);
</script>
"
#+end_src
#+RESULTS:
#+begin_export html
<script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js"></script>
<script src='https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js'></script>
<script>
function addDarkmodeWidget() {
new Darkmode().showWidget();
new Darkmode({label:'[☀︎]'}).showWidget();
}
window.addEventListener('load', addDarkmodeWidget);
</script>
#+end_export
#+begin_export html
I also add this javascript to add header pinning functionality to the site, using the same trick as above:
#+begin_src elisp :noweb yes :exports both :results html
"
<script>
(function() {
function ready(fn) {
@ -137,12 +185,323 @@ window.addEventListener('load', addDarkmodeWidget);
pinnedPanel = document.createElement('aside');
pinnedPanel.id = 'pinned-panel';
pinnedPanel.innerHTML = `
<div id="pinned-panel-header">
<div id='pinned-panel-header'>
<h2>Pinned</h2>
<button id="toggle-pinned-btn" type="button" title="Hide pinned panel">✕</button>
<button id='toggle-pinned-btn' type='button' title='Hide pinned panel'>✕</button>
</div>
<button id="clear-all-pins-btn" type="button">Clear All</button>
<ul id="pinned-list"></ul>
<button id='clear-all-pins-btn' type='button'>Clear All</button>
<ul id='pinned-list'></ul>
`;
document.body.appendChild(pinnedPanel);
}
let showBtn = document.getElementById('show-pinned-btn');
if (!showBtn) {
showBtn = document.createElement('button');
showBtn.id = 'show-pinned-btn';
showBtn.type = 'button';
showBtn.textContent = 'Show Pinned';
document.body.appendChild(showBtn);
}
const content = document.getElementById('content');
const pinnedList = document.getElementById('pinned-list');
const toggleBtn = document.getElementById('toggle-pinned-btn');
const clearAllBtn = document.getElementById('clear-all-pins-btn');
const toc = document.getElementById('table-of-contents');
const body = document.body;
if (!content || !pinnedList || !toggleBtn || !clearAllBtn || !toc) return;
let mobileTocBtn = document.getElementById('mobile-toc-toggle');
if (!mobileTocBtn) {
mobileTocBtn = document.createElement('button');
mobileTocBtn.id = 'mobile-toc-toggle';
mobileTocBtn.type = 'button';
mobileTocBtn.textContent = 'TOC';
document.body.appendChild(mobileTocBtn);
}
let mobilePinnedBtn = document.getElementById('mobile-pinned-toggle');
if (!mobilePinnedBtn) {
mobilePinnedBtn = document.createElement('button');
mobilePinnedBtn.id = 'mobile-pinned-toggle';
mobilePinnedBtn.type = 'button';
mobilePinnedBtn.textContent = 'Pinned';
document.body.appendChild(mobilePinnedBtn);
}
function anyMobilePanelOpen() {
return toc.classList.contains('mobile-visible') ||
pinnedPanel.classList.contains('mobile-visible');
}
function updateBodyMobilePanelState() {
if (anyMobilePanelOpen()) body.classList.add('mobile-panel-open');
else body.classList.remove('mobile-panel-open');
}
mobileTocBtn.addEventListener('click', function() {
const isOpen = toc.classList.toggle('mobile-visible');
if (isOpen) {
pinnedPanel.classList.remove('mobile-visible');
}
updateBodyMobilePanelState();
});
mobilePinnedBtn.addEventListener('click', function() {
const isOpen = pinnedPanel.classList.toggle('mobile-visible');
if (isOpen) {
toc.classList.remove('mobile-visible');
}
updateBodyMobilePanelState();
});
const pinnedItems = new Map();
let initiallyPinnedHrefs = new Set();
function loadFromStorage() {
try {
const raw = window.localStorage && localStorage.getItem(STORAGE_KEY);
if (!raw) return;
const arr = JSON.parse(raw);
if (!Array.isArray(arr)) return;
initiallyPinnedHrefs = new Set(arr);
} catch (e) {
console.warn('Pinned: failed to load from localStorage', e);
}
}
function saveToStorage() {
try {
if (!window.localStorage) return;
const arr = [];
pinnedItems.forEach((entry, href) => {
if (entry.li) arr.push(href);
});
localStorage.setItem(STORAGE_KEY, JSON.stringify(arr));
} catch (e) {
console.warn('Pinned: failed to save to localStorage', e);
}
}
function sortPinnedList() {
const items = Array.from(pinnedList.children).map(li => {
const link = li.querySelector('a');
return {
li: li,
text: link ? link.textContent.trim().toLowerCase() : ''
};
});
items.sort((a, b) => a.text.localeCompare(b.text));
items.forEach(item => pinnedList.appendChild(item.li));
}
function hidePinnedPanel() {
pinnedPanel.classList.add('hidden');
content.classList.add('pinned-hidden');
showBtn.classList.add('visible');
}
function showPinnedPanel() {
pinnedPanel.classList.remove('hidden');
content.classList.remove('pinned-hidden');
showBtn.classList.remove('visible');
}
toggleBtn.addEventListener('click', hidePinnedPanel);
showBtn.addEventListener('click', showPinnedPanel);
clearAllBtn.addEventListener('click', function() {
if (pinnedItems.size === 0) return;
const confirmed = confirm('Are you sure you want to clear all pinned items?');
if (!confirmed) return;
pinnedItems.forEach((entry, href) => {
if (entry.li && entry.li.parentElement) {
entry.li.parentElement.removeChild(entry.li);
}
entry.li = null;
entry.btns.forEach(b => b.textContent = '[pin]');
});
saveToStorage();
});
function attachPinBehavior(pinBtn, href, text) {
if (!href) return;
if (!pinnedItems.has(href)) {
pinnedItems.set(href, { li: null, btns: new Set(), text: text });
}
const entry = pinnedItems.get(href);
entry.btns.add(pinBtn);
pinBtn.textContent = entry.li ? '[unpin]' : '[pin]';
pinBtn.addEventListener('click', function(e) {
e.preventDefault();
e.stopPropagation();
const current = pinnedItems.get(href);
if (!current) return;
if (current.li) {
if (current.li.parentElement) {
current.li.parentElement.removeChild(current.li);
}
current.li = null;
current.btns.forEach(b => b.textContent = '[pin]');
saveToStorage();
} else {
const li = document.createElement('li');
const a = document.createElement('a');
a.href = href;
a.textContent = current.text;
const removeBtn = document.createElement('button');
removeBtn.className = 'pin-remove';
removeBtn.type = 'button';
removeBtn.textContent = '✕';
removeBtn.addEventListener('click', () => {
const cur = pinnedItems.get(href);
if (!cur) return;
if (cur.li && cur.li.parentElement) {
cur.li.parentElement.removeChild(cur.li);
}
cur.li = null;
cur.btns.forEach(b => b.textContent = '[pin]');
saveToStorage();
});
li.appendChild(a);
li.appendChild(removeBtn);
pinnedList.appendChild(li);
current.li = li;
current.btns.forEach(b => b.textContent = '[unpin]');
sortPinnedList();
saveToStorage();
}
});
}
loadFromStorage();
const tocLinks = document.querySelectorAll('#text-table-of-contents a');
tocLinks.forEach(link => {
if (link.parentElement && link.parentElement.classList.contains('toc-entry')) {
return;
}
const li = link.closest('li');
if (!li) return;
const wrapper = document.createElement('span');
wrapper.className = 'toc-entry';
li.insertBefore(wrapper, link);
wrapper.appendChild(link);
const pinBtn = document.createElement('button');
pinBtn.className = 'toc-pin-btn';
pinBtn.type = 'button';
pinBtn.textContent = '[pin]';
wrapper.appendChild(pinBtn);
const href = link.getAttribute('href');
const text = link.textContent.trim();
attachPinBehavior(pinBtn, href, text);
});
const headers = content.querySelectorAll('h2, h3, h4, h5');
headers.forEach(header => {
const id = header.getAttribute('id');
if (!id) return;
if (header.querySelector('.toc-pin-btn')) return;
const href = '#' + id;
const text = header.textContent.trim();
const pinBtn = document.createElement('button');
pinBtn.className = 'toc-pin-btn';
pinBtn.type = 'button';
pinBtn.textContent = '[pin]';
pinBtn.style.marginLeft = '0.8rem';
pinBtn.style.fontSize = '0.75em';
header.appendChild(pinBtn);
attachPinBehavior(pinBtn, href, text);
});
initiallyPinnedHrefs.forEach(href => {
const entry = pinnedItems.get(href);
if (!entry) return;
const li = document.createElement('li');
const a = document.createElement('a');
a.href = href;
a.textContent = entry.text;
const removeBtn = document.createElement('button');
removeBtn.className = 'pin-remove';
removeBtn.type = 'button';
removeBtn.textContent = '✕';
removeBtn.addEventListener('click', () => {
const cur = pinnedItems.get(href);
if (!cur) return;
if (cur.li && cur.li.parentElement) {
cur.li.parentElement.removeChild(cur.li);
}
cur.li = null;
cur.btns.forEach(b => b.textContent = '[pin]');
saveToStorage();
});
li.appendChild(a);
li.appendChild(removeBtn);
pinnedList.appendChild(li);
entry.li = li;
entry.btns.forEach(b => b.textContent = '[unpin]');
});
sortPinnedList();
saveToStorage();
});
})();
</script>
"
#+end_src
#+RESULTS:
#+begin_export html
<script>
(function() {
function ready(fn) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', fn);
} else {
fn();
}
}
ready(function initPinned() {
const STORAGE_KEY = 'org-pinned-items-v2';
let pinnedPanel = document.getElementById('pinned-panel');
if (!pinnedPanel) {
pinnedPanel = document.createElement('aside');
pinnedPanel.id = 'pinned-panel';
pinnedPanel.innerHTML = `
<div id='pinned-panel-header'>
<h2>Pinned</h2>
<button id='toggle-pinned-btn' type='button' title='Hide pinned panel'>✕</button>
</div>
<button id='clear-all-pins-btn' type='button'>Clear All</button>
<ul id='pinned-list'></ul>
`;
document.body.appendChild(pinnedPanel);
}
@ -426,38 +785,6 @@ window.addEventListener('load', addDarkmodeWidget);
</script>
#+end_export
This section hold code that can be templated at other parts of the configuration. This is mostly used for the NixOS side of the configuration where I define my host systems that usually have a lot in common.
- [[#h:dae0c5bb-edb7-4fe4-ae31-9f8f064cc53c][Appendix A: Noweb-Ref blocks]]
These blocks were used in several places throughout the configurations, but not on all machines necessarily. For example, the theming section used need to be in a NixOS block on NixOS machines but in a home-manager block on non-NixOS.
Originally, I used this method a lot throughout my configuration. However, as my knowledge of NixOS grew, I have been weeding these snippets out more and more as I find more efficient native solutions. Now, only the theming block remains. For example, the above problem can be solved by defining a =theme= attribute set and using =lib.recursiveUpdate= as shown in [[#h:79f7150f-b162-4f57-abdf-07f40dffd932][Shared Configuration Options (holds firefox & stylix config parts)]] and [[#h:a92318cd-413e-4e78-a478-e63b09df019c][Theme (stylix)]].
As such, this served to reduce code duplication in this file. The tangled files experienced no size reduction, since noweb-ref only substitutes these blocks in.
For archival reasons, here is shown how to use a noweb-ref block, in case I ever decide to use it again, or it is interesting to you:
#+begin_src nix-ts :tangle no :noweb-ref blockName
enable = true;
#+end_src
which can then be used in a block like:
#+begin_src nix-ts :tangle no :noweb yes
<<blockName>>
#+end_src
not that noweb-reffed blocks will not be indented correctly. You will want to account for that when checking your nix flake with the formatter of your choice. Personally, I have solved this issue using the functions defined in [[#h:59d4306e-9b73-4b2c-b039-6a6518c357fc][org-mode: Upon-save actions (Auto-tangle, export to html, formatting)]]. Originally, I also automatically exported to html there, but it incurred a too high memory penalty which made Emacs become sluggish over time.
- [[#h:8fc9f66a-7412-4091-8dee-a06f897baf67][Appendix B: Supplementary Files]]
This section holds files that are not written in nix but are still referenced in the configuration in some way. This is mostly used for configuration of programs that have no native nix support, like tridactyl. Note that shell scripts are still defined under their respective entry in [[#h:64a5cc16-6b16-4802-b421-c67ccef853e1][Packages]]. Over time, the goal is to reduce this section to a minimum, but things like the aforementioned tridactyl might stay for a long time, until we have a stable interface to configure browser plugins.
- [[#h:8ea35dcc-ef94-4c10-9112-8be8efd6f424][Appendix C: Explanations to nix functions and operators]]
When I started to learn about nix, I found that journey quite arduous; while I disagree with the general public in that the documentation is too sparse, I will say that, while it is very good, reading (and understanding!) it requires a certain level of existing nix knowledge that one will problably not have when starging out. Hence, the goal of this document is to explain common nix functions as they come up in this document (I thing I wrote this before :sweat:), in hopes that you will be able to understand most of the code. When a new function appears for the first time, I will try to link to an entry in the appendix.
** TODO Structure of this flake
:PROPERTIES:
:CUSTOM_ID: h:2c5529ed-e6d9-44b6-b0d3-5bf96a6bed64
@ -3789,7 +4116,13 @@ This is my main server that I run at home. It handles most tasks that require bi
}
#+end_src
***** Guests
:PROPERTIES:
:CUSTOM_ID: h:c19725c0-0523-40f2-8083-9a4f53b6c2d1
:END:
****** Adguardhome
:PROPERTIES:
:CUSTOM_ID: h:f479a908-8071-4d69-97ea-c03bfd7b88bf
:END:
#+begin_src nix-ts :tangle hosts/nixos/x86_64-linux/hintbooth/guests/adguardhome.nix
{ self, lib, minimal, ... }:
@ -5118,6 +5451,9 @@ This machine mainly acts as my proxy server to stand before my local machines.
:END:
***** Main Configuration
:PROPERTIES:
:CUSTOM_ID: h:faee045f-a5dd-419a-b374-fc22518d4cd8
:END:
:PROPERTIES:
:CUSTOM_ID: h:96540b9c-1610-45f2-ba19-916051ab5e10
@ -8989,6 +9325,9 @@ This is a collection of packages that are useful for server-type hosts that do n
#+end_src
**** acme
:PROPERTIES:
:CUSTOM_ID: h:ebe3413f-ef12-4b22-9121-380d599d83ca
:END:
#+begin_src nix-ts :tangle modules/nixos/server/acme.nix
{ self, pkgs, lib, config, globals, ... }:
@ -9572,6 +9911,9 @@ I also take some precautions in how I get networking information during stage 1.
#+end_src
**** Attic setup
:PROPERTIES:
:CUSTOM_ID: h:046d3d66-1f13-4a41-a6b7-7ed76f863773
:END:
By default, attic only provides a cli client to authenticate to caches. I want all my servers to use my main binary cache, which is what I set up here.
@ -15416,6 +15758,9 @@ $ hydra-create-user alice --full-name 'Alice Q. User' \
}
#+end_src
**** Kea DHCP
:PROPERTIES:
:CUSTOM_ID: h:82f3b6af-89a4-4eef-9f24-8d64855c862d
:END:
This is the dhcp config that runs on my router.
@ -15498,6 +15843,9 @@ This is the dhcp config that runs on my router.
}
#+end_src
**** nftables (firewall)
:PROPERTIES:
:CUSTOM_ID: h:13ea6bdd-2f35-4ab8-8f6d-ae77b567ebc5
:END:
This is the dhcp config that runs on my router.
@ -15578,6 +15926,9 @@ This is the dhcp config that runs on my router.
}
#+end_src
**** Firezone
:PROPERTIES:
:CUSTOM_ID: h:f5daab4a-4699-47d0-a114-84fe596bc651
:END:
This is the dhcp config that runs on my router.
@ -16662,6 +17013,9 @@ Some standard options that should be set vor every microvm guest. We set the def
#+end_src
**** systemd-networkd (vlans/microvms)
:PROPERTIES:
:CUSTOM_ID: h:9e1b68cb-f482-417d-8be8-48bfbf3a0d99
:END:
This sets up the networking framework that is needed for a server that hosts microvms.
@ -16792,6 +17146,9 @@ The general idea is as follows:
#+end_src
**** nix-topology node config
:PROPERTIES:
:CUSTOM_ID: h:cf8bde8c-edc8-4b48-a29e-86f01b4b1b50
:END:
Hold standard options for nix-topology per config
@ -21075,6 +21432,9 @@ Sets up a systemd user service for anki that does not stall the shutdown process
#+end_src
***** TODO attic store push service
:PROPERTIES:
:CUSTOM_ID: h:79ebe062-d5f5-46a4-9e7b-bd3df0c8699b
:END:
Normally, I want to push all nix build artifacts to my main cache automatically, which is realized here. Note that authentication to the cache must be done manually once on client nodes. TODO: fix that
@ -26159,6 +26519,9 @@ This script allows for quick git replace of a string.
#+end_src
***** swarsel-gens
:PROPERTIES:
:CUSTOM_ID: h:999c8ac5-4fca-467e-9810-fc861068a0ff
:END:
This script quickly lists all nix generatinos on the system
@ -26177,6 +26540,9 @@ This script quickly lists all nix generatinos on the system
#+end_src
***** swarsel-switch
:PROPERTIES:
:CUSTOM_ID: h:209c0d31-aefa-4800-bc81-54727d2712f5
:END:
This script quickly switches to another nix generation.
@ -26430,6 +26796,9 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
#+end_src
**** MicroVM
:PROPERTIES:
:CUSTOM_ID: h:fd4f28dd-7cdc-40b1-8b43-be0ef6e1ad29
:END:
#+begin_src nix-ts :tangle profiles/nixos/microvm/default.nix :mkdirp yes
{ lib, config, ... }:
@ -30981,8 +31350,11 @@ This is the stylesheet used by waybar.
#+end_src
** Doc Page style.css
:PROPERTIES:
:CUSTOM_ID: h:6d8fa5d7-8c28-4183-b9e8-c656995176cb
:END:
This is the stylesheet used by waybar.
This is the stylesheet used by the [[#h:12880c64-229c-4063-9eea-387a97490676][HTML version of this document]]. Mostly this holds logic for hiding/showing the pin icons and resizing the page dynamically.
#+begin_src css :tangle site/style.css :mkdirp yes
html, body {
@ -33194,9 +33566,8 @@ Here lies defined the readme for GitHub and Forgejo:
These are in random order (also known as 'the order in which I discovered them'). I would like to express my gratitude to:
- All the great people who have contributed code for the nix-community, with special mentions for (this list is unfairly incomplete):
<details>
<summary>Click here to expand...</summary>
<summary>The great people who have contributed code for the nix-community, with special mentions for (this list is unfairly incomplete)</summary>
- [guibou](https://github.com/guibou/)
- [rycee](https://github.com/rycee)
@ -33221,9 +33592,8 @@ Here lies defined the readme for GitHub and Forgejo:
- [oddlama](https://github.com/oddlama)
</details>
- All the people who have inspired me with their configurations (sadly also highly incomplete):
<details>
<summary>Click here to expand...</summary>
<summary>The people who have inspired me with their configurations (sadly also highly incomplete)</summary>
- [theSuess](https://github.com/theSuess) with their [home-manager](https://code.kulupu.party/thesuess/home-manager)
- [hlissner](https://github.com/hlissner) with their [dotfiles](https://github.com/hlissner/dotfiles)
@ -33236,7 +33606,7 @@ Here lies defined the readme for GitHub and Forgejo:
- [EmergentMind](https://github.com/EmergentMind) with their [nix-config](https://github.com/EmergentMind/nix-config)
- [librephoenix](https://github.com/librephoenix) with their [nixos-config](https://github.com/librephoenix/nixos-config)
- [Xe](https://github.com/Xe) with their [blog](https://xeiaso.net/blog/)
- [oddlama](https://github.com/oddlama) with their absolutely incredible [nix-config](https:/github.com/oddlama/nix-config)
- [oddlama](https://github.com/oddlama) with their [nix-config](https:/github.com/oddlama/nix-config)
</details>
If you feel that I forgot to pay you tribute for code that I used in this repository, please shoot me a message and I will fix it :)
@ -33252,6 +33622,9 @@ Here lies defined the readme for GitHub and Forgejo:
This sections explains commonly used functions in nix (both builtins as well as in the nixpkgs library).
** Concepts
:PROPERTIES:
:CUSTOM_ID: h:05d71a64-16d7-4151-8d10-2ed17f1013fa
:END:
*** The '//' operator
:PROPERTIES:
:CUSTOM_ID: h:b1fe7a9a-661b-4446-aefa-98373108f8fd
@ -33279,6 +33652,9 @@ Also, this will not merge nested sets:
** Builtin functions
:PROPERTIES:
:CUSTOM_ID: h:ebe86cf4-fe65-464f-8f64-04b57870c5e9
:END:
The following functions are only base functionality of nix, and not exported to nixpkgs. When using them we need to make sure that the nix version in use is matching the expected function.
@ -33297,6 +33673,9 @@ The following functions are only base functionality of nix, and not exported to
: { bakery = "directory"; hotel= "directory"; milkywell = "directory"; moonside = "directory"; pyramid = "directory"; toto = "directory"; winters = "directory"; }
** Builtin functions exported to nixpkgs
:PROPERTIES:
:CUSTOM_ID: h:c0e9a87e-4808-46b2-86ec-bebc317cc459
:END:
These functions exist in nix, but are exported to nixpkgs to make sure they use a nix version that works in the used nixpgks. Most of the times I should prefer to use the nixpkgs version of these.
@ -33524,6 +33903,9 @@ The result list always begins with non-matching patterns, so if the first charac
: abo
** Functions in nixpgks
:PROPERTIES:
:CUSTOM_ID: h:ae17063b-cc81-4efc-914e-35ff4713787d
:END:
These functions only exist in nixpkgs and cannot be used in generic nix code.