From 5fa69499917fab7a026c90c8321dbcc22734106a Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 18 Apr 2025 20:59:28 +0200 Subject: vault backup: 2025-04-18 20:59:28 --- .obsidian/core-plugins.json | 3 +- .obsidian/workspace.json | 47 ++++++++++++++++++++++-------- NixOS - Imperative container management.md | 3 +- NixOS - container directories.md | 3 ++ 4 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 NixOS - container directories.md diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json index 436f43c..c89a841 100644 --- a/.obsidian/core-plugins.json +++ b/.obsidian/core-plugins.json @@ -26,5 +26,6 @@ "workspaces": false, "file-recovery": true, "publish": false, - "sync": false + "sync": false, + "webviewer": false } \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index d6443a3..a2188ff 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -58,17 +58,40 @@ "state": { "type": "markdown", "state": { - "file": "Distinction between imperative and declarative programming.md", + "file": "NixOS - Imperative container management.md", "mode": "source", + "source": false, "backlinks": true, - "source": false + "backlinkOpts": { + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + } }, "icon": "lucide-file", - "title": "Distinction between imperative and declarative programming" + "title": "NixOS - Imperative container management" + } + }, + { + "id": "d6457f004bde4cac", + "type": "leaf", + "state": { + "type": "split-diff-view", + "state": { + "aFile": ".obsidian/workspace.json", + "bFile": ".obsidian/workspace.json", + "aRef": "" + }, + "icon": "diff", + "title": "Diff: workspace.json" } } ], - "currentTab": 3 + "currentTab": 4 } ], "direction": "vertical" @@ -219,12 +242,16 @@ "obsidian-excalidraw-plugin:New drawing": false } }, - "active": "1fb3c7b7af372a3c", + "active": "d6457f004bde4cac", "lastOpenFiles": [ - "Nix Inherit.md", + "NixOS - container directories.md", + "NixOS - Imperative container management.md", + "NixOS - Declarative container management.md", + "NixOS - Containers.md", + "NixOS - Container networking.md", "Distinction between imperative and declarative programming.md", + "Nix Inherit.md", "NixOS - Advantage of imperative container management.md", - "NixOS - Imperative container management.md", "Freenet CPU steal graph.md", "Test.md", "Build custom modules as profiles to manage various NixOS hosts.md", @@ -244,10 +271,6 @@ "Excalidraw", "Ideas versus facts.md", "Installing a devstack plugin.md", - "Making notes useful.md", - "NixOS - Declarative container management.md", - "NixOS - Containers.md", - "NixOS - Container networking.md", - "Practice summarizing and paraphrasing.md" + "Making notes useful.md" ] } \ No newline at end of file diff --git a/NixOS - Imperative container management.md b/NixOS - Imperative container management.md index 7099e6e..4dba2ec 100644 --- a/NixOS - Imperative container management.md +++ b/NixOS - Imperative container management.md @@ -1,7 +1,6 @@ As root using `nixos-container`. -Container root: `/var/lib/nixos-containers -Config file: `/etc/nixos-containers` +[[NixOS - container directories]] Create with: `nixos-container create foo`. During create we can pass `--config` or `--config-file`. diff --git a/NixOS - container directories.md b/NixOS - container directories.md new file mode 100644 index 0000000..8c02bad --- /dev/null +++ b/NixOS - container directories.md @@ -0,0 +1,3 @@ + +Container root: `/var/lib/nixos-containers +Config file: `/etc/nixos-containers` \ No newline at end of file -- cgit v1.2.3 From e8341d867b2ce5752664d0b4be4fef440ad56f21 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 18 Apr 2025 21:02:17 +0200 Subject: vault backup: 2025-04-18 21:02:17 --- .obsidian/workspace.json | 30 ++++++++---------------------- conflict-files-obsidian-git.md | 17 ----------------- 2 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 conflict-files-obsidian-git.md diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index b94e45a..61c850d 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -40,30 +40,16 @@ { "id": "be0892c76b1d189a", "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "Nix Inherit.md", - "mode": "source", - "backlinks": true, - "source": false - }, - "icon": "lucide-file", - "title": "Nix Inherit" - } - }, - { - "id": "1fb3c7b7af372a3c", - "type": "leaf", "state": { "type": "split-diff-view", "state": { - "aFile": "conflict-files-obsidian-git.md", - "bFile": "conflict-files-obsidian-git.md", - "aRef": "" + "aFile": ".obsidian/workspace.json", + "bFile": ".obsidian/workspace.json", + "aRef": "HEAD", + "bRef": "" }, "icon": "diff", - "title": "Diff: conflict-files-obsidian-git" + "title": "Diff: workspace.json" } }, { @@ -81,7 +67,7 @@ } } ], - "currentTab": 3 + "currentTab": 2 } ], "direction": "vertical" @@ -232,8 +218,9 @@ "obsidian-excalidraw-plugin:New drawing": false } }, - "active": "1fb3c7b7af372a3c", + "active": "be0892c76b1d189a", "lastOpenFiles": [ + "Nix Inherit.md", "NixOS - Imperative container management.md", "conflict-files-obsidian-git.md", "daily/18-Apr-2025.md", @@ -260,7 +247,6 @@ "OVN upgrade.md", "Network outage on single hypervisor causes Freenet to shutdown EVERYTHING.md", "Managing the amount of WSGI processes ran by apache is done from the apache site configuration.md", - "Managing Ceph on Devstack & OpenStack.md", "ESP", "Excalidraw" ] diff --git a/conflict-files-obsidian-git.md b/conflict-files-obsidian-git.md deleted file mode 100644 index d8bbd4f..0000000 --- a/conflict-files-obsidian-git.md +++ /dev/null @@ -1,17 +0,0 @@ -# Conflicts -Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push` -(This file will automatically be deleted before commit) -[[#Additional Instructions]] available below file list - -- Not a file: .obsidian/workspace.json - -# Additional Instructions -I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text. - -```diff -<<<<<<< HEAD - File changes in local repository -======= - File changes in remote repository ->>>>>>> origin/main -``` \ No newline at end of file -- cgit v1.2.3 From a00113edd596f0bad40269573999abd844ca82b5 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 18 Apr 2025 21:21:37 +0200 Subject: vault backup: 2025-04-18 21:21:37 --- .obsidian/graph.json | 8 +- .obsidian/workspace.json | 91 ++++++---------------- Inheriting from sets.md | 29 +++++++ ...rvisor causes Freenet to shutdown EVERYTHING.md | 1 + Nix Inherit.md | 28 ------- Working with Nix shells.md | 5 ++ daily/18-Apr-2025.md | 4 + weekly/2025 W16.md | 16 ++++ 8 files changed, 83 insertions(+), 99 deletions(-) create mode 100644 Inheriting from sets.md delete mode 100644 Nix Inherit.md create mode 100644 weekly/2025 W16.md diff --git a/.obsidian/graph.json b/.obsidian/graph.json index f8af85f..4b5202e 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -1,7 +1,7 @@ { - "collapse-filter": true, - "search": "", - "showTags": false, + "collapse-filter": false, + "search": "tag:#work", + "showTags": true, "showAttachments": false, "hideUnresolved": false, "showOrphans": true, @@ -17,6 +17,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 500, - "scale": 0.13348388671875, + "scale": 1.0136432647705078, "close": true } \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 61c850d..0f430c1 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -7,67 +7,22 @@ "id": "d7ac73dacb8efdbe", "type": "tabs", "children": [ - { - "id": "6bdd9a8324d3b0f0", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "Build custom modules as profiles to manage various NixOS hosts.md", - "mode": "source", - "backlinks": true, - "source": false - }, - "icon": "lucide-file", - "title": "Build custom modules as profiles to manage various NixOS hosts" - } - }, { "id": "84e32b3623ed3a00", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "NixOS - Advantage of imperative container management.md", + "file": "weekly/2025 W16.md", "mode": "source", "backlinks": true, "source": false }, "icon": "lucide-file", - "title": "NixOS - Advantage of imperative container management" - } - }, - { - "id": "be0892c76b1d189a", - "type": "leaf", - "state": { - "type": "split-diff-view", - "state": { - "aFile": ".obsidian/workspace.json", - "bFile": ".obsidian/workspace.json", - "aRef": "HEAD", - "bRef": "" - }, - "icon": "diff", - "title": "Diff: workspace.json" - } - }, - { - "id": "487206acc9e25de0", - "type": "leaf", - "state": { - "type": "split-diff-view", - "state": { - "aFile": ".gitignore", - "bFile": ".gitignore", - "aRef": "" - }, - "icon": "diff", - "title": "Diff: .gitignore" + "title": "2025 W16" } } - ], - "currentTab": 2 + ] } ], "direction": "vertical" @@ -98,7 +53,7 @@ "state": { "type": "search", "state": { - "query": "", + "query": "nix shell", "matchingCase": false, "explainSearch": false, "collapseAll": false, @@ -218,35 +173,37 @@ "obsidian-excalidraw-plugin:New drawing": false } }, - "active": "be0892c76b1d189a", + "active": "f1111e0bbe22e125", "lastOpenFiles": [ - "Nix Inherit.md", - "NixOS - Imperative container management.md", - "conflict-files-obsidian-git.md", + "daily/10-Apr-2025.md", + "A reason for becoming senior is that when Rutger is off I take most of his responsibilities.md", + "daily/11-Apr-2025.md", "daily/18-Apr-2025.md", - "daily/17-Apr-2025.md", + "weekly/2025 W16.md", "daily/16-Apr-2025.md", - "daily/15-Apr-2025.md", + "daily/17-Apr-2025.md", "daily/14-Apr-2025.md", - "daily/11-Apr-2025.md", - "daily/10-Apr-2025.md", + "weekly", + "archive", + "Network outage on single hypervisor causes Freenet to shutdown EVERYTHING.md", + "We don't support filesystem discard syscalls on our openstack platform.md", + "Exposing development headers on Nixos.md", + "Working with Nix shells.md", + "Inheriting from sets.md", + "daily/15-Apr-2025.md", + "Importing GPG keys from a keyserver.md", + "Build custom modules as profiles to manage various NixOS hosts.md", + "List of tags I use in this Vault and their purpose.md", + "NixOS - Advantage of imperative container management.md", + "NixOS - Imperative container management.md", + "conflict-files-obsidian-git.md", "daily", "YAGNI.md", "Writing a test double before the real implementation gives feedback on design.md", - "Working with Nix shells.md", - "We don't support filesystem discard syscalls on our openstack platform.md", "Using Libvirt to manage QEMU image bitmaps.md", "Updating the image os admin user to fix password resets.md", "The volume type of a Cinder volume can be changed.md", "Testing Golang programs.md", - "Tempest Plugin.md", - "TDD.md", - "Rewriting subselect into just an additional join.md", - "Random notes on Freenet deployment.md", - "OpenStack Tempest.md", - "OVN upgrade.md", - "Network outage on single hypervisor causes Freenet to shutdown EVERYTHING.md", - "Managing the amount of WSGI processes ran by apache is done from the apache site configuration.md", "ESP", "Excalidraw" ] diff --git a/Inheriting from sets.md b/Inheriting from sets.md new file mode 100644 index 0000000..556f3d4 --- /dev/null +++ b/Inheriting from sets.md @@ -0,0 +1,29 @@ +--- +tags: + - nix + - programming +--- +```nix +let x = 123; in +{ + inherit x; + y = 456; +} +``` +== +```nix +let x = 123; in +{ + x = x; + y = 456; +} +``` + +Can reference set +```nix +inherit (src-set) a b c; +``` +== +```nix +a = src-set.a; b = src-set.b; c = src-set.c; +``` \ No newline at end of file diff --git a/Network outage on single hypervisor causes Freenet to shutdown EVERYTHING.md b/Network outage on single hypervisor causes Freenet to shutdown EVERYTHING.md index d342ab9..640d35f 100644 --- a/Network outage on single hypervisor causes Freenet to shutdown EVERYTHING.md +++ b/Network outage on single hypervisor causes Freenet to shutdown EVERYTHING.md @@ -2,6 +2,7 @@ tags: - work - freenet + - outage --- [[Freenet CPU steal graph]] [[Random notes on Freenet deployment]] diff --git a/Nix Inherit.md b/Nix Inherit.md deleted file mode 100644 index 4a8adb0..0000000 --- a/Nix Inherit.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -tags: - - nix-lang ---- -```nix -let x = 123; in -{ - inherit x; - y = 456; -} -``` -== -```nix -let x = 123; in -{ - x = x; - y = 456; -} -``` - -Can reference set -```nix -inherit (src-set) a b c; -``` -== -```nix -a = src-set.a; b = src-set.b; c = src-set.c; -``` \ No newline at end of file diff --git a/Working with Nix shells.md b/Working with Nix shells.md index c042edd..5a073a9 100644 --- a/Working with Nix shells.md +++ b/Working with Nix shells.md @@ -1,5 +1,10 @@ +--- +tags: + - nix +--- Basic invocation: `nix-shell -p [ pkgs ... ]` +Nix shells are also used for [[Exposing development headers on Nixos]] # Shebang ``` #! /usr/bin/env nix-shell diff --git a/daily/18-Apr-2025.md b/daily/18-Apr-2025.md index 2b9620d..7105132 100644 --- a/daily/18-Apr-2025.md +++ b/daily/18-Apr-2025.md @@ -1,3 +1,7 @@ +--- +tags: [] +--- +# Today Encountered oom on lxchosts. Turned out that octavia wsgi was using huge amounts of ram. First we disabled the apache on all octavia to prevent more oom kills. After that Erik limited their allowed memory usage, and we turned them back on. diff --git a/weekly/2025 W16.md b/weekly/2025 W16.md new file mode 100644 index 0000000..bd3f392 --- /dev/null +++ b/weekly/2025 W16.md @@ -0,0 +1,16 @@ +This is the first week in the new format! I almost forgot about doing this.. Let's try to keep it up! + +* [[14-Apr-2025]] +- [[15-Apr-2025]] +- [[16-Apr-2025]] +- [[17-Apr-2025]] + +QA with Webglobe team, who are developing another control panel. Was short. Happy that Rutger was there, they asked some question that I wouldn't be able to answer easily. Which means there is a gap in my knowledge. I added a note about this in my kast. + +We did an interview with Ali. Ali has prior OpenStack experience and seems like a chill guy. We'll have a technical interview at the office on Tuesday. Looking forward to it! + +On Wednesday we were supposed to have an interview with Isabel who couldn't make it. Haven't heard yet if she will meet with us another time. + +Fixed nexthop/gateway in Puppet neutron. Learnt that updating Puppet dependencies in the normal way is nearly impossible. Simply slapped the commit hash in the lock file instead. + +Encountered OOM situation due to Octavia. Learned a little bit about memory profiling. Not yet found the actual cause sadly. \ No newline at end of file -- cgit v1.2.3 From 80325cced8485df9d87c1b5d9f5d123d85b01336 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 18 Apr 2025 21:24:18 +0200 Subject: vault backup: 2025-04-18 21:24:18 --- .obsidian/workspace.json | 6 +++--- A useful Go oneliner to run a fileserver.md | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 A useful Go oneliner to run a fileserver.md diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 0f430c1..201a685 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -173,13 +173,14 @@ "obsidian-excalidraw-plugin:New drawing": false } }, - "active": "f1111e0bbe22e125", + "active": "84e32b3623ed3a00", "lastOpenFiles": [ + "A useful Go oneliner to run a fileserver.md", + "weekly/2025 W16.md", "daily/10-Apr-2025.md", "A reason for becoming senior is that when Rutger is off I take most of his responsibilities.md", "daily/11-Apr-2025.md", "daily/18-Apr-2025.md", - "weekly/2025 W16.md", "daily/16-Apr-2025.md", "daily/17-Apr-2025.md", "daily/14-Apr-2025.md", @@ -203,7 +204,6 @@ "Using Libvirt to manage QEMU image bitmaps.md", "Updating the image os admin user to fix password resets.md", "The volume type of a Cinder volume can be changed.md", - "Testing Golang programs.md", "ESP", "Excalidraw" ] diff --git a/A useful Go oneliner to run a fileserver.md b/A useful Go oneliner to run a fileserver.md new file mode 100644 index 0000000..97037da --- /dev/null +++ b/A useful Go oneliner to run a fileserver.md @@ -0,0 +1,11 @@ +--- +tags: + - golang + - howto +--- +Multiple times I wish I had remembered this one-liner, now I come across it again whilst reading about Golang/WASM. So that's where it was from! Here it is: + +```sh +# install goexec: go install github.com/shurcooL/goexec@latest +goexec 'http.ListenAndServe(`:8080`, http.FileServer(http.Dir(`.`)))' +``` -- cgit v1.2.3