switch to plain HTML
This commit is contained in:
parent
0793a08c12
commit
eeac83e132
29 changed files with 445 additions and 518 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
result
|
||||
public/
|
||||
**/_gen
|
0
.gitmodules
vendored
0
.gitmodules
vendored
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
55
blog/gpg/index.html
Normal file
55
blog/gpg/index.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>dadada's web log</title>
|
||||
<link rel="alternate" type="application/atom+xml" href="https://dadada.li/feed.xml" title="dadada">
|
||||
</head>
|
||||
<body style="min-width:30em; max-width:60em; margin-left:auto; margin-right:auto">
|
||||
<header>
|
||||
<nav>
|
||||
<a href="https://dadada.li/">dadada</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<h1>Managing Stripped GPG Keys</h1>
|
||||
<pre>
|
||||
+--(master pass) +----(user pass)--+
|
||||
| | | |
|
||||
| decrypts decrypts decrypts
|
||||
| | | |
|
||||
| v v v
|
||||
decrypts +----------------+ +----------+ +-----------+
|
||||
| | TRUSTED | | ANDROID | | KEYCHAIN |
|
||||
| | SCA (master) | | SE (ssb) | | SEA (ssb) |
|
||||
| | offline + HSM | | Sandbox | | HSM |
|
||||
| +----------------+ +----------+ +-----------+
|
||||
| | ^ ^
|
||||
| | | |
|
||||
| +----creates-------------|-----------------+
|
||||
|
|
||||
| +-----------------+
|
||||
| | PAPER |
|
||||
+->| SEA (master) |
|
||||
| remote on paper |
|
||||
+-----------------+
|
||||
</pre>
|
||||
<p>
|
||||
See <a href="https://www.void.gr/kargig/blog/2013/12/02/creating-a-new-gpg-key-with-subkeys/">here</a> on how to strip the master key (sec) from your keyring and create secret subkeys (ssb) for daily active use.
|
||||
The master key can sign (S) new subkeys, create certificates (C) and provide authentication (A).
|
||||
The master key lives forever, while the ssb that is used for signing is created with an expiration date.
|
||||
All encryption keys may remain valid indefinitely until revoked.
|
||||
The master key can be used to revoke the subkeys.
|
||||
</p>
|
||||
<p>
|
||||
A few considerations
|
||||
<ul>
|
||||
<li>use a separate PIN on the trusted system / for the master key (sec) in case a key-logger reads the PIN on a semi-trusted machine (e.g. laptop or android) when decrypting a secret subkey (ssb)</li>
|
||||
<li>use subkey (A) for authenticating ssh</li>
|
||||
<li>keep master key offline / air-gapped</li>
|
||||
</ul
|
||||
</p>
|
||||
</main>
|
||||
<footer>Released: 2017-12-03</footer>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
62
blog/home-layout/index.html
Normal file
62
blog/home-layout/index.html
Normal file
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>dadada's web log</title>
|
||||
<link rel="alternate" type="application/atom+xml" href="https://dadada.li/feed.xml" title="dadada">
|
||||
</head>
|
||||
<body style="min-width:30em; max-width:60em; margin-left:auto; margin-right:auto">
|
||||
<header>
|
||||
<nav>
|
||||
<a href="https://dadada.li/">dadada</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<h1>My $HOME</h1>
|
||||
<p>Recently, I came across a blog posting titled <a href="https://morr.cc/home-sweet-home/">$HOME, sweet $HOME</a>, where <a href="https://morr.cc/"">@blinry</a> advocates for structuring your <code>HOME</code> directory based on projects and their activity. After reading this I felt inspired to finally have a look at the mess I made of my $HOME in the last years.</p>
|
||||
<p>A few things about my old <code>$HOME</code>:
|
||||
<ul>
|
||||
<li><code>Documents</code> contained basically everything I had accumulated during the last years besides music, videos, pictures and source code.</li>
|
||||
<li><code>projects</code> just contained one gigantic folder of all projects that I ever worked on. - the rest was based on the default <a href="https://freedesktop.org/wiki/Software/xdg-user-dirs/">xdg-user-dirs</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>If you sorted the files by file type like the default XDG directories
|
||||
suggest, files from one project may be scattered across many different
|
||||
directories.</p>
|
||||
<p>So my goal for the new <code>$HOME</code> was to have a clean directory structure where: - it is obvious where to place new files - paths do not become too long to type out - the directory structure relates to how I work</p>
|
||||
<p>A quick tour of my new <code>$HOME</code>:</p>
|
||||
<ul>
|
||||
<li><code>lib</code> for immutable files</li>
|
||||
<li><code>src</code> for mutable files</li>
|
||||
<li><code>tag</code> stores links to projects</li>
|
||||
<li><code>tmp</code> for unsorted files and downloads</li>
|
||||
</ul>
|
||||
<h2 id="the-project-directory">The project directory</h2>
|
||||
<p>All of my projects are stored in <code>src</code>. I use a flat directory structure, where every project has its own subdirectory based on its name. Projects can become part of one or more larger contexts through the use of tags.</p>
|
||||
<h2 id="tags">Tags</h2>
|
||||
<p>Tag directories are stored in <code>tag</code>. Each directory stores symbolic links to parts of a project that can be distributed around <code>lib</code> and <code>src</code>. One possible use for the tag directories is creating workbenches. If I use some directories in <code>lib</code> or <code>src</code> in different contexts,
|
||||
<code>tag</code> can be used to include them in multiple workbenches.</p>
|
||||
<p>An example workflow</p>
|
||||
<pre>
|
||||
$ cd tag
|
||||
$ mkdir -p course1/examples
|
||||
$ ln -s ~/src/example1 course1/examples/
|
||||
$ ln -s ~/lib/courses/course1 course1/material
|
||||
$ rm -r course1
|
||||
</pre>
|
||||
<p>I create new tags for various reasons, but mostly one for each larger context (e.g. work, hobbies, admin foo, thesis, courseXY) and some more for tracking project activity. There are four different tags in <code>tag</code> directory right now for tracking project activity:</p>
|
||||
<ul>
|
||||
<li>permanent</li>
|
||||
<li>active</li>
|
||||
<li>hold</li>
|
||||
<li>dead</li>
|
||||
</ul>
|
||||
<h2 id="workflow">Workflow</h2>
|
||||
<figure>
|
||||
<img src="home.svg" alt="Basically this" />
|
||||
<figcaption aria-hidden="true">Basically this</figcaption>
|
||||
</figure>
|
||||
</main>
|
||||
<footer>Released: 2018-09-03</footer>
|
||||
</body>
|
||||
</html>
|
22
blog/index.html
Normal file
22
blog/index.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>dadada's web log</title>
|
||||
<link rel="alternate" type="application/atom+xml" href="https://dadada.li/feed.xml" title="dadada">
|
||||
</head>
|
||||
<body style="min-width:30em; max-width:60em; margin-left:auto; margin-right:auto">
|
||||
<header>
|
||||
<nav>
|
||||
<a href="https://dadada.li/">dadada</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<h1>dadada's web log</h1>
|
||||
<ul>
|
||||
<li><a href="gpg">Managing striped GPG keys</a></li>
|
||||
<li><a href="home-layout">My $HOME</a></li>
|
||||
</ul>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
30
config.yaml
30
config.yaml
|
@ -1,30 +0,0 @@
|
|||
baseURL: 'https://dadada.li/'
|
||||
languageCode: 'en-us'
|
||||
title: 'dadada'
|
||||
theme: 'anubis'
|
||||
languageCode: 'en-us'
|
||||
|
||||
params:
|
||||
author: 'dadada'
|
||||
dateFormat: '2006-01-02'
|
||||
social:
|
||||
- id: github
|
||||
name: dadada
|
||||
- id: mastodon
|
||||
name: '@dadada@chaos.social'
|
||||
|
||||
menu:
|
||||
main:
|
||||
- identifier: blog
|
||||
name: Blog
|
||||
title: Blog
|
||||
url: /blog/
|
||||
- identifier: projects
|
||||
name: Projects
|
||||
title: Projects
|
||||
url: /projects/
|
||||
- identifier: talks
|
||||
name: Talks
|
||||
title: Talks
|
||||
url: /talks/
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
**Welcome to my personal homepage ;-)**
|
||||
|
||||
## Contents
|
||||
|
||||
- [Blog](blog/)
|
||||
- [Projects](projects/)
|
||||
- [Talks](talks/)
|
||||
|
||||
[Social](https://chaos.social/@dadada)
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
title: "dadada's Blog"
|
||||
---
|
||||
# dadada's Blog
|
||||
|
||||
- [Managing stripped GPG keys](gpg/)
|
||||
- [My $HOME](home-layout/)
|
|
@ -1,39 +0,0 @@
|
|||
---
|
||||
title: Managing stripped GPG keys
|
||||
date: 2017-12-03
|
||||
---
|
||||
# Managing stripped GPG keys
|
||||
|
||||
```
|
||||
+--(master pass) +----(user pass)--+
|
||||
| | | |
|
||||
| decrypts decrypts decrypts
|
||||
| | | |
|
||||
| v v v
|
||||
decrypts +----------------+ +----------+ +-----------+
|
||||
| | TRUSTED | | ANDROID | | KEYCHAIN |
|
||||
| | SCA (master) | | SE (ssb) | | SEA (ssb) |
|
||||
| | offline + HSM | | Sandbox | | HSM |
|
||||
| +----------------+ +----------+ +-----------+
|
||||
| | ^ ^
|
||||
| | | |
|
||||
| +----creates-------------|-----------------+
|
||||
|
|
||||
| +-----------------+
|
||||
| | PAPER |
|
||||
+->| SEA (master) |
|
||||
| remote on paper |
|
||||
+-----------------+
|
||||
```
|
||||
|
||||
See [here](https://www.void.gr/kargig/blog/2013/12/02/creating-a-new-gpg-key-with-subkeys/) on how to strip the master key (sec) from your keyring and create secret subkeys (ssb) for daily active use.
|
||||
The master key can sign (S) new subkeys, create certificates (C) and provide authentication (A).
|
||||
The master key lives forever, while the ssb that is used for signing is created with an expiration date.
|
||||
All encryption keys may remain valid indefinitely until revoked.
|
||||
The master key can be used to revoke the subkeys.
|
||||
|
||||
A few considerations
|
||||
|
||||
- use a separate PIN on the trusted system / for the master key (sec) in case a key-logger reads the PIN on a semi-trusted machine (e.g. laptop or android) when decrypting a secret subkey (ssb)
|
||||
- use subkey (A) for authenticating ssh
|
||||
- keep master key offline / air-gapped
|
|
@ -1,62 +0,0 @@
|
|||
---
|
||||
title: My $HOME
|
||||
date: 2018-09-03
|
||||
---
|
||||
|
||||
# My $HOME
|
||||
|
||||
Recently, I came across a blog posting titled "[$HOME, sweet $HOME](https://morr.cc/home-sweet-home/)", where [@blinry](https://morr.cc/) advocates for structuring your `$HOME` directory based on projects and their activity.
|
||||
After reading this I felt inspired to finally have a look at the mess I made of my `$HOME` in the last years.
|
||||
|
||||
A few things about my old `$HOME`:
|
||||
- ``Documents`` contained basically everything I had accumulated during the last years besides music, videos, pictures and source code.
|
||||
- ``projects`` just contained one gigantic folder of all projects that I ever worked on.
|
||||
- the rest was based on the default [xdg-user-dirs](https://freedesktop.org/wiki/Software/xdg-user-dirs/)
|
||||
|
||||
If you sorted the files by file type like the default XDG directories suggest, files from one project may be scattered across many different directories.
|
||||
|
||||
So my goal for the new `$HOME` was to have a clean directory structure where:
|
||||
- it is obvious where to place new files
|
||||
- paths do not become too long to type out
|
||||
- the directory structure relates to how I work
|
||||
|
||||
A quick tour of my new `$HOME`:
|
||||
|
||||
- `lib` for immutable files
|
||||
- `src` for mutable files
|
||||
- `tag` stores links to projects
|
||||
- `tmp` for unsorted files and downloads
|
||||
|
||||
## The project directory
|
||||
|
||||
All of my projects are stored in `src`.
|
||||
I use a flat directory structure, where every project has its own subdirectory based on its name.
|
||||
Projects can become part of one or more larger contexts through the use of tags.
|
||||
|
||||
## Tags
|
||||
|
||||
Tag directories are stored in `tag`.
|
||||
Each directory stores symbolic links to parts of a project that can be distributed around `lib` and `src`.
|
||||
One possible use for the tag directories is creating workbenches.
|
||||
If I use some directories in `lib` or `src` in different contexts, `tag` can be used to include them in multiple workbenches.
|
||||
|
||||
An example workflow
|
||||
```sh
|
||||
$ cd tag
|
||||
$ mkdir -p course1/examples
|
||||
$ ln -s ~/src/example1 course1/examples/
|
||||
$ ln -s ~/lib/courses/course1 course1/material
|
||||
$ rm -r course1
|
||||
```
|
||||
|
||||
I create new tags for various reasons, but mostly one for each larger context (e.g. work, hobbies, admin foo, thesis, courseXY) and some more for tracking project activity.
|
||||
There are four different tags in `tag` directory right now for tracking project activity:
|
||||
|
||||
- permanent
|
||||
- active
|
||||
- hold
|
||||
- dead
|
||||
|
||||
## Workflow
|
||||
|
||||

|
|
@ -1,50 +0,0 @@
|
|||
---
|
||||
title: dadada's projects
|
||||
---
|
||||
# dadada's projects
|
||||
|
||||
See also my [GitHub](https://github.com/dadada) and [Gitlab](https://gitlab.com/dadada_).
|
||||
|
||||
## Contributions
|
||||
|
||||
- [nixpkgs](https://github.com/NixOS/nixpkgs)
|
||||
Nix Packages collection
|
||||
- [nixos-hardware](https://github.com/NixOS/nixos-hardware)
|
||||
A collection of NixOS modules covering hardware quirks.
|
||||
- [RecipeMD](https://github.com/tstehr/RecipeMD)
|
||||
Markdown recipe format and cli tool
|
||||
|
||||
## Educational
|
||||
|
||||
- [ns-3-leo](https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo)
|
||||
Low earth orbit satellite topology simulation for ns-3
|
||||
- [Bob](https://github.com/dadada/Bob)
|
||||
- [Recipes](https://github.com/dadada/recipes)
|
||||
Collection of recipes
|
||||
- [Bachelor Thesis](https://github.com/dadada/bachelor-thesis)
|
||||
Evaluating transient node failures with FIT IoT-Lab
|
||||
- [netcalc](https://github.com/dadada/netcalc)
|
||||
A very simple network calculator.
|
||||
|
||||
## Recreational
|
||||
|
||||
- [UuidGen](https://gitlab.com/dadada_/uuidgen)
|
||||
Android UUID Generator with history and clipboard support
|
||||
- [mailbox2matrix](https://github.com/dadada/mailbox2matrix)
|
||||
Mailbox to Matrix bot
|
||||
- [inbox2matrix](https://github.com/dadada/inbox2matrix)
|
||||
Very hacky IMAP to Matrix bot
|
||||
- [portfs](https://github.com/dadada/portfs)
|
||||
TCP port file system, not really a file system
|
||||
- [vim-edge-n-scratch](https://github.com/dadada/vim-edge-n-scratch)
|
||||
Vim with etching and sketching
|
||||
|
||||
## "Professional"
|
||||
|
||||
- [abgabesystem](https://github.com/dadada/abgabesystem)
|
||||
Python module and CI scripts for managing student homework in gitlab
|
||||
|
||||
## Configs and scripts
|
||||
|
||||
- [nixpkgs config](https://github.com/dadada/nix-config)
|
||||
Configuration for Nix Packages
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
title: Talks
|
||||
---
|
||||
# Talks
|
||||
|
||||
## [NixOS for Lazy Admins](https://gitli.stratum0.org/dadada/lazy-admin-talk)
|
||||
|
||||
[Source](https://gitli.stratum0.org/dadada/lazy-admin-talk), [Recording](https://bbb.stratum0.org/playback/presentation/2.3/b3f9875e5e8180697cd3d3029085a7ef441d513d-1694710080145)
|
|
@ -1,139 +0,0 @@
|
|||
---
|
||||
title: Gitlab als Archivar
|
||||
data: 2022-06-14
|
||||
---
|
||||
|
||||
# 📚 Gitlab als Archivar 📔
|
||||
|
||||
Eine kleine Spielerei zur Datensicherung.
|
||||
|
||||
🦣 @dadada@chaos.social
|
||||
|
||||
---
|
||||
|
||||
## Ausgangslage
|
||||
|
||||
Hochschulpolitik produziert viele Pads
|
||||
- Notizen
|
||||
- Protokolle
|
||||
- Todolisten
|
||||
|
||||
Pads verschwinden unerwartet
|
||||
- Server tot
|
||||
- Niemand erinnert sich mehr an den Link
|
||||
- Etherpad kann Löschfristen 🙈
|
||||
|
||||
Konsequenz:
|
||||
|
||||
---
|
||||
|
||||
|
||||
```
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥DATEN WEG🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Lösung 1: Copy-Paste
|
||||
|
||||
- $Person kopiert ab und zu das Pad irgendwo hin
|
||||
- $Person braucht muss dran denken, ist aber etwas verplant
|
||||
|
||||
```
|
||||
Pad Wiki
|
||||
+-------+ +-------+
|
||||
|- Info | |- Info |
|
||||
| ... | | ... |
|
||||
|- Hüte |---->|- Hüte |
|
||||
| ... | | ... |
|
||||
|- Ideen| |- Ideen|
|
||||
| ... | | ... |
|
||||
+-------+ +-------+
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Lösung 2: Git und Update-Script
|
||||
|
||||
- Pad-URLs in Datei
|
||||
- Pads als Plaintext exportieren
|
||||
- In Git einchecken
|
||||
|
||||
```
|
||||
+------------------------+ +------+
|
||||
|- http://pad.url/p/pad | | git |
|
||||
|- http://pad.url/p/pad1 |---->| \pad |
|
||||
| ... | | \pad1|
|
||||
| ... |
|
||||
```
|
||||
|
||||
[Update-Script](https://git.fginfo.tu-bs.de/fginfo/pad-archiver/-/blob/eac632d0cc68c7a9383a334088beadf00b930284/update)
|
||||
|
||||
---
|
||||
|
||||
## Lösung 3: CI
|
||||
|
||||
- Scheduled Task führt Update-Script aus
|
||||
- Gitlab committet Änderungen automatisch
|
||||
|
||||
```
|
||||
+--------------+ +-----------+
|
||||
| pad-archiver |-----CI---->| Container |
|
||||
+--------------+ +-----------+
|
||||
| |
|
||||
|`include: lib/gitlab-ci.yml |`image: ...
|
||||
v v
|
||||
+-----------+ +---------------+
|
||||
| pads-repo |--Scheduled->| Docker-Runner |
|
||||
| |<--Commits---| |
|
||||
+-----------+ +---------------+
|
||||
```
|
||||
|
||||
[CI-Config](https://git.fginfo.tu-bs.de/fginfo/pad-archiver/-/tree/eac632d0cc68c7a9383a334088beadf00b930284)
|
||||
<!-- Frage: andere unkonventionelle Spielereien mit Gitlab -->
|
||||
|
||||
---
|
||||
|
||||
## Lösung 4: Rewrite in Go
|
||||
|
||||
- Empfehlung: go-git - Git nativ in Go
|
||||
- versucht kompatibel zu Git's Plumbing und Porcelain zu sein
|
||||
- wird unter Anderem von Keybase und Gitea benutzt
|
||||
- LOC ist jetzt ein bisschen sehr viel mehr ...
|
||||
|
||||
```
|
||||
,_---~~~~~----._ +--------------+
|
||||
_,,_,*^____ _____``*g*\"*, | THIS IS FINE |
|
||||
/ __/ /' ^. / \ ^@q f +--------------+
|
||||
[ @f | @)) | | @)) l 0 _/ //
|
||||
\`/ \~____ / __ \_____/ \ //
|
||||
| _l__l_ I `
|
||||
} [______] I
|
||||
] | | | |
|
||||
] ~ ~ |
|
||||
| |
|
||||
| |
|
||||
```
|
||||
|
||||
[Rewritten](https://git.fginfo.tu-bs.de/fginfo/pad-archiver)
|
|
@ -1,85 +0,0 @@
|
|||
---
|
||||
title: systemd.generator(7)
|
||||
data: 2019-03-14
|
||||
---
|
||||
# systemd.generator(7)
|
||||
|
||||
[Recording](https://www.youtube.com/watch?v=X88zHJjodFw)
|
||||
|
||||
# Dynamische Systeme sind schwierig
|
||||
|
||||
- ➤ Devices, Mountpoints, Services, Timer möglichst als Unit
|
||||
- Transitionstechnologie für `/etc/fstab` und SysV init-Skripte
|
||||
- Hooks für den Bootprozess (System-Update, Resume, Debug ...)
|
||||
- Umgebungsvariablen setzen
|
||||
- ➤ Generatoren generieren beim Boot dynamisch Units
|
||||
|
||||
# Calling convention
|
||||
|
||||
`# /path/to/generator normal-dir early-dir late-dir`
|
||||
|
||||
- Generatoren sind in
|
||||
- `/run/systemd/{system,user}-generators/*`
|
||||
- `/etc/systemd/{system,user}-generators/*`
|
||||
- `/usr/lib/systemd/{system,user}-generators/*`
|
||||
- `/usr/local/lib/systemd/{system,user}-generators/*`
|
||||
|
||||
|
||||
# Generierte Units
|
||||
|
||||
- neu generieren mit `systemctl daemon-reload`
|
||||
- generierte Units landen in
|
||||
- `normal-dir` ➤ `/run/systemd/generator`
|
||||
- `early-dir` ➤ `/run/systemd/generator.early`
|
||||
- `late-dir` ➤ `/run/systemd/generator.late`
|
||||
|
||||
# Templating
|
||||
|
||||
- generierte Units dürfen auch sein
|
||||
- Templates
|
||||
- Instanzen von Templates (`getty@tty1.service`)
|
||||
- Generatoren können auch Symlinks in `.wants/`, `.target` und `.requires/` erstellen
|
||||
|
||||
# Abhängigkeiten vermeiden
|
||||
- kein syslog oder journal benutzen
|
||||
- keine Units starten
|
||||
- keine nicht essentiellen Dateisysteme verwenden (aber /proc, /usr, /sys und /dev)
|
||||
- Generatoren werden parallel ausgeführt
|
||||
|
||||
# Performance
|
||||
|
||||
kann Boot verlangsamen ➤ Nicht mit bash implementieren, lieber C
|
||||
|
||||
# Debugging
|
||||
|
||||
```
|
||||
dir=$(mktemp -d)
|
||||
SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/system-generators/systemd-fstab-generator "$dir" "$dir" "$dir"
|
||||
find $dir
|
||||
```
|
||||
|
||||
- syslog(3) ist nicht vefügbar
|
||||
- keine Magie versuchen
|
||||
|
||||
# Nicht geeignet für
|
||||
|
||||
- Ersatz von init-Skripten
|
||||
➤ systemd-sysv-generator(8)
|
||||
- dynamische Konfigurationsdateien
|
||||
➤ `ExecStartPre=` oder Service mit `Before=`
|
||||
|
||||
# Beispiele
|
||||
|
||||
- systemd-fstab-generator(8)
|
||||
|
||||
- systemd-debug-generator(8)
|
||||
|
||||
- systemd-getty-generator(8)
|
||||
|
||||
- systemd-sysv-generator(8)
|
||||
|
||||
- systemd.environment-generator(7)
|
||||
|
||||
# Source
|
||||
|
||||
- `man 7 systemd.generator`
|
19
default.nix
19
default.nix
|
@ -1,19 +0,0 @@
|
|||
{ stdenv, hugo, hugo-theme-anubis }:
|
||||
stdenv.mkDerivation rec {
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ hugo ];
|
||||
# avoid git submodules using flakes :-)
|
||||
patchPhase = ''
|
||||
mkdir -p themes/
|
||||
ln -s ${hugo-theme-anubis} themes/anubis
|
||||
'';
|
||||
buildPhase = ''
|
||||
hugo
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r public/* $out
|
||||
'';
|
||||
name = "dadada.li";
|
||||
version = "0.2";
|
||||
}
|
45
feed.xml
Normal file
45
feed.xml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>dadada's blog</title>
|
||||
<link href="https://dadada.li/blog"/>
|
||||
<updated>2023-11-13T20:06:45+01:00</updated>
|
||||
<author>
|
||||
<name>Tim Schubert</name>
|
||||
</author>
|
||||
<id>urn:uuid:aebe0d6d-40d7-46f5-8ad7-5ad5b60e9c57</id>
|
||||
<entry>
|
||||
<title>NixOS for Lazy Admins</title>
|
||||
<link href="https://gitli.stratum0.org/dadada/lazy-admin-talk"/>
|
||||
<id>urn:uuid:0879def1-bd89-4fa0-97fc-58541378c714</id>
|
||||
<updated>2023-09-14</updated>
|
||||
<summary><a href="https://bbb.stratum0.org/playback/presentation/2.3/b3f9875e5e8180697cd3d3029085a7ef441d513d-1694710080145">Recording</a></summary>
|
||||
</entry>
|
||||
<entry>
|
||||
<title>Gitlab als Archivar</title>
|
||||
<link href="https://dadada.li/talks/pad-archiver"/>
|
||||
<id>urn:uuid:0eca066e-922e-4df7-a495-bff5a78448ef</id>
|
||||
<updated>2022-06-14</updated>
|
||||
<summary>Gitlab als Archivar</summary>
|
||||
</entry>
|
||||
<entry>
|
||||
<title>systemd-generator(7)</title>
|
||||
<link href="https://dadada.li/talks/systemd-generator"/>
|
||||
<id>urn:uuid:d4ec7148-747e-4724-9d83-d565b96f28e5</id>
|
||||
<updated>2019-03-14</updated>
|
||||
<summary>systemd-generator(7)</summary>
|
||||
</entry>
|
||||
<entry>
|
||||
<title>My $HOME</title>
|
||||
<link href="https://dadada.li/blog/home-layout"/>
|
||||
<id>urn:uuid:ffe1d09a-87aa-448a-a80c-efa175430bbf</id>
|
||||
<updated>2018-09-03</updated>
|
||||
<summary>My $HOME</summary>
|
||||
</entry>
|
||||
<entry>
|
||||
<title>Managing Striped GPG Keys</title>
|
||||
<link href="https://dadada.li/blog/gpg"/>
|
||||
<id>urn:uuid:ff6cbe87-67f8-415f-9ed5-6ec2a99a51a3</id>
|
||||
<updated>2017-12-03</updated>
|
||||
<summary>Managing Striped GPG Keys</summary>
|
||||
</entry>
|
||||
</feed>
|
41
flake.lock
generated
41
flake.lock
generated
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"hugo-theme-anubis": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1693734155,
|
||||
"narHash": "sha256-/saWnt2ryheBvW9aHqpjAE4aNBhEhkrD62Ch8CI2GvM=",
|
||||
"owner": "mitrichius",
|
||||
"repo": "hugo-theme-anubis",
|
||||
"rev": "e4e2c0bc4145ee152a32fdd940ed398ab0b77e6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mitrichius",
|
||||
"repo": "hugo-theme-anubis",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1694499547,
|
||||
"narHash": "sha256-R7xMz1Iia6JthWRHDn36s/E248WB1/je62ovC/dUVKI=",
|
||||
"path": "/nix/store/zxh6mqr25a59giy1a0ca37njv92lv9hy-source",
|
||||
"rev": "e5f018cf150e29aac26c61dac0790ea023c46b24",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"hugo-theme-anubis": "hugo-theme-anubis",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
14
flake.nix
14
flake.nix
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
description = "dadada's homepage";
|
||||
|
||||
inputs = {
|
||||
hugo-theme-anubis = {
|
||||
url = github:mitrichius/hugo-theme-anubis;
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, hugo-theme-anubis, nixpkgs }: {
|
||||
packages.x86_64-linux.homePage = nixpkgs.legacyPackages.x86_64-linux.callPackage ./default.nix { inherit hugo-theme-anubis; };
|
||||
};
|
||||
}
|
38
index.html
Normal file
38
index.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>dadada</title>
|
||||
<link rel="alternate" type="application/atom+xml" href="https://dadada.li/feed.xml" title="dadada">
|
||||
</head>
|
||||
<body style="min-width:30em; max-width:60em; margin-left:auto; margin-right:auto">
|
||||
<header>
|
||||
<nav>
|
||||
<a href="https://dadada.li/">dadada</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<h1>dadada's web page</h1>
|
||||
<p>Things I enjoy: learning things and skills, making and eating food, weird music, biking, trains</p>
|
||||
<p>Tech stuff: Rust, Nix, networking, aircrafts, and a sprinkle of science, recovering from PHP, iOS, Android, explorer of legacy codebases</p>
|
||||
<h2>Socials</h2>
|
||||
<ul>
|
||||
<li><a href="https://chaos.social/@dadada">Fediverse</a></li>
|
||||
<li><a href="https://github.com/dadada">GitHub</a></li>
|
||||
<li><a href="https://matrix.to/#/@dadada:stratum0.org">Matrix</a></li>
|
||||
<li><a href="mailto:dadada@dadada.li">email</a></li>
|
||||
</ul>
|
||||
<h2>Talks</h2>
|
||||
<ul>
|
||||
<li><a href="https://gitli.stratum0.org/dadada/lazy-admin-talk">NixOS for Lazy Admins (2023-09-14)</a>, <a href="https://bbb.stratum0.org/playback/presentation/2.3/b3f9875e5e8180697cd3d3029085a7ef441d513d-1694710080145">Recording</a></li>
|
||||
<li><a href="talks/pad-archiver">Gitlab als Archivar (2022-06-14)</a></li>
|
||||
<li><a href="talks/systemd-generator">systemd-generator(7) (2019-03-14)</a></li>
|
||||
</ul>
|
||||
<h2>Blog</h2>
|
||||
<ul>
|
||||
<li><a href="blog/home-layout">My $HOME (2018-09-03)</a></li>
|
||||
<li><a href="blog/gpg">Managing Striped GPG Keys (2017-12-03)</a></li>
|
||||
</ul>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
with pkgs;
|
||||
{
|
||||
this = callPackage ./default.nix { };
|
||||
}
|
123
talks/pad-archiver/index.html
Normal file
123
talks/pad-archiver/index.html
Normal file
|
@ -0,0 +1,123 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>dadada</title>
|
||||
<link rel="alternate" type="application/atom+xml" href="https://dadada.li/feed.xml" title="dadada">
|
||||
</head>
|
||||
<body style="min-width:30em; max-width:60em; margin-left:auto; margin-right:auto">
|
||||
<header>
|
||||
<nav>
|
||||
<a href="https://dadada.li/">dadada</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<h1 id="gitlab-als-archivar">📚 Gitlab als Archivar 📔</h1>
|
||||
<p>Eine kleine Spielerei zur Datensicherung.</p>
|
||||
<p>🦣 <span class="citation" data-cites="dadada">@dadada</span><span
|
||||
class="citation" data-cites="chaos.social">@chaos.social</span></p>
|
||||
<hr />
|
||||
<h2 id="ausgangslage">Ausgangslage</h2>
|
||||
<p>Hochschulpolitik produziert viele Pads - Notizen - Protokolle -
|
||||
Todolisten</p>
|
||||
<p>Pads verschwinden unerwartet - Server tot - Niemand erinnert sich
|
||||
mehr an den Link - Etherpad kann Löschfristen 🙈</p>
|
||||
<p>Konsequenz:</p>
|
||||
<hr />
|
||||
<pre><code>🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥DATEN WEG🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
|
||||
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥</code></pre>
|
||||
<hr />
|
||||
<h2 id="lösung-1-copy-paste">Lösung 1: Copy-Paste</h2>
|
||||
<ul>
|
||||
<li>$Person kopiert ab und zu das Pad irgendwo hin</li>
|
||||
<li>$Person braucht muss dran denken, ist aber etwas verplant</li>
|
||||
</ul>
|
||||
<pre><code>Pad Wiki
|
||||
+-------+ +-------+
|
||||
|- Info | |- Info |
|
||||
| ... | | ... |
|
||||
|- Hüte |---->|- Hüte |
|
||||
| ... | | ... |
|
||||
|- Ideen| |- Ideen|
|
||||
| ... | | ... |
|
||||
+-------+ +-------+</code></pre>
|
||||
<hr />
|
||||
<h2 id="lösung-2-git-und-update-script">Lösung 2: Git und
|
||||
Update-Script</h2>
|
||||
<ul>
|
||||
<li>Pad-URLs in Datei</li>
|
||||
<li>Pads als Plaintext exportieren</li>
|
||||
<li>In Git einchecken</li>
|
||||
</ul>
|
||||
<pre><code>+------------------------+ +------+
|
||||
|- http://pad.url/p/pad | | git |
|
||||
|- http://pad.url/p/pad1 |---->| \pad |
|
||||
| ... | | \pad1|
|
||||
| ... |</code></pre>
|
||||
<p><a
|
||||
href="https://git.fginfo.tu-bs.de/fginfo/pad-archiver/-/blob/eac632d0cc68c7a9383a334088beadf00b930284/update">Update-Script</a></p>
|
||||
<hr />
|
||||
<h2 id="lösung-3-ci">Lösung 3: CI</h2>
|
||||
<ul>
|
||||
<li>Scheduled Task führt Update-Script aus</li>
|
||||
<li>Gitlab committet Änderungen automatisch</li>
|
||||
</ul>
|
||||
<pre><code>+--------------+ +-----------+
|
||||
| pad-archiver |-----CI---->| Container |
|
||||
+--------------+ +-----------+
|
||||
| |
|
||||
|`include: lib/gitlab-ci.yml |`image: ...
|
||||
v v
|
||||
+-----------+ +---------------+
|
||||
| pads-repo |--Scheduled->| Docker-Runner |
|
||||
| |<--Commits---| |
|
||||
+-----------+ +---------------+</code></pre>
|
||||
<p><a
|
||||
href="https://git.fginfo.tu-bs.de/fginfo/pad-archiver/-/tree/eac632d0cc68c7a9383a334088beadf00b930284">CI-Config</a>
|
||||
<!-- Frage: andere unkonventionelle Spielereien mit Gitlab --></p>
|
||||
<hr />
|
||||
<h2 id="lösung-4-rewrite-in-go">Lösung 4: Rewrite in Go</h2>
|
||||
<ul>
|
||||
<li>Empfehlung: go-git - Git nativ in Go
|
||||
<ul>
|
||||
<li>versucht kompatibel zu Git’s Plumbing und Porcelain zu sein</li>
|
||||
<li>wird unter Anderem von Keybase und Gitea benutzt</li>
|
||||
</ul></li>
|
||||
<li>LOC ist jetzt ein bisschen sehr viel mehr …</li>
|
||||
</ul>
|
||||
<pre><code> ,_---~~~~~----._ +--------------+
|
||||
_,,_,*^____ _____``*g*\"*, | THIS IS FINE |
|
||||
/ __/ /' ^. / \ ^@q f +--------------+
|
||||
[ @f | @)) | | @)) l 0 _/ //
|
||||
\`/ \~____ / __ \_____/ \ //
|
||||
| _l__l_ I `
|
||||
} [______] I
|
||||
] | | | |
|
||||
] ~ ~ |
|
||||
| |
|
||||
| | </code></pre>
|
||||
<p><a
|
||||
href="https://git.fginfo.tu-bs.de/fginfo/pad-archiver">Rewritten</a></p>
|
||||
</main>
|
||||
<footer>Released: 2022-12-03</footer>
|
||||
</body>
|
||||
</html>
|
100
talks/systemd-generator/index.html
Normal file
100
talks/systemd-generator/index.html
Normal file
|
@ -0,0 +1,100 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>systemd.generator(7)</title>
|
||||
<link rel="alternate" type="application/atom+xml" href="https://dadada.li/feed.xml" title="dadada">
|
||||
</head>
|
||||
<body style="min-width:30em; max-width:60em; margin-left:auto; margin-right:auto">
|
||||
<header>
|
||||
<nav>
|
||||
<a href="https://dadada.li/">dadada</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<h1 id="systemd.generator7">systemd.generator(7)</h1>
|
||||
<p><a
|
||||
href="https://www.youtube.com/watch?v=X88zHJjodFw">Recording</a></p>
|
||||
<h1 id="dynamische-systeme-sind-schwierig">Dynamische Systeme sind
|
||||
schwierig</h1>
|
||||
<ul>
|
||||
<li>➤ Devices, Mountpoints, Services, Timer möglichst als Unit</li>
|
||||
<li>Transitionstechnologie für <code>/etc/fstab</code> und SysV
|
||||
init-Skripte</li>
|
||||
<li>Hooks für den Bootprozess (System-Update, Resume, Debug …)</li>
|
||||
<li>Umgebungsvariablen setzen</li>
|
||||
<li>➤ Generatoren generieren beim Boot dynamisch Units</li>
|
||||
</ul>
|
||||
<h1 id="calling-convention">Calling convention</h1>
|
||||
<p><code># /path/to/generator normal-dir early-dir late-dir</code></p>
|
||||
<ul>
|
||||
<li>Generatoren sind in
|
||||
<ul>
|
||||
<li><code>/run/systemd/{system,user}-generators/*</code></li>
|
||||
<li><code>/etc/systemd/{system,user}-generators/*</code></li>
|
||||
<li><code>/usr/lib/systemd/{system,user}-generators/*</code></li>
|
||||
<li><code>/usr/local/lib/systemd/{system,user}-generators/*</code></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h1 id="generierte-units">Generierte Units</h1>
|
||||
<ul>
|
||||
<li>neu generieren mit <code>systemctl daemon-reload</code></li>
|
||||
<li>generierte Units landen in
|
||||
<ul>
|
||||
<li><code>normal-dir</code> ➤ <code>/run/systemd/generator</code></li>
|
||||
<li><code>early-dir</code> ➤
|
||||
<code>/run/systemd/generator.early</code></li>
|
||||
<li><code>late-dir</code> ➤
|
||||
<code>/run/systemd/generator.late</code></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h1 id="templating">Templating</h1>
|
||||
<ul>
|
||||
<li>generierte Units dürfen auch sein
|
||||
<ul>
|
||||
<li>Templates</li>
|
||||
<li>Instanzen von Templates (<code>getty@tty1.service</code>)</li>
|
||||
</ul></li>
|
||||
<li>Generatoren können auch Symlinks in <code>.wants/</code>,
|
||||
<code>.target</code> und <code>.requires/</code> erstellen</li>
|
||||
</ul>
|
||||
<h1 id="abhängigkeiten-vermeiden">Abhängigkeiten vermeiden</h1>
|
||||
<ul>
|
||||
<li>kein syslog oder journal benutzen</li>
|
||||
<li>keine Units starten</li>
|
||||
<li>keine nicht essentiellen Dateisysteme verwenden (aber /proc, /usr,
|
||||
/sys und /dev)</li>
|
||||
<li>Generatoren werden parallel ausgeführt</li>
|
||||
</ul>
|
||||
<h1 id="performance">Performance</h1>
|
||||
<p>kann Boot verlangsamen ➤ Nicht mit bash implementieren, lieber C</p>
|
||||
<h1 id="debugging">Debugging</h1>
|
||||
<pre><code>dir=$(mktemp -d)
|
||||
SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/system-generators/systemd-fstab-generator "$dir" "$dir" "$dir"
|
||||
find $dir</code></pre>
|
||||
<ul>
|
||||
<li>syslog(3) ist nicht vefügbar</li>
|
||||
<li>keine Magie versuchen</li>
|
||||
</ul>
|
||||
<h1 id="nicht-geeignet-für">Nicht geeignet für</h1>
|
||||
<ul>
|
||||
<li>Ersatz von init-Skripten ➤ systemd-sysv-generator(8)</li>
|
||||
<li>dynamische Konfigurationsdateien ➤ <code>ExecStartPre=</code> oder
|
||||
Service mit <code>Before=</code></li>
|
||||
</ul>
|
||||
<h1 id="beispiele">Beispiele</h1>
|
||||
<ul>
|
||||
<li><p>systemd-fstab-generator(8)</p></li>
|
||||
<li><p>systemd-debug-generator(8)</p></li>
|
||||
<li><p>systemd-getty-generator(8)</p></li>
|
||||
<li><p>systemd-sysv-generator(8)</p></li>
|
||||
<li><p>systemd.environment-generator(7)</p></li>
|
||||
</ul>
|
||||
<h1 id="source">Source</h1>
|
||||
<ul>
|
||||
<li><code>man 7 systemd.generator</code></li>
|
||||
</ul>
|
||||
</main>
|
||||
<footer>Released: 2019-03-14</footer>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue