From 1df42bb708cfa0dc523439ca411fae9e746760bf Mon Sep 17 00:00:00 2001
From: Swarsel
-This file has 50861 words spanning 13228 lines and was last revised on 2024-12-11 01:25:11 +0100.
+This file has 50870 words spanning 13230 lines and was last revised on 2024-12-11 01:50:22 +0100.
@@ -403,7 +715,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
-My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-12-11 01:25:11 +0100)
+My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-12-11 01:50:22 +0100)
This is the "reference implementation" of a setup that runs without NixOS, only relying on home-manager. I try to test this every now and then and keep it supported. However, manual steps are needed to get the system to work fully, depending on what distribution you are running on.
@@ -1619,8 +1932,9 @@ This is the "reference implementation" of a setup that runs without NixOS, only
My work machine. Built for more security, this is the gold standard of my configurations at the moment.
@@ -1849,8 +2163,9 @@ in
This app allows me, in conjunction with my Yubikey, to quickly enter passwords when the need arises. Normal and TOTP passwords are supported, and they can either be printed directly or copied to the clipboard.
@@ -2354,8 +2668,9 @@ writeShellApplication {
The version of
This script allows for quick git home-manager specialisation switching.
@@ -2420,8 +2736,9 @@ writeShellApplication {
This script allows for quick git worktree switching.
@@ -2443,8 +2760,9 @@ writeShellApplication {
This script allows for quick git branch switching.
@@ -2464,8 +2782,9 @@ writeShellApplication {
This script lets me quickly backup files by appending
This app starts a configuratble timer and uses TTS to say something once the timer runs out.
@@ -2508,8 +2828,9 @@ writeShellApplication {
This is a shorthand for calling emacsclient mostly. Also, it hides the kittyterm scratchpad window that I sometimes use for calling a command quickly, in case it is on the screen. After emacs closes, the kittyterm window is then shown again if it was visible earlier.
@@ -2554,8 +2875,9 @@ writeShellApplication {
The normal
This app checks for different apps that I keep around in the scratchpad for quick viewing and hiding (messengers and music players mostly) and then behaves like the kittyterm hider that I described in e.
@@ -2684,8 +3007,9 @@ writeShellApplication {
This scripts checks if there are uncommited changes in either my dotfile repo, my university repo, or my passfile repo. In that case a warning will be shown in waybar.
@@ -2731,8 +3055,9 @@ writeShellApplication {
This app quickly toggles between 5% and 0% transparency.
@@ -2758,8 +3083,9 @@ writeShellApplication {
This utility is used to compare the current state of the root directory with the blanket state that is stored in /root-blank (the snapshot that is restored on each reboot of an impermanence machine). Using this, I can find files that I will lose once I reboot - if there are important files in that list, I can then easily add them to the persist options.
@@ -2799,8 +3125,9 @@ writeShellApplication {
This utility checks if there are updated packages in nixpkgs-unstable. It does so by fully building the most recent configuration, which I do not love, but it has its merits once I am willing to switch to the newer version.
@@ -2835,8 +3162,9 @@ writeShellApplication {
This utility checks if there are updated packages in nixpkgs-unstable. It does so by fully building the most recent configuration, which I do not love, but it has its merits once I am willing to switch to the newer version.
@@ -2860,8 +3188,9 @@ writeShellApplication {
This program sets up a new NixOS host.
@@ -3034,8 +3364,7 @@ writeShellApplication {
Modules that need to be loaded on the NixOS level. Note that these will not be available on systems that are not running NixOS
@@ -3150,8 +3479,8 @@ in
This lets me set the wallpaper that I want to use. Duplicated with home-manager options because mixing system and user level configuration is not a good idea.
@@ -3170,8 +3499,9 @@ This lets me set the wallpaper that I want to use. Duplicated with home-manager
This lets me set some basic flags about the hardware of the configured systems.
@@ -3192,8 +3522,9 @@ This lets me set some basic flags about the hardware of the configured systems.
I usually use
Option to enable impermanence configurations. This could also be done via optional imports, but impermanence is a "big enough" change to warrant a line in the machine
This lets me quickly set flags for "special" file systems. These options mostly function in conjunction with other settings (for example, the
This holds modules that are to be used on most hosts. These are also the most important options to configure, as these allow me easy access to monitor, keyboard, and other setups.
@@ -3315,8 +3649,8 @@ in
Laptops are not always plugged in, so they should show a battery icon in Waybar. Also, most laptops have a touchpad which usually needs to be configured.
@@ -3355,8 +3689,9 @@ Laptops are not always plugged in, so they should show a battery icon in Waybar.
This section is mostly used to deliver the correct information to Waybar. AMD systems have changing hwmon paths that can be specifically set here. Also the cpu count can be set here for Waybars cpu module, but 8 is usually a good setting to show
@@ -3383,8 +3718,9 @@ This section is mostly used to deliver the correct information to Waybar. AMD sy
These are explicit waybar options. Laptops do not need the battery module. However, this leads to a slight problem with theming: my waybar modules alternate their background-color between black and grey. The battery module is usually on grey background. If I were to simply delete that, I would now have two modules on black background. To avoid this, I define a pseudo-module
This allows me to define my monitors in the machine's
This allows me to configure input options. Here, I am globally defining my split keyboards. Then, I am joining some attribute sets so that they can be easier used in the rest of the configurations.
@@ -3516,8 +3854,9 @@ in
These are some extra options that will be used if the machine also runs NixOS. For example, non-NixOS hosts need
This defines programs I want to have starting when I start the system
@@ -3615,8 +3956,9 @@ in
Again, I set the wallpaper here for
Another duplicated option for the filesystem.
@@ -3651,8 +3994,9 @@ Another duplicated option for the filesystem.
This section is for setting things that should be used on hosts that are using the default NixOS configuration. This means that servers should NOT import this, as much of these imported modules are user-configured.
@@ -3891,8 +4233,9 @@ This section is for setting things that should be used on hosts that are using t
Also, we disable the warnings that trigger when rebuilding with a dirty flake. At this point, I am also disabling channels and pinning the flake registry - the latter lets me use the local version of nixpkgs for commands like
Mostly used to install some compilers and lsp's that I want to have available when not using a devShell flake. Most other packages should go in Installed packages.
@@ -4049,8 +4393,9 @@ Mostly used to install some compilers and lsp's that I want to have available wh
First, we enable the use of
Next, we setup the keymap in case we are not in a graphical session. At this point, I always resort to us/altgr-intl, as it is extremly comfortable to use
@@ -4088,8 +4434,9 @@ Next, we setup the keymap in case we are not in a graphical session. At this poi
This ensures that all user-configuration happens here in the config file.
@@ -4114,8 +4461,9 @@ This ensures that all user-configuration happens here in the config file.
Next, we will setup some environment variables that need to be set on the system-side. We apply some compatibility options for chromium apps on wayland, enable the wordlist and make metadata reading possible for my file explorer (nautilus).
@@ -4141,8 +4489,9 @@ Next, we will setup some environment variables that need to be set on the system
Needed for control over system-wide privileges etc.
@@ -4165,8 +4514,9 @@ Needed for control over system-wide privileges etc.
The nix store fills up over time, until
This enables hardlinking identical files in the nix store, to save on disk space. I have read this incurs a significant I/O overhead, I need to keep an eye on this.
@@ -4204,8 +4555,9 @@ This enables hardlinking identical files in the nix store, to save on disk space
There is a persistent bug over Linux kernels that makes the user wait 1m30s on system shutdown due to the reason
Enable OpenGL, Sound, Bluetooth and various drivers.
@@ -4274,8 +4627,9 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
Pipewire handles communication on Wayland. This enables several sound tools as well as screen sharing in combinaton with
Here I only enable
Setup timezone and locale. I want to use the US layout, but have the rest adapted to my country and timezone. Also, there is an issue with running Windows/Linux dualboot on the same machine where the hardware clock desyncs between the two OS'es. We fix that bug here as well.
@@ -4590,8 +4946,9 @@ Setup timezone and locale. I want to use the US layout, but have the rest adapte
I use sops-nix to handle secrets that I want to have available on my machines at all times. Procedure to add a new machine:
@@ -4668,8 +5025,9 @@ in
Some programs profit from being installed through dedicated NixOS settings on system-level; these go here. Notably the zsh setup goes here and cannot be deleted under any circumstances.
@@ -4760,8 +5119,8 @@ Some programs profit from being installed through dedicated NixOS settings on sy
Do not touch this.
@@ -4778,8 +5137,9 @@ Do not touch this.
Setting up some hardware services as well as keyboard related settings. Here we make sure that we can use the CAPS key as a ESC/CTRL double key, which is a lifesaver.
In this section we enable compatibility with several network devices I have at home, mainly printers and scanners.
This allows me to use my big scanner/printer's printing function over the network. Most of the settings are driver related.
@@ -4914,8 +5276,9 @@ services.printing = {
Avahi is the service used for the network discovery.
@@ -4932,10 +5295,10 @@ services.avahi = {
This is being set to allow myself to use all functions of nautilus in NixOS
@@ -4949,8 +5312,9 @@ This is being set to allow myself to use all functions of nautilus in NixOS
This is a super-convenient package that lets my remap my
This enables power profile management. The available modes are:
@@ -5014,10 +5379,10 @@ Most of the time I am using
It makes sense to house these settings in their own section, since they are all needed really. Note that the starting of the gpg-agent is done in the sway settings, to also perform this step of the setup for non NixOS-machines at the same time.
@@ -5055,8 +5420,9 @@ Also, this is a good place to setup the udev rules.
This section houses the greetd related settings. I do not really want to use a display manager, but it is useful to have setup in some ways - in my case for starting sway on system startup. Notably the default user login setting that is commented out here goes into the system specific settings, make sure to update it there
@@ -5087,8 +5453,9 @@ This section houses the greetd related settings. I do not really want to use a d
This provides libraries for binaries that are not patched for use on NixOS. This really makes the biggest gripe with NixOS go away, that being having to run a binary that is only found in a single spot. It is most of the times possible to patch such a file, but this makes such a situation take much less time to resolve.
@@ -5215,8 +5582,9 @@ When a program does not work, start with
This is where the impermanence magic happens. When this is enabled, the root directory is rolled back to a blanket state on each reboot.
@@ -5319,8 +5687,9 @@ Normally, doing that also resets the lecture that happens on the first use of
This snipped is added to the activation script that is run after every rebuild and shows what packages have been added and removed. This is actually not the optimal place to add that snipped, but the correct spot is in some perl file that I have not had the leisure to take a look at yet.
@@ -5340,8 +5709,9 @@ This snipped is added to the activation script that is run after every rebuild a
Used for storing sessions in e.g. Nextcloud. Using this on a system level keeps the login information when logging out of the session as well.
@@ -5359,8 +5729,9 @@ Used for storing sessions in e.g. Nextcloud. Using this on a system level keeps
This is used to better integrate Sway into the system on NixOS hosts. On the home-manager side, the
This allows me to use screen sharing on Wayland. The implementation is a bit crude and only the whole screen can be shared. However, most of the time that is all I need to do anyways.
@@ -5422,8 +5794,9 @@ This allows me to use screen sharing on Wayland. The implementation is a bit cru
A friend of mine used this service and I used to make fun of him. But I have to admit this is actually a nice program. It forces you to look away from the screen from time to time, reducing eye strain.
@@ -5437,8 +5810,9 @@ A friend of mine used this service and I used to make fun of him. But I have to
I am using distrobox to quickly circumvent isses that I cannot immediately solve on NixOS. It is always the goal to quickly get things working on NixOS, but this prevents me from getting completely stuck.
@@ -5460,8 +5834,9 @@ I am using distrobox to quickly circumvent isses that I cannot immediately solve
This turns off the display when the lid is closed.
@@ -5497,15 +5872,14 @@ This turns off the display when the lid is closed.
This opens a few gaming ports and installs the steam configuration suite for gaming. There are more options in Gaming (home-manager side).
@@ -7155,8 +7548,9 @@ This opens a few gaming ports and installs the steam configuration suite for gam
This sets the VirtualBox configuration. Guest should not be enabled if not direly needed, it will make rebuilds unbearably slow. I only use this privately to run an old editor that does not run well under wine, so I put it into it's own specialisation.
@@ -7187,8 +7581,9 @@ This sets the VirtualBox configuration. Guest should not be enabled if not direl
This sets the VirtualBox configuration. Guest should not be enabled if not direly needed, it will make rebuilds unbearably slow.
@@ -7204,8 +7599,9 @@ This sets the VirtualBox configuration. Guest should not be enabled if not direl
Auto login for the initial session.
@@ -7222,8 +7618,9 @@ Auto login for the initial session.
This smashes Atmosphere 1.3.2 on the switch, which is what I am currenty using.
@@ -7243,8 +7640,9 @@ This smashes Atmosphere 1.3.2 on the switch, which is what I am currenty using.
Options that I need specifically at work. There are more options at Work (home-manager side).
@@ -7381,8 +7779,9 @@ in
These options are really only to be used on the iso image in order to run nixos-anywhere.
@@ -7453,8 +7852,7 @@ These options are really only to be used on the iso image in order to run nixos-
Again, we adapt
Here are defined some packages that I would like to use across all my machines. Most of these should not require further setup. Notably the cura package is severely outdated on nixpkgs, so I just fetch a more recent AppImage and run that instead.
@@ -7569,8 +7969,8 @@ Also, I define some useful shell scripts here.
Programming languages and default lsp's are defined here: System Packages
This is just a separate container for derivations defined in Packages. This is a good idea so that I do not lose track of package names I have defined myself, as this was once a problem in the past already.
@@ -7806,10 +8207,10 @@ This is just a separate container for derivations defined in sops
I use sops-nix to handle secrets that I want to have available on my machines at all times. Procedure to add a new machine:
@@ -7855,8 +8256,9 @@ in
It is very convenient to have SSH aliases in place for machines that I use. This is mainly used for some server machines and some university clusters. We also enable agent forwarding to have our Yubikey SSH key accessible on the remote host.
@@ -7907,8 +8309,9 @@ It is very convenient to have SSH aliases in place for machines that I use. This
These section allows home-manager to allow theme settings, and handles some other appearance-related settings like cursor styles. Interestingly, system icons (adwaita) still need to be setup on system-level, and will break if defined here.
@@ -7982,8 +8385,9 @@ This section has been notably empty ever since switching to stylix. Only Emacs i
Some programs lack a dmenu launcher - I define them myself here.
@@ -8082,8 +8486,9 @@ _:
This section should be used in order to symlink already existing configuration files using `home.file` and setting session variables using `home.sessionVariables`.
@@ -8137,8 +8542,9 @@ Also in firefox `about:config > toolkit.legacyUserProfileCustomizations.style
Sets environment variables. Here I am only setting the EDITOR variable, most variables are set in the Sway section.
@@ -8156,8 +8562,9 @@ Sets environment variables. Here I am only setting the EDITOR variable, most var
This section is for programs that require no further configuration. zsh Integration is enabled by default for these.
@@ -8186,8 +8593,9 @@ This section is for programs that require no further configuration. zsh Integrat
nix-index provides a way to find out which packages are provided by which derivations. By default it also comes with a replacement for
Enables password store with the
Enables direnv, which I use for nearly all of my nix dev flakes.
@@ -8257,8 +8667,9 @@ Enables direnv, which I use for nearly all of my nix dev flakes.
Eza provides me with a better
Here I set up my git config, automatic signing of commits, useful aliases for my ost used commands (for when I am not using Magit) as well as a git template defined in Linking dotfiles.
@@ -8330,8 +8742,9 @@ Here I set up my git config, automatic signing of commits, useful aliases for my
Here I only need to set basic layout options - the rest is being managed by stylix.
@@ -8355,8 +8768,9 @@ Here I only need to set basic layout options - the rest is being managed by styl
Starship makes my
Kitty is the terminal emulator of choice for me, it is nice to configure using nix, fast, and has a nice style.
@@ -8499,8 +8914,9 @@ The theme is handled by stylix.
zsh is the most convenient shell for me and it happens to be super neat to configure within home manager.
@@ -8632,8 +9048,9 @@ Here we set some aliases (some of them should be shellApplications instead) as w
Normally I use 4 mail accounts - here I set them all up. Three of them are Google accounts (sadly), which are a chore to setup. The last is just a sender account that I setup SMTP for here.
@@ -9091,8 +9510,9 @@ Normally I use 4 mail accounts - here I set them all up. Three of them are Googl
By using the emacs-overlay NixOS module, I can install all Emacs packages that I want to use right through NixOS. This is done by passing my
Again I am just using the first bar option here that I was able to find good understandable documentation for. Of note is that the `cpu` section's `format` is not defined here, but in section 1 (since not every machine has the same number of cores)
@@ -9459,8 +9880,9 @@ The rest of the related configuration is found here:
Setting up firefox along with some policies that are important to me (mostly disabling telemetry related stuff as well as Pocket). I also enable some integrations that enable super useful packages, namely
Services that can be defined through home-manager should be defined here.
This enables phone/computer communication, including sending clipboard, files etc. Sadly on Wayland many of the features are broken (like remote control).
@@ -9805,8 +10229,9 @@ This enables phone/computer communication, including sending clipboard, files et
Desktop notifications!
@@ -9851,8 +10276,9 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
I am currently using SwayFX, which adds some nice effects to sway, like rounded corners and hiding the separator between title and content of a window.
@@ -10194,8 +10620,9 @@ in
Settinfs that are needed for the gpg-agent. Also we are enabling emacs support for unlocking my Yubikey here.
@@ -10220,8 +10647,9 @@ Settinfs that are needed for the gpg-agent. Also we are enabling emacs support f
This service changes the screen hue at night. I am not sure if that really does something, but I like the color anyways.
@@ -10240,15 +10668,14 @@ This service changes the screen hue at night. I am not sure if that really does
This section should be used in order to symlink already existing configuration files using `home.file` and setting session variables using `home.sessionVariables`.
@@ -10292,15 +10720,14 @@ As for the `home.sessionVariables`, it should be noted that environment variable
The rest of the settings is at gaming.
@@ -10370,8 +10796,9 @@ The rest of the settings is at
The rest of the settings is at work. Here, I am setting up the different firefox profiles that I need for the SSO sites that I need to access at work as well as a few ssh shorthands.
@@ -10501,8 +10928,7 @@ The rest of the settings is at
@@ -268,7 +482,27 @@
-
+
+
+
+
-
+
+
+
+
-
+
+
-
+
+
-
+
+
+
+4.1.1. Physical hosts
-
+4.1.1.1. live (ISO)
{ self, inputs, config, pkgs, lib, modulesPath, ... }:
@@ -1551,8 +1863,9 @@ in
+4.1.1.2. Home-manager only (non-NixOS)
+
+4.1.1.3. nbl-imba-2 (Framework Laptop 16)
+
+4.1.1.4. Winters (Server)
{ self, inputs, outputs, config, ... }:
@@ -1929,8 +2244,9 @@ in
+4.1.1.5. nbm-imba-166 (MacBook Pro)
{ self, inputs, outputs, ... }:
@@ -1969,8 +2285,9 @@ in
+4.1.1.6. Magicant (Phone)
@@ -2019,8 +2336,7 @@ in
4.1.2. Virtual hosts
@@ -2033,12 +2349,12 @@ My server setup was originally built on Proxmox VE; back when I started, I creat
I have removed most of the machines from this section. What remains are some hosts that I have deployed on OCI (mostly sync for medium-important data) and one other machine that I left for now as a reference.
-
+
+4.1.2.1. Sync (OCI)
-
+
+4.2.1.1. pass-fuzzel
+
+4.2.1.2. cura5
cura used to be quite outdated in nixpkgs. I am fetching a newer AppImage here and use that instead.
@@ -2395,8 +2710,9 @@ writeScriptBin "cura" ''
+
+4.2.1.3. hm-specialisation
+
+4.2.1.4. cdw
+
+4.2.1.5. cdb
+
+4.2.1.6. bak
.bak to the filename.
@@ -2486,8 +2805,9 @@ writeShellApplication {
+
+4.2.1.7. timer
+
+4.2.1.8. e
+
+4.2.1.9. command-not-found
command-not-found.sh uses the outdated nix-shell commands as suggestions. This version supplies me with the more modern nixpkgs#<name> version.
@@ -2599,8 +2921,9 @@ command_not_found_handler() {
+
+4.2.1.10. swarselcheck
+
+4.2.1.11. waybarupdate
+
+4.2.1.12. opacitytoggle
+
+4.2.1.13. fs-diff
+
+4.2.1.14. update-checker
+
+4.2.1.15. github-notifications
+
+4.2.1.16. screenshare
SHARESCREEN="$(nix eval --raw ~/.dotfiles#nixosConfigurations."$(hostname)".config.home-manager.users."$(whoami)".swarselsystems.sharescreen)"
@@ -2896,8 +3225,9 @@ writeShellApplication {
+4.2.1.17. bootstrap
4.2.2. Overlays (additions, overrides, nixpkgs-stable)
@@ -3121,8 +3450,8 @@ In this section I define custom modules under the swarsel attribute
Note: The structure of generating the packages was changed in commit 2cf03a3 refactor: package and module generation. That commit can be checked out in order to see a simpler version of achieving the same thing.
-
+
+4.2.3.1. NixOS
-
-
+4.2.3.1.1. Wallpaper
+
+4.2.3.1.2. Hardware
+
+4.2.3.1.3. Setup
mutableUsers = false in my NixOS configuration. However, on a new system where sops-keys have not been deployed, this would immediately lock me out of the system. Hence this flag can be used until sops-keys are created.
@@ -3231,8 +3562,9 @@ in
+
+
+4.2.3.1.5. Impermanence
default.nix.
@@ -3264,8 +3597,9 @@ Option to enable impermanence configurations. This could also be done via option
+
+4.2.3.1.6. Filesystem
isBtrfs function is mostly used for impermanence configuration).
@@ -3280,10 +3614,10 @@ This lets me quickly set flags for "special" file systems. These options mostly
+
+
+4.2.3.2. home-manager
-
+
+4.2.3.2.1. Laptop
+
+4.2.3.2.2. Hardware
+
+4.2.3.2.3. Waybar
custom/pseudobat that simply shows a static image and calls wlogout on right click. This wastes a little bit of screen space, but that is a price I am willing to pay for consistency.
@@ -3432,8 +3768,9 @@ in
+
+4.2.3.2.4. Monitors
default.nix.
@@ -3465,8 +3802,9 @@ in
+
+4.2.3.2.5. Input
+
+4.2.3.2.6. Nixos
nixGL prepended to most graphic commands, and swayfx works less nicely on these machines.
@@ -3557,8 +3896,9 @@ These are some extra options that will be used if the machine also runs NixOS. F
+
+4.2.3.2.7. darwin
{ lib, ... }:
@@ -3569,8 +3909,9 @@ These are some extra options that will be used if the machine also runs NixOS. F
+4.2.3.2.8. System startup
+
+4.2.3.2.9. Wallpaper
stylix.
@@ -3635,8 +3977,9 @@ Again, I set the wallpaper here for stylix.
+
+4.2.3.2.10. Filesystem
+
+4.2.3.2.11. firefox
{ lib, pkgs, ... }:
@@ -3811,10 +4155,8 @@ Another duplicated option for the filesystem.
-
-
+4.3.1.1. Imports, non-server settings
+
+4.3.1.2. General NixOS settings (enable home-manager module, stateVersion)
nix shell (without it, we will always download the newest version of nixpkgs for these commands).
@@ -3933,8 +4276,9 @@ Also, the system state version is set here. No need to touch it.
+
+4.3.1.3. System Packages
+
+4.3.1.4. Setup home-manager
home-manager as a NixoS modul.
@@ -4068,8 +4413,9 @@ First, we enable the use of home-manager as a NixoS modul.
+
+4.3.1.5. Setup login keymap
+
+4.3.1.6. User setup, Make users non-mutable
+
+4.3.1.7. Environment setup
+
+4.3.1.8. Security
+
+4.3.1.9. Enable automatic garbage collection
/boot/efi is filled. This snippet cleans it automatically on a weekly basis.
@@ -4185,8 +4535,9 @@ The nix store fills up over time, until /boot/efi is filled. This s
+
+4.3.1.10. Enable automatic store optimisation
+
+4.3.1.11. Reduce systemd timeouts
a stop job is running for session 1 of user .... I do not want to wait that long and am confident no important data is lost by doing this.
@@ -4223,8 +4575,9 @@ There is a persistent bug over Linux kernels that makes the user wait 1m30s on s
+
+4.3.1.12. Hardware settings
+
+4.3.1.13. Pipewire
xdg-desktop-portal-wlr.
@@ -4300,8 +4654,9 @@ Pipewire handles communication on Wayland. This enables several sound tools as w
+
+4.3.1.14. Common network settings
networkmanager. Most of the 'real' network config is done in System specific configuration.
@@ -4557,8 +4912,9 @@ Here I only enable networkmanager. Most of the 'real' network confi
+
+4.3.1.15. Time, locale settings
+
+4.3.1.16. sops
+
+
-
+
+4.3.1.18. Programs (including zsh setup)
-
-
+4.3.1.18.1. zsh
+
+
+
+4.3.1.19. Services
4.3.1.19.2. Network devices
+
+
+
+
+4.3.1.19.3. enable GVfs
+
+4.3.1.19.4. interception-tools: Make CAPS work as ESC/CTRL
CAPS key to ESC if pressed shortly, and CTRL if being held.
@@ -4989,8 +5353,9 @@ This is a super-convenient package that lets my remap my CAPS key t
+
+4.3.1.19.5. power-profiles-daemon
power-saver, however, it is good to be
+
+
+4.3.1.20. Hardware compatibility settings (Yubikey, Ledger, Keyboards) - udev rules
+
+4.3.1.21. System Login
+
+4.3.1.22. nix-ld
nix-ldd <program>. T
+
+4.3.1.23. Impermanence
+
+4.3.1.24. Summary of nixos-rebuild diff
+
+4.3.1.25. gnome-keyring
+
+4.3.1.26. Sway
package attribute will be null for such an host, using the systems derivation instead.
@@ -5392,8 +5763,9 @@ This is used to better integrate Sway into the system on NixOS hosts. On the hom
+
+4.3.1.27. xdg-portal
+
+4.3.1.28. safeeyes
+
+4.3.1.29. Podmam (distrobox)
+
+4.3.1.30. Handle lid switch correctly
4.3.2. Server
4.3.2.2. General NixOS Server settings
{ lib, config, ... }:
@@ -5588,8 +5963,9 @@ in
+4.3.2.22. Emacs (RSS Server)
{ lib, config, ... }:
@@ -7051,15 +7446,14 @@ in
4.3.3. Darwin
4.3.4. Optional
@@ -7107,8 +7500,8 @@ These sets of configuration do not need to be deployed on every host, for a mult
-
+
+4.3.4.1. gaming
+
+4.3.4.2. VirtualBox
+
+4.3.4.3. VmWare
+
+4.3.4.4. Auto-login
+
+4.3.4.5. nswitch-rcm
+
+4.3.4.6. work
+
+4.3.4.7. Minimal Install
4.4.1.2. General home-manager-settings
nix to our needs, enable the home-manager command for non-NixOS machines (NixOS machines are using it as a module) and setting user information that I always keep the same.
@@ -7554,8 +7953,9 @@ Again, we adapt nix to our needs, enable the home-manager command f
+
+4.4.1.3. Installed packages
4.4.1.3.2. Self-defined
+4.4.1.4. sops
+
+4.4.1.5. SSH Machines
+
+4.4.1.6. Theme (stylix)
+
+4.4.1.7. Desktop Entries, MIME types (xdg)
+
+4.4.1.8. Linking dotfiles
+
+4.4.1.9. Sourcing environment variables
+
+4.4.1.10. General Programs: bottom, imv, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf
+
+4.4.1.11. nix-index
command-not-found.sh, however, the implementation is based on a channel based setup. I like consistency, so I replace the command with one that provides a flakes-based output.
@@ -8218,8 +8626,9 @@ nix-index provides a way to find out which packages are provided by which deriva
+
+4.4.1.12. password-store
pass-otp extension which allows me to store and generate one-time-passwords.
@@ -8239,8 +8648,9 @@ Enables password store with the pass-otp extension which allows me
+
+4.4.1.13. direnv
+
+4.4.1.14. eza
ls command and some other useful aliases.
@@ -8280,8 +8691,9 @@ Eza provides me with a better ls command and some other useful alia
+
+4.4.1.15. git
+
+4.4.1.16. Fuzzel
+
+4.4.1.17. Starship
zsh look cooler! I have symbols for most programming languages and toolchains, also I build my own powerline.
@@ -8472,8 +8886,9 @@ Starship makes my zsh look cooler! I have symbols for most programm
+
+4.4.1.18. Kitty
+
+4.4.1.19. zsh
+
+4.4.1.20. zellij
_:
@@ -8840,8 +9257,9 @@ Here we set some aliases (some of them should be shellApplications instead) as w
+4.4.1.22. Mail
+
+4.4.1.23. Home-manager: Emacs
init.el file to the configuration which will then be parsed upon system rebuild, looking for use-package sections in the Elisp code. Also I define here the style of Emacs that I want to run - I am going with native Wayland Emacs here (emacs-pgtk). All of the nice options such as tree-sitter support are enabled by default, so I do not need to adjust the build process.
@@ -9176,8 +9596,9 @@ Lastly, I am defining some more packages here that the parser has problems findi
+
+4.4.1.24. Waybar
+
+4.4.1.25. Firefox
tridactyl and browserpass.
@@ -9762,15 +10184,16 @@ in
+
+4.4.1.26. Services
4.4.1.26.2. KDE Connect
+
+4.4.1.26.3. Mako
+
+4.4.1.26.4. yubikey-touch-detector
{ pkgs, ... }:
@@ -9887,10 +10313,10 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
+4.4.1.27. Sway
+
+4.4.1.28. gpg-agent
+
+4.4.1.29. gammastep
4.4.2. Server
4.4.2.2. Linking dotfiles
4.4.3. Darwin
4.4.4. Optional
@@ -10329,8 +10755,8 @@ in
Akin to the optional NixOS modules.
-
+
@@ -10670,8 +11096,8 @@ This section is used to define my own functions, own variables, and own keybindi
In this section I define extra functions that I need. Some of these functions I wrote myself, some I found after internet reseach. For functions I found on the internet, I will link the original source I found it in.
+4.4.4.1. Gaming
+
+4.4.4.2. Work
Since I am rebinding the C-z hotkey for emacs-evil-state toggling, I want to have a function that still lets me perform this action quickly.
@@ -10688,8 +11114,9 @@ Since I am rebinding the C-z hotkey for emacs-evil-state toggling,
I often find myself bouncing between two buffers when I do not want to use a window split. This funnction simply jumps to the last used buffer. @@ -10702,8 +11129,9 @@ I often find myself bouncing between two buffers when I do not want to use a win
I use these functions to let me switch between my main email accounts, as mu4e by itself has trouble doing so. mu4e-switch-account allows for manual choosing of the sender account, while mu4e-rfs--matching-address and mu4e-send-from-correct-address are used when replying to a mail; they switch the sender account to the one that received the mail.
@@ -10754,8 +11182,9 @@ Used here: mu4e
This function will check if a directory for which a file we want to open exists; if not, it will offer to create the directories for me. @@ -10774,8 +11203,9 @@ This function will check if a directory for which a file we want to open exists;
When programming, I like to be able to duplicate a line. There are easier functions than the one below, but they either @@ -10842,8 +11272,9 @@ there's a region, all lines that region covers will be duplicated."
These functions by protesilaos generate heading links in an org-file similar to the normal org-store-link approach when not using properties. This approach has a weakness however - if the heading name is changed, the link breaks. These functions generate a unique identifier for each heading which will not break and also works when exporting the file to html, for example.
@@ -10879,8 +11310,9 @@ create a new one."
Emacs likes to send messages to the echo area; this is generally a good thing. However, it bothers me a lot when I am currently working in minibuffer where I receive an echo area message that is actually important and it is then overwritten by e.g. the mu4e update message. This section makes it possible to find the root function calling the message function and disabling it here.
@@ -10950,8 +11382,9 @@ Lastly, individual messages can be reenabled using the (advice-remove '<
I find it very annoying that the standard behavior for M-DEL only deletes one word when using find-file. This function makes it so that we always go up by one directory level instead.
@@ -10978,8 +11411,9 @@ This function was found here: org-mode: General setup
+
Sets up the basic settings that I want to have active in org-mode buffers. @@ -11006,8 +11440,9 @@ Used here: General org-mode
This function sets the width of buffers in org-mode. @@ -11027,8 +11462,9 @@ Used in: Centered org-mode Buf
This section handles everything that shoudld happen when I save SwarselSystems.org. It:
@@ -11068,8 +11504,9 @@ We set a hook that runs everytime we save the file. It would be a bit more effic
Normally emacs cycles between three states: @@ -11098,8 +11535,9 @@ However, I want to be able to fold a single heading consistently.
The standard Emacs behaviour for the Python process shell is a bit annoying. This is my attempt at making it show automatically on opening a python buffer and making it refresh on its own as well. This does not nicely work yet. @@ -11171,8 +11610,9 @@ The standard Emacs behaviour for the Python process shell is a bit annoying. Thi
This function searches for common delimiters in region and removes them, summarizing all captured lines by it. @@ -11204,8 +11644,9 @@ This function searches for common delimiters in region and removes them, summari
This formats the org code block at point in accordance to the nixpkgs-fmt formatter
@@ -11240,8 +11681,9 @@ This formats the org code block at point in accordance to the
@@ -11258,8 +11700,7 @@ This formats the org code block atpointin accordance to the
This setups up evil, which brings vim-like keybindings to emacs. In the same location, I also unbind the C-z key (I am very unhappy with this implementation, but it is the only thing that works consistently so far) to make it available for cape later.
@@ -11771,8 +12212,9 @@ Also, I setup initial modes for several major-modes depending on what I deem fit
This gives support for many different modes, and works beautifully out of the box. @@ -11788,8 +12230,9 @@ This gives support for many different modes, and works beautifully out of the bo
This package changes the char-search commands like f by showing the results in a more visual manner. It also gives a 2-character search using s and S.
@@ -11807,8 +12250,9 @@ This package changes the char-search commands like f by showing the
This helps keeping parentheses balanced which is useful when writing in languages like Elisp. I do not activate this by default, as most languages do not profit from this enough in my eyes. @@ -11821,8 +12265,9 @@ This helps keeping parentheses balanced which is useful when writing in language
This minor-mode adds functionality for doing better surround-commands; for example ci[ will let you change the word within square brackets.
@@ -11838,8 +12283,7 @@ This minor-mode adds functionality for doing better surround-commands; for examp
This set of packages uses the default emacs completion framework and works together to provide a very nice user experience: @@ -12001,8 +12445,8 @@ This set of packages uses the default emacs completion framework and works toget Nerd icons is originally enabled here: Icons
This package allows for Ido-like directory navigation.
@@ -12043,8 +12488,9 @@ This package allows for Ido-like directory navigation.
When first installing orderless, I often times faced the problem, that when editing long files and calling consult-line, Emacs would hang when changing a search term in the middle (e.g. from servicse.xserver to servic.xserver in order to fix the typo). The below orderless rules have a more strict matching that has a positive impact on performance.
@@ -12072,8 +12518,9 @@ When first installing orderless, I often times faced the problem, that when edit
The big winner here are the convenient keybinds being setup here for general use. Also, I setup vim-navigation for minibuffer completions. consult-buffer is set twice because I am still used to that weird C-M-j command that I chose for ivy-switch-buffer when I first started using Emacs. I want to move to the other command but for now it is not feasible to delete the other one.
@@ -12101,8 +12548,9 @@ The big winner here are the convenient keybinds being setup here for general use
I have stripped down the embark keybinds heavily. It is very useful to me even in it's current state, but it quickly becomes overwhelming. embark-dwim acts on a candidate without closing the minibuffer, which is very useful. embark-act lets the user choose from all actions, but has an overwhelming interface.
@@ -12128,8 +12576,9 @@ I have stripped down the embark keybinds heavily. It is very useful to me even i
Provides previews for embark. @@ -12147,8 +12596,9 @@ Provides previews for embark.
I set the annotation-mode of marginalia to heavy. This gives even more information on the stuff that you are looking at. One thing I am missing from ivy is the highlighting on mode-commands based on the current state of the mode. Also, I do not understand all the shorthands used by marginalia yet.
@@ -12164,8 +12614,9 @@ I set the annotation-mode of marginalia to heavy. This gives even m
As stated above, this simply provides nerd-icons to the completion framework. @@ -12183,10 +12634,10 @@ As stated above, this simply provides nerd-icons to the completion framework.
This pair of packages provides information on keybinds in addition to function names, which makes it easier to remember keybinds (which-key). The helpful package provides a better Help framework for Emacs. For some reason, the Help windows are always being focused by the cursor even though I have set help-window-select to nil. I do not understand why.
@@ -12211,8 +12662,7 @@ This pair of packages provides information on keybinds in addition to function n
Org-mode heading are coded within the use-package setup, so be very careful about moving stuff about here.
This sets up the basic org-mode. I wrote a function to handle some of the initial org-mode behaviour in org-mode setup. @@ -12383,14 +12833,16 @@ This part of the configuration mostly makes some aesthetic changes, enables neat ;; (setq org-log-done 'time) ;; (setq org-log-into-drawer t) (setq org-startup-with-inline-images t) + (setq org-export-headline-levels 6) (setq org-image-actual-width nil) (setq org-format-latex-options '(:foreground "White" :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")))
Here I setup a plethora of keywords, keybinds and paths to give my org-agenda more power. @@ -12460,8 +12912,9 @@ Here I setup a plethora of keywords, keybinds and paths to give my org-agenda mo
I wrote these capture templates to allow myself to quickly create Anki cards from within Emacs. I nearly never use this feature, but it cannot hurt to have. @@ -12488,8 +12941,9 @@ I wrote these capture templates to allow myself to quickly create Anki cards fro
Again, my understanding of the font-faces in Emacs is limited. This is mostly just tuned so that my org-files look acceptable. @@ -12523,8 +12977,9 @@ Again, my understanding of the font-faces in Emacs is limited. This is mostly ju
This package makes emphasis-markers appear when the cursor moves over them. Very useful as I enjoy the clean look of not always seeing them, but it is annoying not to be able to edit them properly. @@ -12543,8 +12998,9 @@ This package makes emphasis-markers appear when the cursor moves over them. Very
I like org-mode buffers to be centered, as I do not find that enormous lines are of big use. @@ -12562,8 +13018,9 @@ Function definition in: Visual
There is a weird bug in org-mode that makes it so that headings were not folding correctly sometimes. This setting seems to fix it. @@ -12576,8 +13033,9 @@ There is a weird bug in org-mode that makes it so that headings were not folding
org-babel allows to run blocks in other programming languages within an org-mode buffer, similar to what e.g. jupyterhub offers for python. @@ -12587,8 +13045,8 @@ org-babel allows to run blocks in other programming languages within an org-mode It also offers a very useful utility of exporting org-mode buffers to different formats; the feature I enjoy most is what makes this file useful: the tangling functionality.
@@ -12637,10 +13096,10 @@ Usage: Type <, followed by one of the below keywords and press <
This provides several utilities for LaTeX in Emacs, including many completions and convenience functions for math-mode. @@ -12666,8 +13125,9 @@ This provides several utilities for LaTeX in Emacs, including many completions a
This package allows to download and copy images into org-mode buffers. Sadly it does not work in a very stable manner - if you copy images that are also links to another page (like is often the case in a Google image search), Emacs might crash from this. @@ -12693,8 +13153,9 @@ This package allows to download and copy images into org-mode buffers. Sadly it
This package automatically toggles LaTeX-fragments in org-files. It seems to also work in markdown-files which is a nice addition, as my Obsidian notes are held in markdown. @@ -12709,8 +13170,9 @@ This package automatically toggles LaTeX-fragments in org-files. It seems to als
This just makes org-mode a little bit more beautiful, mostly by making the begin_src and end_src tags in source-blocks turn into more beautiful icons, as well as hiding #+ tags before them, as well as in the properties section of the file.
@@ -12727,8 +13189,9 @@ This just makes org-mode a little bit more beautiful, mostly by making the
Recently I have grown fond of holding presentations using Emacs :) @@ -12841,8 +13304,7 @@ Recently I have grown fond of holding presentations using Emacs :)
yasnippet-snippets package, bu
The following block is mostly inspired from https://code.kulupu.party/thesuess/WTFmacs/ and sets up a few prefixes that make LaTeX-math-mode nicer to use even with auctex and cape enabled.
@@ -13775,8 +14237,7 @@ The following block is mostly inspired from
5.4.33. eglot
@@ -14036,8 +14497,8 @@ Hydra allows for the writing of macro-style functions. I have not yet looked int
I only wrote this in order to try out hydra; rarely do I really need this. However, it can be useful for Presentations. It simply scales the text size. @@ -14056,15 +14517,14 @@ I only wrote this in order to try out hydra; rarely do I really need this. Howev
This provides an interface to Obsidian for Emacs - as much as I want to like it, I actually enjoy using the official Obsidian app more - even though that cannot be used by Emacs directly. @@ -14108,15 +14568,16 @@ I hope that this package will improve, then I will come back to it one day.
This section is here to make Anki usable from within Emacs - an endeavour that I have mostly given up on.
@@ -14161,8 +14622,9 @@ This section is here to make Anki usable from within Emacs - an endeavour that I
In this section we are setting up mu4e, a mail client for emacs using mu with mbsync as backend. The mail accounts themselves are setup in the NixOS configuration, so we only need to add Emacs specific settings here.
@@ -14296,8 +14757,9 @@ The hook functions are defined here: mu4e-alert
+
This adds the simple utility of sending desktop notifications whenever a new mail is received. I am using libnotify because I want to use this with notify-send.
@@ -14315,8 +14777,7 @@ This adds the simple utility of sending desktop notifications whenever a new mai