diff --git a/SwarselSystems.org b/SwarselSystems.org index 8382b53..28f6ddc 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -524,7 +524,7 @@ Lastly I define some common module lists that I can simply load depending on the # # NixOS modules that can only be used on NixOS systems nixModules = [ inputs.stylix.nixosModules.stylix - # inputs.lanzaboote.nixosModules.lanzaboote + inputs.lanzaboote.nixosModules.lanzaboote inputs.disko.nixosModules.disko # inputs.impermanence.nixosModules.impermanence inputs.sops-nix.nixosModules.sops @@ -2008,7 +2008,7 @@ My work machine. #+begin_src nix :tangle profiles/nbl-imba-2/default.nix - { inputs, outputs, config, pkgs, ... }: + { inputs, outputs, config, pkgs, lib, ... }: { imports = [ @@ -2043,8 +2043,12 @@ My work machine. networking.networkmanager.wifi.scanRandMacAddress = false; boot = { - loader.systemd-boot.enable = true; + loader.systemd-boot.enable = lib.mkForce false; loader.efi.canTouchEfiVariables = true; + lanzaboote = { + enable = true; + pkiBundle = "/etc/secureboot"; + }; supportedFilesystems = [ "btrfs" ]; kernelPackages = pkgs.linuxPackages_latest; kernelParams = [ @@ -5420,6 +5424,9 @@ Mostly used to install some compilers and lsp's that I want to have available wh # pinentry + # secure boot + sbctl + nix-index # keyboards diff --git a/index.html b/index.html index 575e6a1..869724b 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-This file has 43594 words spanning 11906 lines and was last revised on 2024-08-04 11:19:26 +0200. +This file has 43858 words spanning 12026 lines and was last revised on 2024-08-05 01:47:51 +0200.
@@ -420,7 +420,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-08-04 11:19:26 +0200) +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-08-05 01:47:51 +0200)
@@ -2424,7 +2424,7 @@ in -
@@ -2625,7 +2625,7 @@ My work machine.-{ inputs, outputs, config, pkgs, ... }: +{ inputs, outputs, config, pkgs, lib, ... }: { imports = [ @@ -2660,8 +2660,12 @@ My work machine. networking.networkmanager.wifi.scanRandMacAddress = false; boot = { - loader.systemd-boot.enable = true; + loader.systemd-boot.enable = lib.mkForce false; loader.efi.canTouchEfiVariables = true; + lanzaboote = { + enable = true; + pkiBundle = "/etc/secureboot"; + }; supportedFilesystems = [ "btrfs" ]; kernelPackages = pkgs.linuxPackages_latest; kernelParams = [ @@ -4854,8 +4858,8 @@ in
In this section I define packages that I manually want to nixpkgs. This can be useful for packages that are currently awaiting a PR or public packages that I do not want to maintain. @@ -4874,8 +4878,8 @@ These are for packages that are on nixpkgs, but do not fit my usecase, meaning I This is simply a mirror of the most recent stable branch of nixpkgs. Useful for packages that are broken on nixpkgs, but do not need to be on bleeding edge anyways.
@@ -4894,13 +4898,14 @@ in
swarselcheck = callPackage ./swarselcheck { };
waybarupdate = callPackage ./waybarupdate { };
opacitytoggle = callPackage ./opacitytoggle { };
+ fs-diff = callPackage ./fs-diff { };
}
# Adapted from https://code.kulupu.party/thesuess/home-manager/src/branch/main/modules/river.nix
@@ -4962,7 +4967,7 @@ writeShellApplication {
@@ -4999,7 +5004,7 @@ writeScriptBin "cura" ''
@@ -5018,7 +5023,7 @@ writeShellApplication {
@@ -5036,7 +5041,7 @@ writeShellApplication {
@@ -5054,7 +5059,7 @@ writeShellApplication {
@@ -5072,7 +5077,7 @@ writeShellApplication {
wait=0
@@ -5113,7 +5118,7 @@ writeShellApplication {
# Adapted from https://github.com/bennofs/nix-index/blob/master/command-not-found.sh
@@ -5152,7 +5157,7 @@ command_not_found_handler () {
kitty=0
@@ -5227,7 +5232,7 @@ writeShellApplication {
CFG=$(git --git-dir="$HOME"/.dotfiles/.git --work-tree="$HOME"/.dotfiles/ status -s | wc -l)
@@ -5271,7 +5276,7 @@ writeShellApplication {
if swaymsg opacity plus 0.01 -q; then
@@ -5294,10 +5299,47 @@ writeShellApplication {
set -euo pipefail
+
+OLD_TRANSID=$(sudo btrfs subvolume find-new /mnt/root-blank 9999999)
+OLD_TRANSID=${OLD_TRANSID#transid marker was }
+
+sudo btrfs subvolume find-new "/mnt/root" "$OLD_TRANSID" |
+sed '$d' |
+cut -f17- -d' ' |
+sort |
+uniq |
+while read -r path; do
+ path="/$path"
+ if [ -L "$path" ]; then
+ : # The path is a symbolic link, so is probably handled by NixOS already
+ elif [ -d "$path" ]; then
+ : # The path is a directory, ignore
+ else
+ echo "$path"
+ fi
+done
+
+{ writeShellApplication, sway}:
+
+writeShellApplication {
+ name = "fs-diff";
+ text = builtins.readFile ../../scripts/fs-diff.sh;
+}
+
+
@@ -5330,15 +5372,15 @@ writeShellApplication {
In this section I define custom modules under the swarsel attribute. These are mostly used to define settings specific to a host. I keep these settings confined to either home-manager or nixos to maintain compatibility with non-NixOS machines.
{ lib, ... }:
@@ -5372,7 +5414,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, ... }:
@@ -5390,7 +5432,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, ... }:
@@ -5402,7 +5444,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, ... }:
@@ -5414,7 +5456,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, ... }:
@@ -5428,7 +5470,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
-{
@@ -5446,7 +5488,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, config, ... }:
@@ -5481,7 +5523,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, ... }:
@@ -5505,7 +5547,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
{ lib, config, ... }:
@@ -5545,7 +5587,7 @@ in
{ lib, ... }:
@@ -5562,7 +5604,7 @@ in
{ lib, config, ... }:
@@ -5602,7 +5644,7 @@ in
{ lib, config, ... }:
@@ -5638,7 +5680,7 @@ in
{ lib, ... }:
@@ -5663,7 +5705,7 @@ in
{ lib, ... }:
@@ -5679,7 +5721,7 @@ in
{ lib, ... }:
@@ -5696,8 +5738,8 @@ in
By default, stylix wants to style GRUB as well. However, I think that looks horrible. @@ -6375,6 +6417,11 @@ Mostly used to install some compilers and lsp's that I want to have available wh # pinentry + # secure boot + sbctl + + nix-index + # keyboards qmk vial @@ -6463,7 +6510,7 @@ Some programs profit from being installed through dedicated NixOS settings on sy
@@ -6558,7 +6605,7 @@ Enables the blueman service including the nice system tray icon.
In this section we enable compatibility with several network devices I have at home, mainly printers and scanners. @@ -6610,7 +6657,7 @@ services.printing = {
Avahi is the service used for the network discovery.
@@ -6686,7 +6733,7 @@ This is a super-convenient package that lets my remap my CAPS key t
_ : @@ -6771,39 +6818,80 @@ This section houses the greetd related settings. I do not really want to use a d
{ pkgs, ... }:
{
- programs.nix-ld. = {
+ programs.nix-ld = {
enable = true;
libraries = with pkgs; [
+ SDL
+ SDL2
+ SDL2_image
+ SDL2_mixer
+ SDL2_ttf
+ SDL_image
+ SDL_mixer
+ SDL_ttf
alsa-lib
+ alsaLib
at-spi2-atk
at-spi2-core
atk
+ bzip2
cairo
cups
curl
dbus
+ dbus-glib
expat
+ ffmpeg
+ flac
fontconfig
+ freeglut
freetype
fuse3
gdk-pixbuf
+ glew110
glib
+ gnome2.GConf
+ gnome2.pango
+ gtk2
gtk3
icu
libGL
+ libappindicator-gtk2
libappindicator-gtk3
+ libcaca
+ libcanberra
+ libcap
+ libdbusmenu-gtk2
libdrm
+ libelf
+ libgcrypt
libglvnd
+ libidn
+ libindicator-gtk2
+ libjpeg
+ libmikmod
libnotify
+ libogg
+ libpng
+ libpng12
libpulseaudio
+ librsvg
+ libsamplerate
+ libtheora
+ libtiff
+ libudev0-shim
libunwind
libusb1
libuuid
+ libva
+ libvdpau
+ libvorbis
+ libvpx
libxkbcommon
libxml2
mesa
@@ -6812,9 +6900,32 @@ This section houses the greetd related settings. I do not really want to use a d
openssl
pango
pipewire
+ pixman
+ speex
stdenv.cc.cc
systemd
+ tbb
vulkan-loader
+ xorg.libICE
+ xorg.libSM
+ xorg.libX11
+ xorg.libXScrnSaver
+ xorg.libXcomposite
+ xorg.libXcursor
+ xorg.libXdamage
+ xorg.libXext
+ xorg.libXfixes
+ xorg.libXft
+ xorg.libXi
+ xorg.libXinerama
+ xorg.libXmu
+ xorg.libXrandr
+ xorg.libXrender
+ xorg.libXt
+ xorg.libXtst
+ xorg.libXxf86vm
+ xorg.libxcb
+ xorg.libxshmfence
zlib
];
};
@@ -6823,7 +6934,7 @@ This section houses the greetd related settings. I do not really want to use a d
{ config, lib, ... }:
@@ -6919,12 +7030,12 @@ This section houses the greetd related settings. I do not really want to use a d
{ pkgs, ... }:
@@ -6957,7 +7068,7 @@ This section houses the greetd related settings. I do not really want to use a d
_ : @@ -6977,7 +7088,7 @@ This section houses the greetd related settings. I do not really want to use a d
_ : @@ -6991,7 +7102,7 @@ This section houses the greetd related settings. I do not really want to use a d
{ pkgs, ... }:
@@ -7008,7 +7119,7 @@ This section houses the greetd related settings. I do not really want to use a d
{ pkgs, ... }:
@@ -7026,8 +7137,8 @@ This section houses the greetd related settings. I do not really want to use a d
This section sets up all the imports that are used in the home-manager section.
@@ -7288,6 +7399,7 @@ Programming languages and default lsp's are defined here:
-
nix-index provides a way to find out which packages are provided by which derivations. By default it also comes with a replacement for
+
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.
@@ -8067,6 +8179,8 @@ Here we set some aliases (some of them should be shellApplications instead) as w
hotspot = "nmcli connection up local; nmcli device wifi hotspot;";
cd = "z";
cdr = "cd \"$( (find /home/swarsel/Documents/GitHub -maxdepth 1 && echo /home/swarsel/.dotfiles) | fzf )\"";
+ nix-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd";
+ fs-diff = "sudo mount -o subvol=/ /dev/mapper/cryptroot /mnt ; fs-diff";
};
autosuggestion.enable = true;
enableCompletion = true;
@@ -9046,7 +9160,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
{ pkgs, ... }:
@@ -9068,7 +9182,7 @@ services.gpg-agent = {
_:
@@ -9086,12 +9200,12 @@ services.gpg-agent = {
@@ -9127,7 +9241,7 @@ services.gpg-agent = {
@@ -9138,6 +9252,15 @@ services.gpg-agent = {
teams-for-linux
google-chrome
];
+
+ programs.ssh = {
+ matchBlocks = {
+ "*.vbc.ac.at" = {
+ user = "dc_adm_schwarzaeugl";
+ };
+ };
+ };
+
}
@@ -9292,7 +9415,7 @@ This tangles the flake.nix file; This block only needs to be touched when updati
# # NixOS modules that can only be used on NixOS systems
nixModules = [
inputs.stylix.nixosModules.stylix
- # inputs.lanzaboote.nixosModules.lanzaboote
+ inputs.lanzaboote.nixosModules.lanzaboote
inputs.disko.nixosModules.disko
# inputs.impermanence.nixosModules.impermanence
inputs.sops-nix.nixosModules.sops
@@ -10182,7 +10305,7 @@ 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. @@ -10215,7 +10338,7 @@ 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
@@ -11788,8 +11911,8 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as
Adds functions for formatting nix code. @@ -13804,7 +13927,7 @@ My laptop, sadly soon to be replaced by a new one, since most basic functions ar