zaphyra's git: nixfiles

zaphyra and void's nixfiles

commit 3bff5623699c83a351d0af9ac8b5b8aa164983fb
parent 4330257cea5845da05a934b1e0de0427abefba0d
Author: Katja (ctucx) <git@ctu.cx>
Date: Fri, 16 May 2025 20:23:35 +0200

refactor directory structure
112 files changed, 1164 insertions(+), 1154 deletions(-)
R
homeManagerModules/katja/common.nix -> config/home/katja/common.nix
|
0
R
homeManagerModules/katja/configure/gnome.nix -> config/home/katja/configure/gnome.nix
|
0
R
homeManagerModules/katja/configure/xdg.nix -> config/home/katja/configure/xdg.nix
|
0
R
homeManagerModules/katja/gnomeExtensions/bluetoothBatteryMeter.nix -> config/home/katja/gnomeExtensions/bluetoothBatteryMeter.nix
|
0
R
homeManagerModules/katja/gnomeExtensions/dash-to-dock.nix -> config/home/katja/gnomeExtensions/dash-to-dock.nix
|
0
R
homeManagerModules/katja/gnomeExtensions/emoji-copy.nix -> config/home/katja/gnomeExtensions/emoji-copy.nix
|
0
R
homeManagerModules/katja/gnomeExtensions/just-perfection.nix -> config/home/katja/gnomeExtensions/just-perfection.nix
|
0
R
homeManagerModules/katja/gnomeExtensions/pip-on-top.nix -> config/home/katja/gnomeExtensions/pip-on-top.nix
|
0
R
homeManagerModules/katja/gnomeExtensions/search-light.nix -> config/home/katja/gnomeExtensions/search-light.nix
|
0
R
homeManagerModules/katja/gnomeExtensions/space-bar.nix -> config/home/katja/gnomeExtensions/space-bar.nix
|
0
R
homeManagerModules/katja/programs/alacritty.nix -> config/home/katja/programs/alacritty.nix
|
0
R
homeManagerModules/katja/programs/ansible.nix -> config/home/katja/programs/ansible.nix
|
0
R
homeManagerModules/katja/programs/apostrophe.nix -> config/home/katja/programs/apostrophe.nix
|
0
R
homeManagerModules/katja/programs/bat.nix -> config/home/katja/programs/bat.nix
|
0
R
homeManagerModules/katja/programs/bitwarden-cli.nix -> config/home/katja/programs/bitwarden-cli.nix
|
0
R
homeManagerModules/katja/programs/celluloid.nix -> config/home/katja/programs/celluloid.nix
|
0
R
homeManagerModules/katja/programs/deploymentUtilities.nix -> config/home/katja/programs/deploymentUtilities.nix
|
0
R
homeManagerModules/katja/programs/eza.nix -> config/home/katja/programs/eza.nix
|
0
R
homeManagerModules/katja/programs/firefox.nix -> config/home/katja/programs/firefox.nix
|
0
R
homeManagerModules/katja/programs/fish.nix -> config/home/katja/programs/fish.nix
|
0
R
homeManagerModules/katja/programs/fractal.nix -> config/home/katja/programs/fractal.nix
|
0
R
homeManagerModules/katja/programs/ghostty.nix -> config/home/katja/programs/ghostty.nix
|
0
R
homeManagerModules/katja/programs/git.nix -> config/home/katja/programs/git.nix
|
0
R
homeManagerModules/katja/programs/gpg.nix -> config/home/katja/programs/gpg.nix
|
0
R
homeManagerModules/katja/programs/helix.nix -> config/home/katja/programs/helix.nix
|
0
R
homeManagerModules/katja/programs/htop.nix -> config/home/katja/programs/htop.nix
|
0
R
homeManagerModules/katja/programs/imv.nix -> config/home/katja/programs/imv.nix
|
0
R
homeManagerModules/katja/programs/javascript.nix -> config/home/katja/programs/javascript.nix
|
0
R
homeManagerModules/katja/programs/libreoffice.nix -> config/home/katja/programs/libreoffice.nix
|
0
R
homeManagerModules/katja/programs/mcfly.nix -> config/home/katja/programs/mcfly.nix
|
0
R
homeManagerModules/katja/programs/micro.nix -> config/home/katja/programs/micro.nix
|
0
R
homeManagerModules/katja/programs/mpv.nix -> config/home/katja/programs/mpv.nix
|
0
R
homeManagerModules/katja/programs/nautilus.nix -> config/home/katja/programs/nautilus.nix
|
0
R
homeManagerModules/katja/programs/nim.nix -> config/home/katja/programs/nim.nix
|
0
R
homeManagerModules/katja/programs/nix-cleanup.nix -> config/home/katja/programs/nix-cleanup.nix
|
0
R
homeManagerModules/katja/programs/ocrmypdf.nix -> config/home/katja/programs/ocrmypdf.nix
|
0
R
homeManagerModules/katja/programs/paper-plane.nix -> config/home/katja/programs/paper-plane.nix
|
0
R
homeManagerModules/katja/programs/papers.nix -> config/home/katja/programs/papers.nix
|
0
R
homeManagerModules/katja/programs/password-store.nix -> config/home/katja/programs/password-store.nix
|
0
R
homeManagerModules/katja/programs/pdfarranger.nix -> config/home/katja/programs/pdfarranger.nix
|
0
R
homeManagerModules/katja/programs/phockup.nix -> config/home/katja/programs/phockup.nix
|
0
R
homeManagerModules/katja/programs/shellUtilities.nix -> config/home/katja/programs/shellUtilities.nix
|
0
R
homeManagerModules/katja/programs/ssh.nix -> config/home/katja/programs/ssh.nix
|
0
R
homeManagerModules/katja/programs/starship.nix -> config/home/katja/programs/starship.nix
|
0
R
homeManagerModules/katja/programs/texlive.nix -> config/home/katja/programs/texlive.nix
|
0
R
homeManagerModules/katja/programs/thunderbird.nix -> config/home/katja/programs/thunderbird.nix
|
0
R
homeManagerModules/katja/programs/tmux.nix -> config/home/katja/programs/tmux.nix
|
0
R
homeManagerModules/katja/programs/tuba.nix -> config/home/katja/programs/tuba.nix
|
0
R
homeManagerModules/katja/programs/typst.nix -> config/home/katja/programs/typst.nix
|
0
R
homeManagerModules/katja/programs/yt-dlp.nix -> config/home/katja/programs/yt-dlp.nix
|
0
R
homeManagerModules/katja/programs/zathura.nix -> config/home/katja/programs/zathura.nix
|
0
R
homeManagerModules/katja/programs/zoxide.nix -> config/home/katja/programs/zoxide.nix
|
0
R
homeManagerModules/katja/programs/zsh.nix -> config/home/katja/programs/zsh.nix
|
0
R
homeManagerModules/katja/services/easyeffects.nix -> config/home/katja/services/easyeffects.nix
|
0
R
homeManagerModules/katja/services/mako.nix -> config/home/katja/services/mako.nix
|
0
R
homeManagerModules/katja/services/waybar.nix -> config/home/katja/services/waybar.nix
|
0
R
homeManagerModules/katja/services/wlsunset.nix -> config/home/katja/services/wlsunset.nix
|
0
R
nixosModules/sapphicCfg/modules/audio.nix -> config/nixos/modules/audio.nix
|
0
R
nixosModules/sapphicCfg/modules/boot/configurationLimit.nix -> config/nixos/modules/boot/configurationLimit.nix
|
0
R
nixosModules/sapphicCfg/modules/boot/enable.nix -> config/nixos/modules/boot/enable.nix
|
0
A
config/nixos/modules/boot/plymouth.nix
|
40
++++++++++++++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/modules/boot/secureboot.nix -> config/nixos/modules/boot/secureboot.nix
|
0
R
nixosModules/sapphicCfg/modules/boot/type.nix -> config/nixos/modules/boot/type.nix
|
0
R
nixosModules/sapphicCfg/modules/font.nix -> config/nixos/modules/font.nix
|
0
A
config/nixos/modules/gnomeMinimal.nix
|
437
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/hardware/cpu.nix -> config/nixos/modules/hardware/cpu.nix
|
0
A
config/nixos/modules/hardware/fprint.nix
|
54
++++++++++++++++++++++++++++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/hardware/smartcard.nix -> config/nixos/modules/hardware/smartcard.nix
|
0
R
nixosModules/sapphicCfg/hardware/video/enable.nix -> config/nixos/modules/hardware/video/enable.nix
|
0
R
nixosModules/sapphicCfg/hardware/video/intel.nix -> config/nixos/modules/hardware/video/intel.nix
|
0
A
config/nixos/modules/hardware/video/nvidia.nix
|
144
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/modules/homeManager.nix -> config/nixos/modules/homeManager.nix
|
0
R
nixosModules/sapphicCfg/modules/locale.nix -> config/nixos/modules/locale.nix
|
0
R
nixosModules/sapphicCfg/modules/nix/disableChannels.nix -> config/nixos/modules/nix/disableChannels.nix
|
0
R
nixosModules/sapphicCfg/modules/nix/enable.nix -> config/nixos/modules/nix/enable.nix
|
0
A
config/nixos/modules/presets/base.nix
|
99
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
config/nixos/modules/presets/graphical/enable.nix
|
29
+++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/presets/graphical/type.nix -> config/nixos/modules/presets/graphical/type.nix
|
0
A
config/nixos/modules/presets/graphical/typeGnomeMinimal.nix
|
30
++++++++++++++++++++++++++++++
A
config/nixos/modules/presets/katja/enable.nix
|
36
++++++++++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/presets/katja/syncthing.nix -> config/nixos/modules/presets/katja/syncthing.nix
|
0
R
nixosModules/sapphicCfg/programs/fish.nix -> config/nixos/modules/programs/fish.nix
|
0
R
nixosModules/sapphicCfg/programs/git.nix -> config/nixos/modules/programs/git.nix
|
0
R
nixosModules/sapphicCfg/programs/networkUtilities.nix -> config/nixos/modules/programs/networkUtilities.nix
|
0
R
nixosModules/sapphicCfg/programs/shellUtilities.nix -> config/nixos/modules/programs/shellUtilities.nix
|
0
R
nixosModules/sapphicCfg/programs/systemUtilities.nix -> config/nixos/modules/programs/systemUtilities.nix
|
0
R
nixosModules/sapphicCfg/modules/security/enable.nix -> config/nixos/modules/security/enable.nix
|
0
A
config/nixos/modules/security/kernel.nix
|
85
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/modules/security/networking.nix -> config/nixos/modules/security/networking.nix
|
0
R
nixosModules/sapphicCfg/services/keyd.nix -> config/nixos/modules/services/keyd.nix
|
0
R
nixosModules/sapphicCfg/services/syncthing.nix -> config/nixos/modules/services/syncthing.nix
|
0
A
config/nixos/modules/sops.nix
|
29
+++++++++++++++++++++++++++++
R
nixosModules/sapphicCfg/modules/unfree.nix -> config/nixos/modules/unfree.nix
|
0
A
config/nixos/modules/users/katja.nix
|
96
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
config/nixosModules.nix
|
71
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M
flake.nix
|
12
++++++++++--
M
hosts/huntii/default.nix
|
6
++++--
D
nixosModules.nix
|
71
-----------------------------------------------------------------------
D
nixosModules/sapphicCfg/hardware/fprint.nix
|
54
------------------------------------------------------
D
nixosModules/sapphicCfg/hardware/video/nvidia.nix
|
144
-------------------------------------------------------------------------------
D
nixosModules/sapphicCfg/modules/gnomeMinimal.nix
|
436
-------------------------------------------------------------------------------
D
nixosModules/sapphicCfg/modules/plymouth.nix
|
40
----------------------------------------
D
nixosModules/sapphicCfg/modules/security/kernel.nix
|
85
-------------------------------------------------------------------------------
D
nixosModules/sapphicCfg/modules/sops.nix
|
28
----------------------------
D
nixosModules/sapphicCfg/presets/base.nix
|
101
-------------------------------------------------------------------------------
D
nixosModules/sapphicCfg/presets/graphical/enable.nix
|
29
-----------------------------
D
nixosModules/sapphicCfg/presets/graphical/typeGnomeMinimal.nix
|
31
-------------------------------
D
nixosModules/sapphicCfg/presets/katja/enable.nix
|
36
------------------------------------
D
nixosModules/sapphicCfg/users/katja.nix
|
95
-------------------------------------------------------------------------------
R
patches/gdm-autoselect-user.patch -> resources/patches/gdm-autoselect-user.patch
|
0
R
patches/gdm-fix-paths.patch -> resources/patches/gdm-fix-paths.patch
|
0
R
patches/gdm-fix-wayland.patch -> resources/patches/gdm-fix-wayland.patch
|
0
diff --git a/homeManagerModules/katja/common.nix b/config/home/katja/common.nix
diff --git a/homeManagerModules/katja/configure/gnome.nix b/config/home/katja/configure/gnome.nix
diff --git a/homeManagerModules/katja/configure/xdg.nix b/config/home/katja/configure/xdg.nix
diff --git a/homeManagerModules/katja/gnomeExtensions/bluetoothBatteryMeter.nix b/config/home/katja/gnomeExtensions/bluetoothBatteryMeter.nix
diff --git a/homeManagerModules/katja/gnomeExtensions/dash-to-dock.nix b/config/home/katja/gnomeExtensions/dash-to-dock.nix
diff --git a/homeManagerModules/katja/gnomeExtensions/emoji-copy.nix b/config/home/katja/gnomeExtensions/emoji-copy.nix
diff --git a/homeManagerModules/katja/gnomeExtensions/just-perfection.nix b/config/home/katja/gnomeExtensions/just-perfection.nix
diff --git a/homeManagerModules/katja/gnomeExtensions/pip-on-top.nix b/config/home/katja/gnomeExtensions/pip-on-top.nix
diff --git a/homeManagerModules/katja/gnomeExtensions/search-light.nix b/config/home/katja/gnomeExtensions/search-light.nix
diff --git a/homeManagerModules/katja/gnomeExtensions/space-bar.nix b/config/home/katja/gnomeExtensions/space-bar.nix
diff --git a/homeManagerModules/katja/programs/alacritty.nix b/config/home/katja/programs/alacritty.nix
diff --git a/homeManagerModules/katja/programs/ansible.nix b/config/home/katja/programs/ansible.nix
diff --git a/homeManagerModules/katja/programs/apostrophe.nix b/config/home/katja/programs/apostrophe.nix
diff --git a/homeManagerModules/katja/programs/bat.nix b/config/home/katja/programs/bat.nix
diff --git a/homeManagerModules/katja/programs/bitwarden-cli.nix b/config/home/katja/programs/bitwarden-cli.nix
diff --git a/homeManagerModules/katja/programs/celluloid.nix b/config/home/katja/programs/celluloid.nix
diff --git a/homeManagerModules/katja/programs/deploymentUtilities.nix b/config/home/katja/programs/deploymentUtilities.nix
diff --git a/homeManagerModules/katja/programs/eza.nix b/config/home/katja/programs/eza.nix
diff --git a/homeManagerModules/katja/programs/firefox.nix b/config/home/katja/programs/firefox.nix
diff --git a/homeManagerModules/katja/programs/fish.nix b/config/home/katja/programs/fish.nix
diff --git a/homeManagerModules/katja/programs/fractal.nix b/config/home/katja/programs/fractal.nix
diff --git a/homeManagerModules/katja/programs/ghostty.nix b/config/home/katja/programs/ghostty.nix
diff --git a/homeManagerModules/katja/programs/git.nix b/config/home/katja/programs/git.nix
diff --git a/homeManagerModules/katja/programs/gpg.nix b/config/home/katja/programs/gpg.nix
diff --git a/homeManagerModules/katja/programs/helix.nix b/config/home/katja/programs/helix.nix
diff --git a/homeManagerModules/katja/programs/htop.nix b/config/home/katja/programs/htop.nix
diff --git a/homeManagerModules/katja/programs/imv.nix b/config/home/katja/programs/imv.nix
diff --git a/homeManagerModules/katja/programs/javascript.nix b/config/home/katja/programs/javascript.nix
diff --git a/homeManagerModules/katja/programs/libreoffice.nix b/config/home/katja/programs/libreoffice.nix
diff --git a/homeManagerModules/katja/programs/mcfly.nix b/config/home/katja/programs/mcfly.nix
diff --git a/homeManagerModules/katja/programs/micro.nix b/config/home/katja/programs/micro.nix
diff --git a/homeManagerModules/katja/programs/mpv.nix b/config/home/katja/programs/mpv.nix
diff --git a/homeManagerModules/katja/programs/nautilus.nix b/config/home/katja/programs/nautilus.nix
diff --git a/homeManagerModules/katja/programs/nim.nix b/config/home/katja/programs/nim.nix
diff --git a/homeManagerModules/katja/programs/nix-cleanup.nix b/config/home/katja/programs/nix-cleanup.nix
diff --git a/homeManagerModules/katja/programs/ocrmypdf.nix b/config/home/katja/programs/ocrmypdf.nix
diff --git a/homeManagerModules/katja/programs/paper-plane.nix b/config/home/katja/programs/paper-plane.nix
diff --git a/homeManagerModules/katja/programs/papers.nix b/config/home/katja/programs/papers.nix
diff --git a/homeManagerModules/katja/programs/password-store.nix b/config/home/katja/programs/password-store.nix
diff --git a/homeManagerModules/katja/programs/pdfarranger.nix b/config/home/katja/programs/pdfarranger.nix
diff --git a/homeManagerModules/katja/programs/phockup.nix b/config/home/katja/programs/phockup.nix
diff --git a/homeManagerModules/katja/programs/shellUtilities.nix b/config/home/katja/programs/shellUtilities.nix
diff --git a/homeManagerModules/katja/programs/ssh.nix b/config/home/katja/programs/ssh.nix
diff --git a/homeManagerModules/katja/programs/starship.nix b/config/home/katja/programs/starship.nix
diff --git a/homeManagerModules/katja/programs/texlive.nix b/config/home/katja/programs/texlive.nix
diff --git a/homeManagerModules/katja/programs/thunderbird.nix b/config/home/katja/programs/thunderbird.nix
diff --git a/homeManagerModules/katja/programs/tmux.nix b/config/home/katja/programs/tmux.nix
diff --git a/homeManagerModules/katja/programs/tuba.nix b/config/home/katja/programs/tuba.nix
diff --git a/homeManagerModules/katja/programs/typst.nix b/config/home/katja/programs/typst.nix
diff --git a/homeManagerModules/katja/programs/yt-dlp.nix b/config/home/katja/programs/yt-dlp.nix
diff --git a/homeManagerModules/katja/programs/zathura.nix b/config/home/katja/programs/zathura.nix
diff --git a/homeManagerModules/katja/programs/zoxide.nix b/config/home/katja/programs/zoxide.nix
diff --git a/homeManagerModules/katja/programs/zsh.nix b/config/home/katja/programs/zsh.nix
diff --git a/homeManagerModules/katja/services/easyeffects.nix b/config/home/katja/services/easyeffects.nix
diff --git a/homeManagerModules/katja/services/mako.nix b/config/home/katja/services/mako.nix
diff --git a/homeManagerModules/katja/services/waybar.nix b/config/home/katja/services/waybar.nix
diff --git a/homeManagerModules/katja/services/wlsunset.nix b/config/home/katja/services/wlsunset.nix
diff --git a/nixosModules/sapphicCfg/modules/audio.nix b/config/nixos/modules/audio.nix
diff --git a/nixosModules/sapphicCfg/modules/boot/configurationLimit.nix b/config/nixos/modules/boot/configurationLimit.nix
diff --git a/nixosModules/sapphicCfg/modules/boot/enable.nix b/config/nixos/modules/boot/enable.nix
diff --git a/config/nixos/modules/boot/plymouth.nix b/config/nixos/modules/boot/plymouth.nix
@@ -0,0 +1,40 @@
+{
+  povSelf,
+  lib,
+  config,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options = {
+    enable = {
+      type = types.bool;
+      default = false;
+    };
+    theme = {
+      type = types.str;
+      default = "bgrt";
+    };
+  };
+
+  config = lib.mkIf cfg.enable {
+    boot = {
+      consoleLogLevel = 0;
+      initrd.verbose = false;
+      kernelParams = [
+        "quiet"
+        "udev.log_level=3"
+      ];
+      plymouth = {
+        enable = true;
+        inherit (cfg) theme;
+      };
+    };
+  };
+
+}
diff --git a/nixosModules/sapphicCfg/modules/boot/secureboot.nix b/config/nixos/modules/boot/secureboot.nix
diff --git a/nixosModules/sapphicCfg/modules/boot/type.nix b/config/nixos/modules/boot/type.nix
diff --git a/nixosModules/sapphicCfg/modules/font.nix b/config/nixos/modules/font.nix
diff --git a/config/nixos/modules/gnomeMinimal.nix b/config/nixos/modules/gnomeMinimal.nix
@@ -0,0 +1,437 @@
+{
+  inputs,
+  povSelf,
+  config,
+  lib,
+  pkgs,
+  utils,
+  ...
+}:
+
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+  settingsFormat = pkgs.formats.ini { };
+
+in
+{
+
+  options = {
+    enable = {
+      type = types.bool;
+      default = false;
+    };
+    gdm = {
+      dconfSettings = {
+        type = lib.types.attrs;
+        default = { };
+      };
+      settings = {
+        type = settingsFormat.type;
+        default = { };
+      };
+    };
+  };
+
+  config = lib.mkIf cfg.enable (
+    let
+      configFile = settingsFormat.generate "custom.conf" cfg.gdm.settings;
+
+      nixos-background-info = pkgs.writeTextFile rec {
+        name = "nixos-background-info";
+        destination = "/share/gnome-background-properties/nixos.xml";
+        text = ''
+          <?xml version="1.0"?>
+          <!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
+          <wallpapers>
+            <wallpaper deleted="false">
+              <name>Blobs</name>
+              <filename>${pkgs.nixos-artwork.wallpapers.simple-blue.gnomeFilePath}</filename>
+              <filename-dark>${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}</filename-dark>
+              <options>zoom</options>
+              <shade_type>solid</shade_type>
+              <pcolor>#3a4ba0</pcolor>
+              <scolor>#2f302f</scolor>
+            </wallpaper>
+          </wallpapers>
+        '';
+      };
+
+    in
+    {
+
+      # patched to remove xorg and xwayland completely
+      nixpkgs.overlays = [
+        (final: prev: {
+          # deactivate some backends
+          gnome-online-accounts = prev.gnome-online-accounts.overrideAttrs (prevAttrs: {
+            mesonFlags = prevAttrs.mesonFlags ++ [
+              "-Dexchange=false"
+              "-Dgoogle=false"
+              "-Dkerberos=false"
+              "-Downcloud=false"
+              "-Dwindows_live=false"
+              "-Dms_graph=false"
+            ];
+          });
+
+          mutter = prev.mutter.overrideAttrs (prevAttrs: {
+            mesonFlags = [
+              "-Dinstalled_tests=false"
+              "-Dtests=disabled"
+              "-Ddocs=true"
+              "-Dx11=false"
+              "-Dxwayland=false"
+              "-Degl_device=true"
+              "-Dwayland_eglstream=true"
+              "-Dwayland=true"
+              "-Dprofiler=true"
+              "-Dsm=false"
+            ];
+            buildInputs =
+              (utils.removePackagesByName prevAttrs.buildInputs [
+                prev.xorg.libSM
+                prev.xwayland
+                prev.gtk4
+                prev.xorg.libICE
+                prev.xorg.libX11
+                prev.xorg.libXcomposite
+                prev.xorg.libXcursor
+                prev.xorg.libXdamage
+                prev.xorg.libXext
+                prev.xorg.libXfixes
+                prev.xorg.libXi
+                prev.xorg.libXtst
+                prev.xorg.libxkbfile
+                prev.xkeyboard_config
+                prev.xorg.libxcb
+                prev.xorg.libXrandr
+                prev.xorg.libXinerama
+                prev.xorg.libXau
+              ])
+              ++ [ prev.libGL ];
+            nativeBuildInputs = utils.removePackagesByName prevAttrs.nativeBuildInputs [
+              prev.xorg.xorgserver
+            ];
+          });
+
+          gdm = prev.gdm.overrideAttrs (prevAttrs: {
+            mesonFlags = prev.lib.lists.remove "--Dgdm-xsession=true" (
+              prevAttrs.mesonFlags
+              ++ [
+                "-Dgdm-xsession=false"
+                "-Dx11-support=false"
+              ]
+            );
+            patches = [
+              # GDM fails to find g-s with the following error in the journal.
+              # gdm-x-session[976]: dbus-run-session: failed to exec 'gnome-session': No such file or directory
+              # https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/92
+              (prev.fetchpatch {
+                url = "https://gitlab.gnome.org/GNOME/gdm/-/commit/ccecd9c975d04da80db4cd547b67a1a94fa83292.patch";
+                hash = "sha256-5hKS9wjjhuSAYwXct5vS0dPbmPRIINJoLC0Zm1naz6Q=";
+                revert = true;
+              })
+
+              inputs.self.resources.patches.gdm-fix-wayland
+
+              # Change hardcoded paths to nix store paths.
+              (prev.substituteAll {
+                src = inputs.self.resources.patches.gdm-fix-paths;
+                coreutils = final.coreutils;
+                plymouth = final.plymouth;
+                dbus = final.dbus;
+              })
+            ];
+            postPatch = ''
+              # Reverts https://gitlab.gnome.org/GNOME/gdm/-/commit/b0f802e36ff948a415bfd2bccaa268b6990515b7
+              # The gdm-auth-config tool is probably not too useful for NixOS, but we still want the dconf profile
+              # installed (mostly just because .passthru.tests can make use of it).
+              substituteInPlace meson.build \
+                --replace-fail "dconf_prefix = dconf_dep.get_variable(pkgconfig: 'prefix')" "dconf_prefix = gdm_prefix"
+            '';
+            buildInputs = utils.removePackagesByName prevAttrs.buildInputs [
+              prev.xorg.libX11
+              prev.xorg.libXdmcp
+              prev.xorg.libxcb
+            ];
+          });
+
+          gnome-session = prev.gnome-session.overrideAttrs (prevAttrs: {
+            mesonFlags = [ "-Dx11=false" ];
+            buildInputs = utils.removePackagesByName prevAttrs.buildInputs [
+              prev.xorg.libICE
+              prev.xorg.xtrans
+            ];
+          });
+
+        })
+      ];
+
+      users.groups.gdm.gid = config.ids.gids.gdm;
+      users.users.gdm = {
+        name = "gdm";
+        uid = config.ids.uids.gdm;
+        group = "gdm";
+        home = "/run/gdm";
+        description = "GDM user";
+      };
+
+      security.polkit.enable = true;
+      networking.networkmanager.enable = lib.mkDefault true;
+
+      hardware = {
+        graphics.enable = true;
+        bluetooth.enable = lib.mkDefault true;
+      };
+
+      fonts.packages = with pkgs; [
+        cantarell-fonts
+        dejavu_fonts
+        source-code-pro
+        source-sans
+      ];
+
+      environment = {
+        etc."gdm/custom.conf".source = configFile;
+
+        systemPackages = with pkgs; [
+          (lib.mkIf config.hardware.bluetooth.enable gnome-bluetooth)
+          (lib.mkIf config.services.colord.enable gnome-color-manager)
+          gnome-shell
+          gnome-control-center
+          ghostty
+          adwaita-icon-theme
+          sound-theme-freedesktop
+          nixos-icons
+          nixos-background-info
+          glib # for gsettings program
+          gnome-menus
+          gtk3.out # for gtk-launch program
+          xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
+          xdg-user-dirs-gtk
+        ];
+
+        # Needed for themes and backgrounds
+        pathsToLink = [
+          "/share" # TODO: https://github.com/NixOS/nixpkgs/issues/47173
+          "/share/nautilus-python/extensions"
+        ];
+      };
+
+      services = {
+        gnome.gnome-settings-daemon.enable = true;
+        gnome.glib-networking.enable = true;
+        udisks2.enable = true;
+        libinput.enable = true;
+        accounts-daemon.enable = true;
+        gnome.at-spi2-core.enable = lib.mkDefault true;
+        gnome.gnome-keyring.enable = lib.mkDefault true;
+        pipewire.enable = lib.mkDefault true;
+        hardware.bolt.enable = lib.mkDefault true;
+        colord.enable = lib.mkDefault true;
+        power-profiles-daemon.enable = lib.mkDefault true;
+        upower.enable = lib.mkDefault config.powerManagement.enable;
+        system-config-printer.enable = lib.mkDefault config.services.printing.enable;
+
+        gvfs.enable = true;
+        gvfs.package =
+          (pkgs.gvfs.overrideAttrs (old: {
+            mesonFlags = (old.mesonFlags or [ ]) ++ [
+              "-Dafp=false"
+              "-Dafc=false"
+              "-Dmtp=false"
+              "-Dgphoto2=false"
+            ];
+          })).override
+            {
+              samba = null;
+            };
+
+        udev.packages = [ pkgs.mutter ];
+        dbus.packages = [ pkgs.gdm ];
+
+        geoclue2.enable = lib.mkDefault true;
+        geoclue2.enableDemoAgent = false; # GNOME has its own geoclue agent
+        geoclue2.appConfig =
+          lib.genAttrs [ "gnome-datetime-panel" "gnome-color-panel" "org.gnome.Shell" ]
+            (name: {
+              isAllowed = true;
+              isSystem = true;
+            });
+      };
+
+      programs = {
+        dconf.enable = true;
+        dconf.profiles.gdm.databases = [
+          { settings = cfg.gdm.dconfSettings; }
+          "${pkgs.gdm}/share/gdm/greeter-dconf-defaults"
+        ];
+      };
+
+      xdg = {
+        mime.enable = true;
+        icons.enable = true;
+
+        portal.enable = true;
+        portal.configPackages = lib.mkDefault [ pkgs.gnome-session ];
+        portal.extraPortals = with pkgs; [
+          xdg-desktop-portal-gnome
+          xdg-desktop-portal-gtk
+        ];
+      };
+
+      systemd = {
+        user.services.dbus.wantedBy = [ "default.target" ];
+
+        tmpfiles.rules = [ "d /run/gdm/.config 0711 gdm gdm" ];
+
+        packages = with pkgs; [
+          gdm
+          gnome-session
+          gnome-shell
+        ];
+
+        # We dont use the upstream gdm service
+        # it has to be disabled since the gdm package has it
+        # https://github.com/NixOS/nixpkgs/issues/108672
+        services.gdm.enable = false;
+
+        services.display-manager = {
+          description = "Display Manager";
+
+          wants = [
+            "systemd-machined.service"
+            "accounts-daemon.service"
+          ];
+          conflicts = [
+            "getty@${pkgs.gdm.initialVT}.service"
+            "plymouth-quit.service"
+          ];
+          onFailure = [ "plymouth-quit.service" ];
+          wantedBy = [ "multi-user.target" ];
+          after = [
+            "systemd-logind.service"
+            "systemd-user-sessions.service"
+            "systemd-machined.service"
+            "getty@${pkgs.gdm.initialVT}.service"
+            "acpid.service"
+            "plymouth-quit.service"
+            "plymouth-start.service"
+          ];
+
+          path = [ pkgs.gnome-session ];
+          environment = {
+            XDG_DATA_DIRS = lib.makeSearchPath "share" (
+              with pkgs;
+              [
+                gdm
+                gnome-session.sessions
+                gnome-control-center # for accessibility icon
+                adwaita-icon-theme
+                hicolor-icon-theme
+              ]
+            );
+          };
+
+          serviceConfig = {
+            KillMode = "mixed";
+            IgnoreSIGPIPE = "no";
+            BusName = "org.gnome.DisplayManager";
+            StandardError = "inherit";
+            ExecStart = "${pkgs.gdm}/bin/gdm";
+            ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
+            KeyringMode = "shared";
+            EnvironmentFile = "-/etc/locale.conf";
+            Restart = "always";
+            RestartSec = "200ms";
+            SyslogIdentifier = "display-manager";
+          };
+
+          restartIfChanged = false;
+
+          # Stop restarting if the display manager stops (crashes) 2 times in one minute.
+          startLimitIntervalSec = 30;
+          startLimitBurst = 3;
+        };
+
+        # Prevent nixos-rebuild switch from bringing down the graphical
+        # session. (If multi-user.target wants plymouth-quit.service which
+        # conflicts display-manager.service, then when nixos-rebuild
+        # switch starts multi-user.target, display-manager.service is
+        # stopped so plymouth-quit.service can be started.)
+        services.plymouth-quit = lib.mkIf config.boot.plymouth.enable {
+          wantedBy = lib.mkForce [ ];
+        };
+      };
+
+      # GDM LFS PAM modules, adapted somehow to NixOS
+      security.pam.services = {
+        gdm-launch-environment.text = ''
+          auth     required       pam_succeed_if.so audit quiet_success user = gdm
+          auth     optional       pam_permit.so
+
+          account  required       pam_succeed_if.so audit quiet_success user = gdm
+          account  sufficient     pam_unix.so
+
+          password required       pam_deny.so
+
+          session  required       pam_succeed_if.so audit quiet_success user = gdm
+          session  required       pam_env.so conffile=/etc/pam/environment readenv=0
+          session  optional       ${config.systemd.package}/lib/security/pam_systemd.so
+          session  optional       pam_keyinit.so force revoke
+          session  optional       pam_permit.so
+        '';
+
+        gdm-password.text = ''
+          auth      substack      login
+          account   include       login
+          password  substack      login
+          session   include       login
+        '';
+
+        gdm-autologin.text = ''
+          auth      requisite     pam_nologin.so
+          auth      required      pam_succeed_if.so uid >= 1000 quiet
+          ${lib.optionalString config.security.pam.services.login.enableGnomeKeyring ''
+            auth       [success=ok default=1]      ${pkgs.gdm}/lib/security/pam_gdm.so
+            auth       optional                    ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so
+          ''}
+          auth      required      pam_permit.so
+
+          account   sufficient    pam_unix.so
+
+          password  requisite     pam_unix.so nullok yescrypt
+
+          session   optional      pam_keyinit.so revoke
+          session   include       login
+        '';
+
+        # This would block password prompt when included by gdm-password.
+        # GDM will instead run gdm-fingerprint in parallel.
+        login.fprintAuth = lib.mkIf config.services.fprintd.enable false;
+
+        gdm-fingerprint.text = lib.mkIf config.services.fprintd.enable ''
+          auth       required                    pam_shells.so
+          auth       requisite                   pam_nologin.so
+          auth       requisite                   pam_faillock.so      preauth
+          auth       required                    ${pkgs.fprintd}/lib/security/pam_fprintd.so
+          auth       required                    pam_env.so
+          ${lib.optionalString config.security.pam.services.login.enableGnomeKeyring ''
+            auth       [success=ok default=1]      ${pkgs.gdm}/lib/security/pam_gdm.so
+            auth       optional                    ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so
+          ''}
+
+          account    include                     login
+
+          password   required                    pam_deny.so
+
+          session    include                     login
+        '';
+      };
+
+    }
+  );
+
+}
diff --git a/nixosModules/sapphicCfg/hardware/cpu.nix b/config/nixos/modules/hardware/cpu.nix
diff --git a/config/nixos/modules/hardware/fprint.nix b/config/nixos/modules/hardware/fprint.nix
@@ -0,0 +1,54 @@
+{
+  povSelf,
+  hostConfig,
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+  cfgRoot = lib.getAttrFromPath (lib.remove [ "hardware" "fpint" ] povSelf) config;
+
+in
+{
+
+  options = {
+    enable = {
+      type = types.bool;
+      default = false;
+    };
+    enableGoodixDriver = {
+      type = types.bool;
+      default = false;
+    };
+  };
+
+  config = lib.mkIf cfg.enable (lib.mkMerge [
+    {
+      services.fprintd.enable = true;
+    }
+    (
+      lib.mkIf cfg.enableGoodixDriver {
+        assertions = [
+          {
+            assertion = cfg.enableGoodixDriver -> cfgRoot.modules.unfree.enable;
+            message = ''
+              The hardware.fprint.enableGoodixDriver option uses unfree software.
+              To use it you need to set modules.unfree.enable to true.
+            '';
+          }
+        ];
+
+        modules.unfree.list = [ "libfprint-2-tod1-goodix" ];
+
+        services.fprintd.tod = {
+          enable = lib.mkDefault true;
+          driver = lib.mkDefault pkgs.libfprint-2-tod1-goodix;
+        };
+      }
+    )
+  ]);
+
+}
diff --git a/nixosModules/sapphicCfg/hardware/smartcard.nix b/config/nixos/modules/hardware/smartcard.nix
diff --git a/nixosModules/sapphicCfg/hardware/video/enable.nix b/config/nixos/modules/hardware/video/enable.nix
diff --git a/nixosModules/sapphicCfg/hardware/video/intel.nix b/config/nixos/modules/hardware/video/intel.nix
diff --git a/config/nixos/modules/hardware/video/nvidia.nix b/config/nixos/modules/hardware/video/nvidia.nix
@@ -0,0 +1,144 @@
+{
+  pov,
+  config,
+  lib,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath pov config;
+  cfgRoot = lib.getAttrFromPath (lib.remove [ "hardware" "video" ] pov) config;
+
+in
+{
+
+  options = {
+    enable = {
+      type = types.bool;
+      default = false;
+      description = ''
+        Enable NVIDIA hardware support
+      '';
+    };
+    open = {
+      type = types.bool;
+      default = false;
+    };
+    powerManagement = {
+      type = types.enum [
+        "on"
+        "off"
+        "finegrained"
+      ];
+      default = "on";
+      description = ''
+        on/off: Whether to enable experimental power management through systemd. For more information, see the NVIDIA docs,
+        on Chapter 21. Configuring Power Management Support.
+
+        finegrained: Whether to enable experimental power management of PRIME offload. For more information, see the NVIDIA docs,
+        on Chapter 22. PCI-Express Runtime D3 (RTD3) Power Management.
+      '';
+    };
+    integrated = {
+      enable = {
+        type = types.bool;
+        default = false;
+        description = ''
+          Enable support for integrated hardware
+        '';
+      };
+      integratedBus = {
+        type = types.str;
+        default = if config.hardware.cpu.vendor == "intel" then "PCI:0:2:0" else null;
+        description = ''
+          Bus ID of the integrated GPU. You can find it using lspci, either under 3D or VGA
+        '';
+      };
+      dedicatedBus = {
+        type = types.str;
+        default = "PCI:1:0:0";
+        description = ''
+          Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
+        '';
+      };
+    };
+  };
+
+  config = lib.mkIf (cfg.enable && cfg.nvidia.enable) (
+    lib.mkMerge [
+      {
+        assertions = [
+          {
+            assertion = !cfg.nvidia.open -> cfgRoot.modules.unfree.enable;
+            message = ''
+              The programs.nvidia module uses unfree software if open is set to false.
+              To use it you need to
+                - set modules.unfree.enable to true
+                OR
+                - set.modules.video.nvidia.open to true
+            '';
+          }
+        ];
+
+        boot = {
+          initrd.availableKernelModules = [
+            "nvidia"
+            "nvidia_modeset"
+            "nvidia_drm"
+            "nvidia_uvm"
+          ];
+          kernelParams = [ "nvidia.NVreg_UsePageAttributeTable=1" ];
+        };
+
+        environment.sessionVariables = {
+          _JAVA_AWT_WM_NONREPARENTING = "1";
+          GBM_BACKEND = "nvidia-drm";
+          NIXOS_OZONE_WL = "1";
+          SDL_VIDEODRIVER = "wayland"; # Can break some native games
+          WLR_NO_HARDWARE_CURSORS = "1";
+        };
+
+        services.xserver.videoDrivers = [
+          "fbdev"
+          "modesetting"
+          "nvidia"
+        ];
+
+        hardware = {
+          # NVIDIA
+          nvidia = {
+            inherit (cfg.nvidia) open;
+
+            nvidiaSettings = false;
+
+            # Kernel modesetting
+            modesetting.enable = true;
+
+            package = config.boot.kernelPackages.nvidiaPackages.latest;
+
+            # PowerManagement
+            powerManagement.enable = cfg.powerManagement == "on" || cfg.powerManagement == "finegrained";
+
+            powerManagement.finegrained = cfg.nvidia.powerManagement == "finegrained";
+
+            # Integrated GPU
+            prime =
+              if cfg.nvidia.integrated.enable then
+                {
+                  offload.enable = true;
+                  "${config.hardware.cpu.vendor}BusId" = cfg.nvidia.integrated.integratedBus;
+                  nvidiaBusId = cfg.nvidia.integrated.dedicatedBus;
+                }
+              else
+                { };
+          };
+        };
+      }
+
+      (lib.mkIf (!cfg.nvidia.open) {
+        modules.unfree.list = [ "nvidia-x11" ];
+      })
+    ]
+  );
+
+}
diff --git a/nixosModules/sapphicCfg/modules/homeManager.nix b/config/nixos/modules/homeManager.nix
diff --git a/nixosModules/sapphicCfg/modules/locale.nix b/config/nixos/modules/locale.nix
diff --git a/nixosModules/sapphicCfg/modules/nix/disableChannels.nix b/config/nixos/modules/nix/disableChannels.nix
diff --git a/nixosModules/sapphicCfg/modules/nix/enable.nix b/config/nixos/modules/nix/enable.nix
diff --git a/config/nixos/modules/presets/base.nix b/config/nixos/modules/presets/base.nix
@@ -0,0 +1,99 @@
+{
+  povSelf,
+  pkgs,
+  lib,
+  config,
+  hostConfig,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options = {
+    enable = {
+      type = types.bool;
+      default = false;
+    };
+  };
+
+  config = lib.mkIf cfg.enable {
+    environment.defaultPackages = lib.mkForce [];
+
+    users.mutableUsers = lib.mkForce false;
+
+    programs.command-not-found.enable = false;
+
+    # Remove perl from activation
+    system.etc.overlay.enable = lib.mkDefault true;
+    services.userborn.enable = lib.mkDefault true;
+
+    networking = {
+      hostId = builtins.substring 0 8 (builtins.hashString "sha256" hostConfig.hostName);
+      hostName = hostConfig.hostName;
+      domain = lib.mkDefault hostConfig.domain;
+
+      useNetworkd = lib.mkDefault true;
+      useDHCP = lib.mkDefault false;
+
+      nftables.enable = lib.mkDefault true;
+      firewall.enable = lib.mkDefault true;
+    };
+
+    hardware.enableRedistributableFirmware = true;
+
+    modules = {
+      boot.enable = lib.mkDefault true;
+      boot.type = lib.mkDefault "uefi";
+
+      locale.enable = lib.mkDefault true;
+      unfree.enable = lib.mkDefault true;
+      nix.enable = lib.mkDefault true;
+      homeManager.enable = lib.mkDefault true;
+      sops.enable = lib.mkDefault true;
+
+      security = {
+        enable = lib.mkDefault true;
+        kernel = lib.mkDefault true;
+        networking = lib.mkDefault true;
+      };
+
+      programs = {
+        shellUtilities.enable = lib.mkDefault true;
+        systemUtilities.enable = lib.mkDefault true;
+        networkUtilities.enable = lib.mkDefault true;
+
+        fish.enable = lib.mkDefault true;
+        git.enable = lib.mkDefault true;
+      };
+    };
+
+    services = {
+      fstrim.enable = lib.mkDefault true;
+    };
+
+    # thanks piegames (https://git.darmstadt.ccc.de/piegames/home-config/-/blob/master/modules/generic.nix#L84)
+    system.activationScripts = {
+      diff = {
+        supportsDryActivation = true;
+        text = ''
+          ${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff "$(readlink /run/current-system)" "$systemConfig"
+          # Ignore "failures" because these tools have weird exit codes
+          ${pkgs.colordiff}/bin/colordiff --nobanner --fakeexitcode --color=always -ur -I '\/nix\/store' \
+            -- "$(readlink /run/current-system)/activate" "$systemConfig/activate" | ${pkgs.gnugrep}/bin/grep -v "^Binary files" || true
+          ${pkgs.colordiff}/bin/colordiff --nobanner --fakeexitcode --color=always -ur -I '\/nix\/store' \
+            -x "os-release" -x "issue" \
+            -- "$(readlink /run/current-system)/etc" "$systemConfig/etc" | ${pkgs.gnugrep}/bin/grep -v "^Binary files" || true
+          ${pkgs.colordiff}/bin/colordiff --nobanner --fakeexitcode --color=always -ur -I '\/nix\/store' \
+            -x "environment.d" \
+            -x "hwdb.d" \
+            -- "$(readlink /run/current-system)/systemd" "$systemConfig/systemd" | ${pkgs.gnugrep}/bin/grep -v "^Binary files" || true
+        '';
+      };
+    };
+  };
+
+}
diff --git a/config/nixos/modules/presets/graphical/enable.nix b/config/nixos/modules/presets/graphical/enable.nix
@@ -0,0 +1,29 @@
+{
+  povSelf,
+  config,
+  lib,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  option = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf cfg {
+    modules = {
+      boot.secureboot = lib.mkDefault true;
+      boot.plymouth.enable = true;
+
+      font.enable = true;
+      audio.enable = true;
+    };
+  };
+
+}
diff --git a/nixosModules/sapphicCfg/presets/graphical/type.nix b/config/nixos/modules/presets/graphical/type.nix
diff --git a/config/nixos/modules/presets/graphical/typeGnomeMinimal.nix b/config/nixos/modules/presets/graphical/typeGnomeMinimal.nix
@@ -0,0 +1,30 @@
+{
+  inputs,
+  pov,
+  config,
+  lib,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath pov config;
+
+in
+{
+
+  config = lib.mkIf (cfg.enable && (cfg.type == "gnomeMinimal")) {
+    nixpkgs.overlays = [
+      (final: prev: {
+        # patch gdm to automaticly select the first user
+        gnome-shell = prev.gnome-shell.overrideAttrs (prevAttrs: {
+          patches = prevAttrs.patches ++ [ inputs.self.resources.patches.gdm-autoselect-user ];
+        });
+      })
+    ];
+
+    modules.gnomeMinimal.enable = true;
+
+    networking.networkmanager.enable = true;
+  };
+
+}
diff --git a/config/nixos/modules/presets/katja/enable.nix b/config/nixos/modules/presets/katja/enable.nix
@@ -0,0 +1,36 @@
+{
+  povSelf,
+  pkgs,
+  lib,
+  config,
+  hostConfig,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  option = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf cfg {
+    users.users.root.openssh.authorizedKeys.keys = [
+      (builtins.readFile "${pkgs.ctucx-website}/ssh_pubkey.asc")
+    ];
+
+    modules = {
+      presets.katja = {
+        syncthing.enable = lib.mkDefault true;
+      };
+
+      services.keyd.enable = lib.mkDefault true;
+      hardware.smartcard.enable = lib.mkDefault config.modules.presets.graphical.enable;
+    };
+  };
+
+}
diff --git a/nixosModules/sapphicCfg/presets/katja/syncthing.nix b/config/nixos/modules/presets/katja/syncthing.nix
diff --git a/nixosModules/sapphicCfg/programs/fish.nix b/config/nixos/modules/programs/fish.nix
diff --git a/nixosModules/sapphicCfg/programs/git.nix b/config/nixos/modules/programs/git.nix
diff --git a/nixosModules/sapphicCfg/programs/networkUtilities.nix b/config/nixos/modules/programs/networkUtilities.nix
diff --git a/nixosModules/sapphicCfg/programs/shellUtilities.nix b/config/nixos/modules/programs/shellUtilities.nix
diff --git a/nixosModules/sapphicCfg/programs/systemUtilities.nix b/config/nixos/modules/programs/systemUtilities.nix
diff --git a/nixosModules/sapphicCfg/modules/security/enable.nix b/config/nixos/modules/security/enable.nix
diff --git a/config/nixos/modules/security/kernel.nix b/config/nixos/modules/security/kernel.nix
@@ -0,0 +1,85 @@
+{
+  pov,
+  hostConfig,
+  config,
+  lib,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath pov config;
+
+in
+{
+
+  option = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf (cfg.enable && cfg.kernel) {
+    environment = {
+      # memoryAllocator.provider = mkDefault "scudo"; # Breaks stuff
+      # variables.SCUDO_OPTIONS = mkDefault "ZeroContents=1"; # Breaks stuff
+    };
+
+    boot = {
+      blacklistedKernelModules = [
+        # Obscure network protocols
+        "ax25"
+        "netrom"
+        "rose"
+
+        # Old or rare or insufficiently audited filesystems
+        "adfs"
+        "affs"
+        "bfs"
+        "befs"
+        "cramfs"
+        "efs"
+        "erofs"
+        "exofs"
+        "freevxfs"
+        "f2fs"
+        "hfs"
+        "hpfs"
+        "jfs"
+        "minix"
+        "nilfs2"
+        "ntfs"
+        "omfs"
+        "qnx4"
+        "qnx6"
+        "sysv"
+        "ufs"
+      ];
+      kernel.sysctl = {
+        "kernel.yama.ptrace_scope" = lib.mkOverride 500 1;
+        "kernel.kptr_restrict" = lib.mkOverride 500 2;
+        "net.core.bpf_jit_enable" = lib.mkDefault false;
+        "kernel.ftrace_enabled" = lib.mkDefault false;
+      };
+      kernelParams = lib.mkMerge [
+        [
+          # Slab/slub sanity checks, redzoning, and poisoning
+          "slub_debug=FZP"
+
+          # Overwrite free'd memory
+          "page_poison=1"
+
+          # Enable page allocator randomization
+          "page_alloc.shuffle=1"
+        ]
+        # Disable hibernation (allows replacing the running kernel) unless requested
+        (lib.mkIf (!hostConfig.hardware.allowHibernation) [ "nohibernate" ])
+      ];
+    };
+
+    # Disable kernel module loading once the system is fully initialised.
+    # FIXME: Remove reverse dependencies
+    security.lockKernelModules = lib.mkDefault (!config.modules.presets.graphical.enable);
+    # Prevent replacing the running kernel image w/o reboot
+    boot.kernel.sysctl."kernel.kexec_load_disabled" = lib.mkDefault true;
+  };
+
+}
diff --git a/nixosModules/sapphicCfg/modules/security/networking.nix b/config/nixos/modules/security/networking.nix
diff --git a/nixosModules/sapphicCfg/services/keyd.nix b/config/nixos/modules/services/keyd.nix
diff --git a/nixosModules/sapphicCfg/services/syncthing.nix b/config/nixos/modules/services/syncthing.nix
diff --git a/config/nixos/modules/sops.nix b/config/nixos/modules/sops.nix
@@ -0,0 +1,29 @@
+{
+  inputs,
+  povSelf,
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options.enable = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf cfg.enable {
+    sops = {
+      defaultSopsFile = inputs.self.sopsSecrets.${config.networking.hostName};
+      age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
+    };
+  };
+
+}
diff --git a/nixosModules/sapphicCfg/modules/unfree.nix b/config/nixos/modules/unfree.nix
diff --git a/config/nixos/modules/users/katja.nix b/config/nixos/modules/users/katja.nix
@@ -0,0 +1,96 @@
+{
+  inputs,
+  povSelf,
+  config,
+  lib,
+  pkgs,
+  homeManagerModules,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options.enable = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf cfg.enable {
+    sops.secrets.katjaPassword = {
+      neededForUsers = true;
+      sopsFile = inputs.self.sopsSecrets.common;
+    };
+
+    users.users.katja = {
+      uid = 1001;
+      description = "Katja";
+      hashedPasswordFile = config.sops.secrets.katjaPassword.path;
+      isNormalUser = true;
+      extraGroups = [
+        "wheel"
+      ];
+      openssh.authorizedKeys.keys = [
+        (builtins.readFile "${pkgs.ctucx-website}/ssh_pubkey.asc")
+      ];
+    };
+
+    home-manager.users.katja.imports = lib.concatLists [
+      [
+        homeManagerModules.katja.common
+      ]
+      (lib.optionals config.modules.presets.graphical.enable (
+        with homeManagerModules.katja;
+        [
+          configure.xdg
+
+          programs.ghostty
+          programs.ssh
+          programs.git
+          programs.gpg
+
+          programs.yt-dlp
+          programs.phockup
+          programs.bitwarden-cli
+
+          programs.nautilus
+
+          programs.firefox
+          programs.thunderbird
+
+          programs.fractal
+          programs.tuba
+
+          programs.typst
+          programs.ocrmypdf
+          programs.papers
+          programs.pdfarranger
+          programs.libreoffice
+          programs.apostrophe
+
+          programs.celluloid
+
+          programs.javascript
+        ]
+      ))
+      (lib.optionals (config.modules.presets.graphical.type == "gnomeMinimal") (
+        with homeManagerModules.katja;
+        [
+          configure.gnome
+
+          gnomeExtensions.dash-to-dock
+          gnomeExtensions.just-perfection
+          gnomeExtensions.space-bar
+          gnomeExtensions.search-light
+          gnomeExtensions.emoji-copy
+          gnomeExtensions.pip-on-top
+          gnomeExtensions.bluetoothBatteryMeter
+        ]
+      ))
+    ];
+  };
+
+}
diff --git a/config/nixosModules.nix b/config/nixosModules.nix
@@ -0,0 +1,71 @@
+{
+  inputs,
+  lib,
+  utils,
+  pkgs,
+  config,
+  hostConfig,
+  ...
+}:
+
+let
+  modules = inputs.haumea.lib.load {
+    src = ./nixos;
+    transformer = [
+      (inputs.haumea.lib.transformers.liftDefault)
+      (
+        _:
+        lib.mapAttrs (
+          name: value:
+          (
+            if value ? option then
+              (
+                (lib.removeAttrs value [ "option" ])
+                // {
+                  nixosOptions = lib.mkOption value.option;
+                }
+              )
+            else if value ? options then
+              (
+                (lib.removeAttrs value [ "options" ])
+                // {
+                  nixosOptions = (
+                    lib.mapAttrsRecursiveCond (element: !(element ? type)) (
+                      path: value: lib.mkOption value
+                    ) value.options
+                  );
+                }
+              )
+            else
+              (value)
+          )
+        )
+      )
+      (inputs.haumea.lib.transformers.hoistAttrs "nixosOptions" "options")
+    ];
+    inputs = {
+      inherit (inputs.self) homeManagerModules;
+      inherit
+        inputs
+        lib
+        utils
+        pkgs
+        config
+        hostConfig
+        ;
+    };
+  };
+
+in
+{
+
+  options = modules.options;
+
+  config = lib.mkMerge (
+    modules
+    |> lib.filterAttrs (name: value: name != "options")
+    |> lib.collect (element: element ? config)
+    |> lib.map (element: element.config)
+  );
+
+}
diff --git a/flake.nix b/flake.nix
@@ -36,11 +36,19 @@
 
       formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
 
+      resources = loadDir [
+        (inputs.haumea.lib.matchers.always pathLoader)
+      ] ./resources;
+
+      sopsSecrets = loadDir [
+        (inputs.haumea.lib.matchers.always pathLoader)
+      ] ./secrets;
+
       packages = forAllSystems (pkgs: (loadDir (pkgsLoader pkgs) ./packages));
 
-      nixosModules.default = ./nixosModules.nix;
+      nixosModules.default = ./config/nixosModules.nix;
 
-      homeManagerModules = loadDir pathLoader ./homeManagerModules;
+      homeManagerModules = loadDir pathLoader ./config/home;
 
       lib = loadDir (path: path: import path inputs) ./lib;
 
diff --git a/hosts/huntii/default.nix b/hosts/huntii/default.nix
@@ -13,14 +13,14 @@
   };
 
   configuration =
-    { ... }:
+    { pkgs, ... }:
     {
 
       imports = [
         ./hardware-configuration.nix
       ];
 
-      sapphicCfg = {
+      modules = {
         hardware = {
           video.intel.enable = true;
           cpu.updateMicrocode = true;

@@ -38,6 +38,8 @@
         users.katja.enable = true;
       };
 
+      boot.kernelPackages = pkgs.linuxPackages_latest;
+
       networking.useNetworkd = false;
 
       hardware.bluetooth.settings = {
diff --git a/nixosModules.nix b/nixosModules.nix
@@ -1,71 +0,0 @@
-{
-  inputs,
-  lib,
-  utils,
-  pkgs,
-  config,
-  hostConfig,
-  ...
-}:
-
-let
-  modules = inputs.haumea.lib.load {
-    src = ./nixosModules;
-    transformer = [
-      (inputs.haumea.lib.transformers.liftDefault)
-      (
-        _:
-        lib.mapAttrs (
-          name: value:
-          (
-            if value ? option then
-              (
-                (lib.removeAttrs value [ "option" ])
-                // {
-                  nixosOptions = lib.mkOption value.option;
-                }
-              )
-            else if value ? options then
-              (
-                (lib.removeAttrs value [ "options" ])
-                // {
-                  nixosOptions = (
-                    lib.mapAttrsRecursiveCond (element: !(element ? type)) (
-                      path: value: lib.mkOption value
-                    ) value.options
-                  );
-                }
-              )
-            else
-              (value)
-          )
-        )
-      )
-      (inputs.haumea.lib.transformers.hoistAttrs "nixosOptions" "options")
-    ];
-    inputs = {
-      inherit (inputs.self) homeManagerModules;
-      inherit
-        inputs
-        lib
-        utils
-        pkgs
-        config
-        hostConfig
-        ;
-    };
-  };
-
-in
-{
-
-  options = modules.options;
-
-  config = lib.mkMerge (
-    modules
-    |> lib.filterAttrs (name: value: name != "options")
-    |> lib.collect (element: element ? config)
-    |> lib.map (element: element.config)
-  );
-
-}
diff --git a/nixosModules/sapphicCfg/hardware/fprint.nix b/nixosModules/sapphicCfg/hardware/fprint.nix
@@ -1,54 +0,0 @@
-{
-  povSelf,
-  hostConfig,
-  config,
-  lib,
-  pkgs,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-  cfgRoot = lib.getAttrFromPath (lib.remove [ "hardware" "fpint" ] povSelf) config;
-
-in
-{
-
-  options = {
-    enable = {
-      type = types.bool;
-      default = false;
-    };
-    enableGoodixDriver = {
-      type = types.bool;
-      default = false;
-    };
-  };
-
-  config = lib.mkIf cfg.enable (lib.mkMerge [
-    {
-      services.fprintd.enable = true;
-    }
-    (
-      lib.mkIf cfg.enableGoodixDriver {
-        assertions = [
-          {
-            assertion = cfg.enableGoodixDriver -> cfgRoot.modules.unfree.enable;
-            message = ''
-              The hardware.fprint.enableGoodixDriver option uses unfree software.
-              To use it you need to set modules.unfree.enable to true.
-            '';
-          }
-        ];
-
-        sapphicCfg.modules.unfree.list = [ "libfprint-2-tod1-goodix" ];
-
-        services.fprintd.tod = {
-          enable = lib.mkDefault true;
-          driver = lib.mkDefault pkgs.libfprint-2-tod1-goodix;
-        };
-      }
-    )
-  ]);
-
-}
diff --git a/nixosModules/sapphicCfg/hardware/video/nvidia.nix b/nixosModules/sapphicCfg/hardware/video/nvidia.nix
@@ -1,144 +0,0 @@
-{
-  pov,
-  config,
-  lib,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath pov config;
-  cfgRoot = lib.getAttrFromPath (lib.remove [ "hardware" "video" ] pov) config;
-
-in
-{
-
-  options = {
-    enable = {
-      type = types.bool;
-      default = false;
-      description = ''
-        Enable NVIDIA hardware support
-      '';
-    };
-    open = {
-      type = types.bool;
-      default = false;
-    };
-    powerManagement = {
-      type = types.enum [
-        "on"
-        "off"
-        "finegrained"
-      ];
-      default = "on";
-      description = ''
-        on/off: Whether to enable experimental power management through systemd. For more information, see the NVIDIA docs,
-        on Chapter 21. Configuring Power Management Support.
-
-        finegrained: Whether to enable experimental power management of PRIME offload. For more information, see the NVIDIA docs,
-        on Chapter 22. PCI-Express Runtime D3 (RTD3) Power Management.
-      '';
-    };
-    integrated = {
-      enable = {
-        type = types.bool;
-        default = false;
-        description = ''
-          Enable support for integrated hardware
-        '';
-      };
-      integratedBus = {
-        type = types.str;
-        default = if config.hardware.cpu.vendor == "intel" then "PCI:0:2:0" else null;
-        description = ''
-          Bus ID of the integrated GPU. You can find it using lspci, either under 3D or VGA
-        '';
-      };
-      dedicatedBus = {
-        type = types.str;
-        default = "PCI:1:0:0";
-        description = ''
-          Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
-        '';
-      };
-    };
-  };
-
-  config = lib.mkIf (cfg.enable && cfg.nvidia.enable) (
-    lib.mkMerge [
-      {
-        assertions = [
-          {
-            assertion = !cfg.nvidia.open -> cfgRoot.modules.unfree.enable;
-            message = ''
-              The programs.nvidia module uses unfree software if open is set to false.
-              To use it you need to
-                - set modules.unfree.enable to true
-                OR
-                - set.modules.video.nvidia.open to true
-            '';
-          }
-        ];
-
-        boot = {
-          initrd.availableKernelModules = [
-            "nvidia"
-            "nvidia_modeset"
-            "nvidia_drm"
-            "nvidia_uvm"
-          ];
-          kernelParams = [ "nvidia.NVreg_UsePageAttributeTable=1" ];
-        };
-
-        environment.sessionVariables = {
-          _JAVA_AWT_WM_NONREPARENTING = "1";
-          GBM_BACKEND = "nvidia-drm";
-          NIXOS_OZONE_WL = "1";
-          SDL_VIDEODRIVER = "wayland"; # Can break some native games
-          WLR_NO_HARDWARE_CURSORS = "1";
-        };
-
-        services.xserver.videoDrivers = [
-          "fbdev"
-          "modesetting"
-          "nvidia"
-        ];
-
-        hardware = {
-          # NVIDIA
-          nvidia = {
-            inherit (cfg.nvidia) open;
-
-            nvidiaSettings = false;
-
-            # Kernel modesetting
-            modesetting.enable = true;
-
-            package = config.boot.kernelPackages.nvidiaPackages.latest;
-
-            # PowerManagement
-            powerManagement.enable = cfg.powerManagement == "on" || cfg.powerManagement == "finegrained";
-
-            powerManagement.finegrained = cfg.nvidia.powerManagement == "finegrained";
-
-            # Integrated GPU
-            prime =
-              if cfg.nvidia.integrated.enable then
-                {
-                  offload.enable = true;
-                  "${config.hardware.cpu.vendor}BusId" = cfg.nvidia.integrated.integratedBus;
-                  nvidiaBusId = cfg.nvidia.integrated.dedicatedBus;
-                }
-              else
-                { };
-          };
-        };
-      }
-
-      (lib.mkIf (!cfg.nvidia.open) {
-        sapphicCfg.modules.unfree.list = [ "nvidia-x11" ];
-      })
-    ]
-  );
-
-}
diff --git a/nixosModules/sapphicCfg/modules/gnomeMinimal.nix b/nixosModules/sapphicCfg/modules/gnomeMinimal.nix
@@ -1,436 +0,0 @@
-{
-  povSelf,
-  config,
-  lib,
-  pkgs,
-  utils,
-  ...
-}:
-
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-
-  settingsFormat = pkgs.formats.ini { };
-
-in
-{
-
-  options = {
-    enable = {
-      type = types.bool;
-      default = false;
-    };
-    gdm = {
-      dconfSettings = {
-        type = lib.types.attrs;
-        default = { };
-      };
-      settings = {
-        type = settingsFormat.type;
-        default = { };
-      };
-    };
-  };
-
-  config = lib.mkIf cfg.enable (
-    let
-      configFile = settingsFormat.generate "custom.conf" cfg.gdm.settings;
-
-      nixos-background-info = pkgs.writeTextFile rec {
-        name = "nixos-background-info";
-        destination = "/share/gnome-background-properties/nixos.xml";
-        text = ''
-          <?xml version="1.0"?>
-          <!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
-          <wallpapers>
-            <wallpaper deleted="false">
-              <name>Blobs</name>
-              <filename>${pkgs.nixos-artwork.wallpapers.simple-blue.gnomeFilePath}</filename>
-              <filename-dark>${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}</filename-dark>
-              <options>zoom</options>
-              <shade_type>solid</shade_type>
-              <pcolor>#3a4ba0</pcolor>
-              <scolor>#2f302f</scolor>
-            </wallpaper>
-          </wallpapers>
-        '';
-      };
-
-    in
-    {
-
-      # patched to remove xorg and xwayland completely
-      nixpkgs.overlays = [
-        (final: prev: {
-          # deactivate some backends
-          gnome-online-accounts = prev.gnome-online-accounts.overrideAttrs (prevAttrs: {
-            mesonFlags = prevAttrs.mesonFlags ++ [
-              "-Dexchange=false"
-              "-Dgoogle=false"
-              "-Dkerberos=false"
-              "-Downcloud=false"
-              "-Dwindows_live=false"
-              "-Dms_graph=false"
-            ];
-          });
-
-          mutter = prev.mutter.overrideAttrs (prevAttrs: {
-            mesonFlags = [
-              "-Dinstalled_tests=false"
-              "-Dtests=disabled"
-              "-Ddocs=true"
-              "-Dx11=false"
-              "-Dxwayland=false"
-              "-Degl_device=true"
-              "-Dwayland_eglstream=true"
-              "-Dwayland=true"
-              "-Dprofiler=true"
-              "-Dsm=false"
-            ];
-            buildInputs =
-              (utils.removePackagesByName prevAttrs.buildInputs [
-                prev.xorg.libSM
-                prev.xwayland
-                prev.gtk4
-                prev.xorg.libICE
-                prev.xorg.libX11
-                prev.xorg.libXcomposite
-                prev.xorg.libXcursor
-                prev.xorg.libXdamage
-                prev.xorg.libXext
-                prev.xorg.libXfixes
-                prev.xorg.libXi
-                prev.xorg.libXtst
-                prev.xorg.libxkbfile
-                prev.xkeyboard_config
-                prev.xorg.libxcb
-                prev.xorg.libXrandr
-                prev.xorg.libXinerama
-                prev.xorg.libXau
-              ])
-              ++ [ prev.libGL ];
-            nativeBuildInputs = utils.removePackagesByName prevAttrs.nativeBuildInputs [
-              prev.xorg.xorgserver
-            ];
-          });
-
-          gdm = prev.gdm.overrideAttrs (prevAttrs: {
-            mesonFlags = prev.lib.lists.remove "--Dgdm-xsession=true" (
-              prevAttrs.mesonFlags
-              ++ [
-                "-Dgdm-xsession=false"
-                "-Dx11-support=false"
-              ]
-            );
-            patches = [
-              # GDM fails to find g-s with the following error in the journal.
-              # gdm-x-session[976]: dbus-run-session: failed to exec 'gnome-session': No such file or directory
-              # https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/92
-              (prev.fetchpatch {
-                url = "https://gitlab.gnome.org/GNOME/gdm/-/commit/ccecd9c975d04da80db4cd547b67a1a94fa83292.patch";
-                hash = "sha256-5hKS9wjjhuSAYwXct5vS0dPbmPRIINJoLC0Zm1naz6Q=";
-                revert = true;
-              })
-
-              ../../../patches/gdm-fix-wayland.patch
-
-              # Change hardcoded paths to nix store paths.
-              (prev.substituteAll {
-                src = ../../../patches/gdm-fix-paths.patch;
-                coreutils = final.coreutils;
-                plymouth = final.plymouth;
-                dbus = final.dbus;
-              })
-            ];
-            postPatch = ''
-              # Reverts https://gitlab.gnome.org/GNOME/gdm/-/commit/b0f802e36ff948a415bfd2bccaa268b6990515b7
-              # The gdm-auth-config tool is probably not too useful for NixOS, but we still want the dconf profile
-              # installed (mostly just because .passthru.tests can make use of it).
-              substituteInPlace meson.build \
-                --replace-fail "dconf_prefix = dconf_dep.get_variable(pkgconfig: 'prefix')" "dconf_prefix = gdm_prefix"
-            '';
-            buildInputs = utils.removePackagesByName prevAttrs.buildInputs [
-              prev.xorg.libX11
-              prev.xorg.libXdmcp
-              prev.xorg.libxcb
-            ];
-          });
-
-          gnome-session = prev.gnome-session.overrideAttrs (prevAttrs: {
-            mesonFlags = [ "-Dx11=false" ];
-            buildInputs = utils.removePackagesByName prevAttrs.buildInputs [
-              prev.xorg.libICE
-              prev.xorg.xtrans
-            ];
-          });
-
-        })
-      ];
-
-      users.groups.gdm.gid = config.ids.gids.gdm;
-      users.users.gdm = {
-        name = "gdm";
-        uid = config.ids.uids.gdm;
-        group = "gdm";
-        home = "/run/gdm";
-        description = "GDM user";
-      };
-
-      security.polkit.enable = true;
-      networking.networkmanager.enable = lib.mkDefault true;
-
-      hardware = {
-        graphics.enable = true;
-        bluetooth.enable = lib.mkDefault true;
-      };
-
-      fonts.packages = with pkgs; [
-        cantarell-fonts
-        dejavu_fonts
-        source-code-pro
-        source-sans
-      ];
-
-      environment = {
-        etc."gdm/custom.conf".source = configFile;
-
-        systemPackages = with pkgs; [
-          (lib.mkIf config.hardware.bluetooth.enable gnome-bluetooth)
-          (lib.mkIf config.services.colord.enable gnome-color-manager)
-          gnome-shell
-          gnome-control-center
-          ghostty
-          adwaita-icon-theme
-          sound-theme-freedesktop
-          nixos-icons
-          nixos-background-info
-          glib # for gsettings program
-          gnome-menus
-          gtk3.out # for gtk-launch program
-          xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
-          xdg-user-dirs-gtk
-        ];
-
-        # Needed for themes and backgrounds
-        pathsToLink = [
-          "/share" # TODO: https://github.com/NixOS/nixpkgs/issues/47173
-          "/share/nautilus-python/extensions"
-        ];
-      };
-
-      services = {
-        gnome.gnome-settings-daemon.enable = true;
-        gnome.glib-networking.enable = true;
-        udisks2.enable = true;
-        libinput.enable = true;
-        accounts-daemon.enable = true;
-        gnome.at-spi2-core.enable = lib.mkDefault true;
-        gnome.gnome-keyring.enable = lib.mkDefault true;
-        pipewire.enable = lib.mkDefault true;
-        hardware.bolt.enable = lib.mkDefault true;
-        colord.enable = lib.mkDefault true;
-        power-profiles-daemon.enable = lib.mkDefault true;
-        upower.enable = lib.mkDefault config.powerManagement.enable;
-        system-config-printer.enable = lib.mkDefault config.services.printing.enable;
-
-        gvfs.enable = true;
-        gvfs.package =
-          (pkgs.gvfs.overrideAttrs (old: {
-            mesonFlags = (old.mesonFlags or [ ]) ++ [
-              "-Dafp=false"
-              "-Dafc=false"
-              "-Dmtp=false"
-              "-Dgphoto2=false"
-            ];
-          })).override
-            {
-              samba = null;
-            };
-
-        udev.packages = [ pkgs.mutter ];
-        dbus.packages = [ pkgs.gdm ];
-
-        geoclue2.enable = lib.mkDefault true;
-        geoclue2.enableDemoAgent = false; # GNOME has its own geoclue agent
-        geoclue2.appConfig =
-          lib.genAttrs [ "gnome-datetime-panel" "gnome-color-panel" "org.gnome.Shell" ]
-            (name: {
-              isAllowed = true;
-              isSystem = true;
-            });
-      };
-
-      programs = {
-        dconf.enable = true;
-        dconf.profiles.gdm.databases = [
-          { settings = cfg.gdm.dconfSettings; }
-          "${pkgs.gdm}/share/gdm/greeter-dconf-defaults"
-        ];
-      };
-
-      xdg = {
-        mime.enable = true;
-        icons.enable = true;
-
-        portal.enable = true;
-        portal.configPackages = lib.mkDefault [ pkgs.gnome-session ];
-        portal.extraPortals = with pkgs; [
-          xdg-desktop-portal-gnome
-          xdg-desktop-portal-gtk
-        ];
-      };
-
-      systemd = {
-        user.services.dbus.wantedBy = [ "default.target" ];
-
-        tmpfiles.rules = [ "d /run/gdm/.config 0711 gdm gdm" ];
-
-        packages = with pkgs; [
-          gdm
-          gnome-session
-          gnome-shell
-        ];
-
-        # We dont use the upstream gdm service
-        # it has to be disabled since the gdm package has it
-        # https://github.com/NixOS/nixpkgs/issues/108672
-        services.gdm.enable = false;
-
-        services.display-manager = {
-          description = "Display Manager";
-
-          wants = [
-            "systemd-machined.service"
-            "accounts-daemon.service"
-          ];
-          conflicts = [
-            "getty@${pkgs.gdm.initialVT}.service"
-            "plymouth-quit.service"
-          ];
-          onFailure = [ "plymouth-quit.service" ];
-          wantedBy = [ "multi-user.target" ];
-          after = [
-            "systemd-logind.service"
-            "systemd-user-sessions.service"
-            "systemd-machined.service"
-            "getty@${pkgs.gdm.initialVT}.service"
-            "acpid.service"
-            "plymouth-quit.service"
-            "plymouth-start.service"
-          ];
-
-          path = [ pkgs.gnome-session ];
-          environment = {
-            XDG_DATA_DIRS = lib.makeSearchPath "share" (
-              with pkgs;
-              [
-                gdm
-                gnome-session.sessions
-                gnome-control-center # for accessibility icon
-                adwaita-icon-theme
-                hicolor-icon-theme
-              ]
-            );
-          };
-
-          serviceConfig = {
-            KillMode = "mixed";
-            IgnoreSIGPIPE = "no";
-            BusName = "org.gnome.DisplayManager";
-            StandardError = "inherit";
-            ExecStart = "${pkgs.gdm}/bin/gdm";
-            ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
-            KeyringMode = "shared";
-            EnvironmentFile = "-/etc/locale.conf";
-            Restart = "always";
-            RestartSec = "200ms";
-            SyslogIdentifier = "display-manager";
-          };
-
-          restartIfChanged = false;
-
-          # Stop restarting if the display manager stops (crashes) 2 times in one minute.
-          startLimitIntervalSec = 30;
-          startLimitBurst = 3;
-        };
-
-        # Prevent nixos-rebuild switch from bringing down the graphical
-        # session. (If multi-user.target wants plymouth-quit.service which
-        # conflicts display-manager.service, then when nixos-rebuild
-        # switch starts multi-user.target, display-manager.service is
-        # stopped so plymouth-quit.service can be started.)
-        services.plymouth-quit = lib.mkIf config.boot.plymouth.enable {
-          wantedBy = lib.mkForce [ ];
-        };
-      };
-
-      # GDM LFS PAM modules, adapted somehow to NixOS
-      security.pam.services = {
-        gdm-launch-environment.text = ''
-          auth     required       pam_succeed_if.so audit quiet_success user = gdm
-          auth     optional       pam_permit.so
-
-          account  required       pam_succeed_if.so audit quiet_success user = gdm
-          account  sufficient     pam_unix.so
-
-          password required       pam_deny.so
-
-          session  required       pam_succeed_if.so audit quiet_success user = gdm
-          session  required       pam_env.so conffile=/etc/pam/environment readenv=0
-          session  optional       ${config.systemd.package}/lib/security/pam_systemd.so
-          session  optional       pam_keyinit.so force revoke
-          session  optional       pam_permit.so
-        '';
-
-        gdm-password.text = ''
-          auth      substack      login
-          account   include       login
-          password  substack      login
-          session   include       login
-        '';
-
-        gdm-autologin.text = ''
-          auth      requisite     pam_nologin.so
-          auth      required      pam_succeed_if.so uid >= 1000 quiet
-          ${lib.optionalString config.security.pam.services.login.enableGnomeKeyring ''
-            auth       [success=ok default=1]      ${pkgs.gdm}/lib/security/pam_gdm.so
-            auth       optional                    ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so
-          ''}
-          auth      required      pam_permit.so
-
-          account   sufficient    pam_unix.so
-
-          password  requisite     pam_unix.so nullok yescrypt
-
-          session   optional      pam_keyinit.so revoke
-          session   include       login
-        '';
-
-        # This would block password prompt when included by gdm-password.
-        # GDM will instead run gdm-fingerprint in parallel.
-        login.fprintAuth = lib.mkIf config.services.fprintd.enable false;
-
-        gdm-fingerprint.text = lib.mkIf config.services.fprintd.enable ''
-          auth       required                    pam_shells.so
-          auth       requisite                   pam_nologin.so
-          auth       requisite                   pam_faillock.so      preauth
-          auth       required                    ${pkgs.fprintd}/lib/security/pam_fprintd.so
-          auth       required                    pam_env.so
-          ${lib.optionalString config.security.pam.services.login.enableGnomeKeyring ''
-            auth       [success=ok default=1]      ${pkgs.gdm}/lib/security/pam_gdm.so
-            auth       optional                    ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so
-          ''}
-
-          account    include                     login
-
-          password   required                    pam_deny.so
-
-          session    include                     login
-        '';
-      };
-
-    }
-  );
-
-}
diff --git a/nixosModules/sapphicCfg/modules/plymouth.nix b/nixosModules/sapphicCfg/modules/plymouth.nix
@@ -1,40 +0,0 @@
-{
-  povSelf,
-  lib,
-  config,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-
-in
-{
-
-  options = {
-    enable = {
-      type = types.bool;
-      default = false;
-    };
-    theme = {
-      type = types.str;
-      default = "bgrt";
-    };
-  };
-
-  config = lib.mkIf cfg.enable {
-    boot = {
-      consoleLogLevel = 3;
-      initrd.verbose = false;
-      kernelParams = [
-        "quiet"
-        "udev.log_level=3"
-      ];
-      plymouth = {
-        enable = true;
-        inherit (cfg) theme;
-      };
-    };
-  };
-
-}
diff --git a/nixosModules/sapphicCfg/modules/security/kernel.nix b/nixosModules/sapphicCfg/modules/security/kernel.nix
@@ -1,85 +0,0 @@
-{
-  pov,
-  hostConfig,
-  config,
-  lib,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath pov config;
-
-in
-{
-
-  option = {
-    type = types.bool;
-    default = false;
-  };
-
-  config = lib.mkIf (cfg.enable && cfg.kernel) {
-    environment = {
-      # memoryAllocator.provider = mkDefault "scudo"; # Breaks stuff
-      # variables.SCUDO_OPTIONS = mkDefault "ZeroContents=1"; # Breaks stuff
-    };
-
-    boot = {
-      blacklistedKernelModules = [
-        # Obscure network protocols
-        "ax25"
-        "netrom"
-        "rose"
-
-        # Old or rare or insufficiently audited filesystems
-        "adfs"
-        "affs"
-        "bfs"
-        "befs"
-        "cramfs"
-        "efs"
-        "erofs"
-        "exofs"
-        "freevxfs"
-        "f2fs"
-        "hfs"
-        "hpfs"
-        "jfs"
-        "minix"
-        "nilfs2"
-        "ntfs"
-        "omfs"
-        "qnx4"
-        "qnx6"
-        "sysv"
-        "ufs"
-      ];
-      kernel.sysctl = {
-        "kernel.yama.ptrace_scope" = lib.mkOverride 500 1;
-        "kernel.kptr_restrict" = lib.mkOverride 500 2;
-        "net.core.bpf_jit_enable" = lib.mkDefault false;
-        "kernel.ftrace_enabled" = lib.mkDefault false;
-      };
-      kernelParams = lib.mkMerge [
-        [
-          # Slab/slub sanity checks, redzoning, and poisoning
-          "slub_debug=FZP"
-
-          # Overwrite free'd memory
-          "page_poison=1"
-
-          # Enable page allocator randomization
-          "page_alloc.shuffle=1"
-        ]
-        # Disable hibernation (allows replacing the running kernel) unless requested
-        (lib.mkIf (!hostConfig.hardware.allowHibernation) [ "nohibernate" ])
-      ];
-    };
-
-    # Disable kernel module loading once the system is fully initialised.
-    # FIXME: Remove reverse dependencies
-    security.lockKernelModules = lib.mkDefault (!config.sapphicCfg.presets.graphical.enable);
-    # Prevent replacing the running kernel image w/o reboot
-    boot.kernel.sysctl."kernel.kexec_load_disabled" = lib.mkDefault true;
-  };
-
-}
diff --git a/nixosModules/sapphicCfg/modules/sops.nix b/nixosModules/sapphicCfg/modules/sops.nix
@@ -1,28 +0,0 @@
-{
-  povSelf,
-  config,
-  lib,
-  pkgs,
-  ...
-}:
-
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-
-in
-{
-
-  options.enable = {
-    type = types.bool;
-    default = false;
-  };
-
-  config = lib.mkIf cfg.enable {
-    sops = {
-      defaultSopsFile = ../../../secrets/${config.networking.hostName}.yaml;
-      age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
-    };
-  };
-
-}
diff --git a/nixosModules/sapphicCfg/presets/base.nix b/nixosModules/sapphicCfg/presets/base.nix
@@ -1,101 +0,0 @@
-{
-  povSelf,
-  pkgs,
-  lib,
-  config,
-  hostConfig,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-
-in
-{
-
-  options = {
-    enable = {
-      type = types.bool;
-      default = false;
-    };
-  };
-
-  config = lib.mkIf cfg.enable {
-    environment.defaultPackages = lib.mkForce [];
-
-    users.mutableUsers = lib.mkForce false;
-
-    programs.command-not-found.enable = false;
-
-    # Remove perl from activation
-    system.etc.overlay.enable = lib.mkDefault true;
-    services.userborn.enable = lib.mkDefault true;
-
-    networking = {
-      hostId = builtins.substring 0 8 (builtins.hashString "sha256" hostConfig.hostName);
-      hostName = hostConfig.hostName;
-      domain = lib.mkDefault hostConfig.domain;
-
-      useNetworkd = lib.mkDefault true;
-      useDHCP = lib.mkDefault false;
-
-      nftables.enable = lib.mkDefault true;
-      firewall.enable = lib.mkDefault true;
-    };
-
-    hardware.enableRedistributableFirmware = true;
-
-    sapphicCfg = {
-      modules = {
-        boot.enable = lib.mkDefault true;
-        boot.type = lib.mkDefault "uefi";
-
-        locale.enable = lib.mkDefault true;
-        unfree.enable = lib.mkDefault true;
-        nix.enable = lib.mkDefault true;
-        homeManager.enable = lib.mkDefault true;
-        sops.enable = lib.mkDefault true;
-
-        security = {
-          enable = lib.mkDefault true;
-          kernel = lib.mkDefault true;
-          networking = lib.mkDefault true;
-        };
-      };
-
-      programs = {
-        shellUtilities.enable = lib.mkDefault true;
-        systemUtilities.enable = lib.mkDefault true;
-        networkUtilities.enable = lib.mkDefault true;
-
-        fish.enable = lib.mkDefault true;
-        git.enable = lib.mkDefault true;
-      };
-    };
-
-    services = {
-      fstrim.enable = lib.mkDefault true;
-    };
-
-    # thanks piegames (https://git.darmstadt.ccc.de/piegames/home-config/-/blob/master/modules/generic.nix#L84)
-    system.activationScripts = {
-      diff = {
-        supportsDryActivation = true;
-        text = ''
-          ${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff "$(readlink /run/current-system)" "$systemConfig"
-          # Ignore "failures" because these tools have weird exit codes
-          ${pkgs.colordiff}/bin/colordiff --nobanner --fakeexitcode --color=always -ur -I '\/nix\/store' \
-            -- "$(readlink /run/current-system)/activate" "$systemConfig/activate" | ${pkgs.gnugrep}/bin/grep -v "^Binary files" || true
-          ${pkgs.colordiff}/bin/colordiff --nobanner --fakeexitcode --color=always -ur -I '\/nix\/store' \
-            -x "os-release" -x "issue" \
-            -- "$(readlink /run/current-system)/etc" "$systemConfig/etc" | ${pkgs.gnugrep}/bin/grep -v "^Binary files" || true
-          ${pkgs.colordiff}/bin/colordiff --nobanner --fakeexitcode --color=always -ur -I '\/nix\/store' \
-            -x "environment.d" \
-            -x "hwdb.d" \
-            -- "$(readlink /run/current-system)/systemd" "$systemConfig/systemd" | ${pkgs.gnugrep}/bin/grep -v "^Binary files" || true
-        '';
-      };
-    };
-  };
-
-}
diff --git a/nixosModules/sapphicCfg/presets/graphical/enable.nix b/nixosModules/sapphicCfg/presets/graphical/enable.nix
@@ -1,29 +0,0 @@
-{
-  povSelf,
-  config,
-  lib,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-
-in
-{
-
-  option = {
-    type = types.bool;
-    default = false;
-  };
-
-  config = lib.mkIf cfg {
-    sapphicCfg.modules = {
-      boot.secureboot = lib.mkDefault true;
-      plymouth.enable = true;
-
-      font.enable = true;
-      audio.enable = true;
-    };
-  };
-
-}
diff --git a/nixosModules/sapphicCfg/presets/graphical/typeGnomeMinimal.nix b/nixosModules/sapphicCfg/presets/graphical/typeGnomeMinimal.nix
@@ -1,31 +0,0 @@
-{
-  pov,
-  config,
-  lib,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath pov config;
-
-in
-{
-
-  config = lib.mkIf (cfg.enable && (cfg.type == "gnomeMinimal")) {
-    nixpkgs.overlays = [
-      (final: prev: {
-        # patch gdm to automaticly select the first user
-        gnome-shell = prev.gnome-shell.overrideAttrs (prevAttrs: {
-          patches = prevAttrs.patches ++ [ ../../../../patches/gdm-autoselect-user.patch ];
-        });
-      })
-    ];
-
-    sapphicCfg.modules = {
-      gnomeMinimal.enable = true;
-    };
-
-    networking.networkmanager.enable = true;
-  };
-
-}
diff --git a/nixosModules/sapphicCfg/presets/katja/enable.nix b/nixosModules/sapphicCfg/presets/katja/enable.nix
@@ -1,36 +0,0 @@
-{
-  povSelf,
-  pkgs,
-  lib,
-  config,
-  hostConfig,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-
-in
-{
-
-  option = {
-    type = types.bool;
-    default = false;
-  };
-
-  config = lib.mkIf cfg {
-    users.users.root.openssh.authorizedKeys.keys = [
-      (builtins.readFile "${pkgs.ctucx-website}/ssh_pubkey.asc")
-    ];
-
-    sapphicCfg = {
-      presets.katja = {
-        syncthing.enable = lib.mkDefault true;
-      };
-
-      services.keyd.enable = lib.mkDefault true;
-      hardware.smartcard.enable = lib.mkDefault config.sapphicCfg.presets.graphical.enable;
-    };
-  };
-
-}
diff --git a/nixosModules/sapphicCfg/users/katja.nix b/nixosModules/sapphicCfg/users/katja.nix
@@ -1,95 +0,0 @@
-{
-  povSelf,
-  config,
-  lib,
-  pkgs,
-  homeManagerModules,
-  ...
-}:
-let
-  inherit (lib) types;
-  cfg = lib.getAttrFromPath povSelf config;
-
-in
-{
-
-  options.enable = {
-    type = types.bool;
-    default = false;
-  };
-
-  config = lib.mkIf cfg.enable {
-    sops.secrets.katjaPassword = {
-      neededForUsers = true;
-      sopsFile = ../../../secrets/common.yaml;
-    };
-
-    users.users.katja = {
-      uid = 1001;
-      description = "Katja";
-      hashedPasswordFile = config.sops.secrets.katjaPassword.path;
-      isNormalUser = true;
-      extraGroups = [
-        "wheel"
-      ];
-      openssh.authorizedKeys.keys = [
-        (builtins.readFile "${pkgs.ctucx-website}/ssh_pubkey.asc")
-      ];
-    };
-
-    home-manager.users.katja.imports = lib.concatLists [
-      [
-        homeManagerModules.katja.common
-      ]
-      (lib.optionals config.sapphicCfg.presets.graphical.enable (
-        with homeManagerModules.katja;
-        [
-          configure.xdg
-
-          programs.ghostty
-          programs.ssh
-          programs.git
-          programs.gpg
-
-          programs.yt-dlp
-          programs.phockup
-          programs.bitwarden-cli
-
-          programs.nautilus
-
-          programs.firefox
-          programs.thunderbird
-
-          programs.fractal
-          programs.tuba
-
-          programs.typst
-          programs.ocrmypdf
-          programs.papers
-          programs.pdfarranger
-          programs.libreoffice
-          programs.apostrophe
-
-          programs.celluloid
-
-          programs.javascript
-        ]
-      ))
-      (lib.optionals (config.sapphicCfg.presets.graphical.type == "gnomeMinimal") (
-        with homeManagerModules.katja;
-        [
-          configure.gnome
-
-          gnomeExtensions.dash-to-dock
-          gnomeExtensions.just-perfection
-          gnomeExtensions.space-bar
-          gnomeExtensions.search-light
-          gnomeExtensions.emoji-copy
-          gnomeExtensions.pip-on-top
-          gnomeExtensions.bluetoothBatteryMeter
-        ]
-      ))
-    ];
-  };
-
-}
diff --git a/patches/gdm-autoselect-user.patch b/resources/patches/gdm-autoselect-user.patch
diff --git a/patches/gdm-fix-paths.patch b/resources/patches/gdm-fix-paths.patch
diff --git a/patches/gdm-fix-wayland.patch b/resources/patches/gdm-fix-wayland.patch