ctucx.git: nixfiles

ctucx' nixfiles

commit b86073965b1963b4881a4a8c9060ede59885e949
parent 4911c7e8fac2e0af3b58f9849fdd7056fcc836b5
Author: Katja (ctucx) <git@ctu.cx>
Date: Fri, 7 Mar 2025 12:49:12 +0100

improve code-formating
56 files changed, 394 insertions(+), 546 deletions(-)
M
configurations/common/programs/deploymentUtilities.nix
|
1
-
M
configurations/common/programs/git.nix
|
2
+-
M
configurations/common/programs/gpg.nix
|
4
++--
M
configurations/common/programs/htop.nix
|
31
+++++++++----------------------
M
configurations/common/programs/micro.nix
|
11
++++-------
M
configurations/common/programs/nix-cleanup.nix
|
26
++++++++++++++------------
M
configurations/common/programs/password-store.nix
|
2
--
M
configurations/common/programs/phockup.nix
|
4
+---
M
configurations/darwin/configure/homebrew.nix
|
14
++++++--------
M
configurations/darwin/configure/macAppStore.nix
|
6
++----
M
configurations/darwin/programs/Bitwarden.nix
|
4
+++-
M
configurations/darwin/programs/iina.nix
|
6
+++---
M
configurations/darwin/services/locationchanger.nix
|
1
+
M
configurations/darwin/services/skhd.nix
|
4
+++-
M
configurations/nixos/configure/avahi.nix
|
2
+-
M
configurations/nixos/configure/bluetooth.nix
|
83
++++++++++++++++++++++++++++++++-----------------------------------------------
M
configurations/nixos/configure/easyeffects.nix
|
27
+++++++++------------------
M
configurations/nixos/configure/fonts.nix
|
42
++++++++++++++++--------------------------
M
configurations/nixos/configure/gvfs.nix
|
9
++++-----
M
configurations/nixos/configure/mako.nix
|
18
+++++++-----------
M
configurations/nixos/configure/pipewire.nix
|
20
++++++++++----------
M
configurations/nixos/configure/router/default.nix
|
4
++--
M
configurations/nixos/configure/router/ppp.nix
|
46
++++++++++++++++++++++------------------------
M
configurations/nixos/configure/router/systemd-networkd.nix
|
9
++++-----
M
configurations/nixos/configure/smarthome/mqtt-webui/default.nix
|
12
+++++-------
M
configurations/nixos/configure/swaylock.nix
|
22
+++++++++-------------
M
configurations/nixos/configure/thunderbolt.nix
|
2
+-
M
configurations/nixos/configure/usbmuxd.nix
|
19
++++++-------------
M
configurations/nixos/configure/waybar.nix
|
2
+-
M
configurations/nixos/configure/wlsunset.nix
|
18
++++++++++--------
M
configurations/nixos/configure/xdg.nix
|
41
++++++++++++++++-------------------------
M
configurations/nixos/programs/ausweisapp.nix
|
4
+---
M
configurations/nixos/programs/ddcutil.nix
|
11
+++++------
M
configurations/nixos/programs/firefox.nix
|
17
++++++-----------
M
configurations/nixos/programs/imv.nix
|
6
++----
M
configurations/nixos/programs/libreoffice.nix
|
38
+++++++++++---------------------------
M
configurations/nixos/programs/mpv.nix
|
16
++++------------
M
configurations/nixos/programs/sway.nix
|
4
++--
M
configurations/nixos/programs/thunar.nix
|
30
+++++++++++++-----------------
M
configurations/nixos/programs/thunderbird.nix
|
30
++++++++++++------------------
M
configurations/nixos/services/dns-server.nix
|
3
+--
M
configurations/nixos/services/matrix-synapse.nix
|
13
+++++++------
M
configurations/nixos/services/mautrix-whatsapp.nix
|
2
+-
M
configurations/nixos/services/syncthing-nginx.nix
|
6
+++---
M
configurations/nixos/websites/dav.ctu.cx.nix
|
20
+++++++++-----------
M
configurations/nixos/websites/dendrite.ctucx.de.nix
|
4
++--
M
configurations/nixos/websites/grafana.ctu.cx/default.nix
|
111
++++++++++++++++++++++++++++++++++++++-----------------------------------------
M
configurations/nixos/websites/grocy.ctu.cx.nix
|
13
++++++-------
M
configurations/nixos/websites/storage.home.ctu.cx/default.nix
|
2
+-
M
configurations/nixos/websites/things.ctu.cx.nix
|
22
+++++++++++-----------
M
configurations/nixos/websites/vault.ctu.cx.nix
|
12
+++++++-----
M
configurations/nixos/wm/gnome.nix
|
26
+++++++-------------------
M
configurations/nixos/wm/sway.nix
|
4
+---
M
flake.nix
|
24
+++++++++++++-----------
M
machines/briefkasten/default.nix
|
11
++++-------
M
machines/seifenkiste/default.nix
|
19
++++++-------------
diff --git a/configurations/common/programs/deploymentUtilities.nix b/configurations/common/programs/deploymentUtilities.nix
@@ -8,7 +8,6 @@
       age
 
       deploy-rs
-
     ];
   };
 
diff --git a/configurations/common/programs/git.nix b/configurations/common/programs/git.nix
@@ -3,7 +3,7 @@
 {
 
   home-manager.users.katja = {
-    home.packages = [ pkgs.gitui ];
+    home.packages     = [ pkgs.gitui ];
     home.shellAliases = {
         reinitgit = "rm -rf .git && git init && git add -A && git commit -m 'init'";
     };
diff --git a/configurations/common/programs/gpg.nix b/configurations/common/programs/gpg.nix
@@ -24,7 +24,7 @@
       packages = lib.mkIf pkgs.stdenv.isLinux [ pkgs.pcsctools ];
 
       sessionVariables = {
-        GNUPGHOME     = lib.mkForce "$HOME/.gnupg";
+        GNUPGHOME = lib.mkForce "$HOME/.gnupg";
       };
 
       shellAliases = {

@@ -40,7 +40,7 @@
     };
 
     wayland.windowManager.sway.extraConfig = ''
-        exec_always 'gpgconf --kill gpg-agent'
+      exec_always 'gpgconf --kill gpg-agent'
     '';
 
     programs = {
diff --git a/configurations/common/programs/htop.nix b/configurations/common/programs/htop.nix
@@ -4,7 +4,8 @@
 
   home-manager.users.katja = {
     programs.htop = {
-      enable   = true;
+      enable  = true;
+
       package = (
         if pkgs.stdenv.isDarwin then
           pkgs.htop

@@ -13,6 +14,7 @@
             sensorsSupport = true;
           }
       );
+
       settings = {
         hide_userland_threads = 1;
         tree_view             = 1;

@@ -21,27 +23,12 @@
       };
     };
 
-    xdg = (
-      if pkgs.stdenv.isDarwin then
-        {}
-      else
-        {
-          desktopEntries = {
-            htop = {
-              name        = "Htop";
-              genericName = "Process Viewer";
-              icon        = "htop";
-              exec        = "htop";
-              terminal    = true;
-              categories  = [ "ConsoleOnly" "System" ];
-              settings    = {
-                NoDisplay = "true";
-              };
-            };
-          };
-        }
-    );
-
+    xdg = lib.mkIf pkgs.stdenv.isLinux {
+      desktopEntries.htop = {
+        name = "Htop";
+        settings.NoDisplay = "true";
+      };
+    };
   };
 
 }
diff --git a/configurations/common/programs/micro.nix b/configurations/common/programs/micro.nix
@@ -14,6 +14,7 @@
         "*.nix".tabstospaces = true;
         "*.nix".tabmovement  = true;
         "*.nix".tabsize      = 2;
+
         "*.nim".tabstospaces = true;
         "*.nim".tabmovement  = true;
         "*.nim".tabsize      = 2;

@@ -29,13 +30,9 @@
     };
 
     xdg = lib.mkIf pkgs.stdenv.isLinux {
-      desktopEntries = {
-        micro = {
-          name        = "micro";
-          settings    = {
-            NoDisplay = "true";
-          };
-        };
+      desktopEntries.micro = {
+        name = "micro";
+        settings.NoDisplay = "true";
       };
     };
   };
diff --git a/configurations/common/programs/nix-cleanup.nix b/configurations/common/programs/nix-cleanup.nix
@@ -2,19 +2,21 @@
 
 {
 
-  home-manager.users.katja.home.packages = [ (pkgs.writeShellScriptBin "nix-cleanup" ''
-    set -eu
+  home-manager.users.katja = {
+    home.packages = [ (pkgs.writeShellScriptBin "nix-cleanup" ''
+      set -eu
 
-    # Delete everything from this profile that isn't currently needed
-    nix-env --delete-generations old
+      # Delete everything from this profile that isn't currently needed
+      nix-env --delete-generations old
+  
+      # Delete generations older than a week
+      nix-collect-garbage
+      nix-collect-garbage --delete-older-than 7d
 
-    # Delete generations older than a week
-    nix-collect-garbage
-    nix-collect-garbage --delete-older-than 7d
-
-    # Optimize
-    nix-store --gc --print-dead
-    nix-store --optimise
-  '') ];
+      # Optimize
+      nix-store --gc --print-dead
+      nix-store --optimise
+    '') ];
+  };
 
 }
diff --git a/configurations/common/programs/password-store.nix b/configurations/common/programs/password-store.nix
@@ -24,9 +24,7 @@
         enable   = true;
         browsers = [ "firefox" ];
       };
-
     };
-
   };
 
 }
diff --git a/configurations/common/programs/phockup.nix b/configurations/common/programs/phockup.nix
@@ -3,9 +3,7 @@
 {
 
   home-manager.users.katja = {
-    home.packages = with pkgs; [
-      phockup
-    ];
+    home.packages = [ pkgs.phockup ];
   };
 
 }
diff --git a/configurations/darwin/configure/homebrew.nix b/configurations/darwin/configure/homebrew.nix
@@ -1,6 +1,7 @@
 { pkgs, ... }:
 
 {
+
   imports = [
     ./appIcons.nix
   ];

@@ -14,11 +15,9 @@
       cleanup    = "zap";
     };
 
-    taps = [
-      "homebrew/services"
-    ];
+    taps = [ "homebrew/services" ];
 
-    brews   = [
+    brews = [
       "blueutil"
       {
         name            = "sleepwatcher";

@@ -26,15 +25,14 @@
       }
     ];
 
-    caskArgs = {
-      no_quarantine = true;
-    };
+    caskArgs.no_quarantine = true;
 
-    casks   = [
+    casks = [
       {
         name   = "thunderbird";
         greedy = true;
       }
+
       "libreoffice"
       "whatsapp"
 
diff --git a/configurations/darwin/configure/macAppStore.nix b/configurations/darwin/configure/macAppStore.nix
@@ -3,11 +3,9 @@
 {
 
   homebrew = {
-    enable  = true;
+    enable = true;
 
-    brews   = [
-      "mas"
-    ];
+    brews = [ "mas" ];
 
     masApps = {
       Numbers        = 409203825;
diff --git a/configurations/darwin/programs/Bitwarden.nix b/configurations/darwin/programs/Bitwarden.nix
@@ -8,6 +8,8 @@
     Bitwarden = 1352778147;
   };
 
-  home-manager.users.katja.home.packages = with pkgs; [ bitwarden-cli ];
+  home-manager.users.katja = {
+    home.packages = with pkgs; [ bitwarden-cli ];
+  };
 
 }
diff --git a/configurations/darwin/programs/iina.nix b/configurations/darwin/programs/iina.nix
@@ -30,8 +30,8 @@
     };
   };
 
-  home-manager.users.katja.home.packages = with pkgs; [
-    open-in-mpv
-  ];
+  home-manager.users.katja = {
+    home.packages = [ pkgs.open-in-mpv ];
+  };
 
 }
diff --git a/configurations/darwin/services/locationchanger.nix b/configurations/darwin/services/locationchanger.nix
@@ -8,6 +8,7 @@
       RunAtLoad  = true;
       WatchPaths = [ "/Library/Preferences/SystemConfiguration" ];
     };
+
     script = ''
       # This script changes network location based on the name of Wi-Fi network.
       exec 2>&1 >> $HOME/Library/Logs/LocationChanger.log
diff --git a/configurations/darwin/services/skhd.nix b/configurations/darwin/services/skhd.nix
@@ -2,7 +2,9 @@
 
 {
 
-  home-manager.users.katja.home.packages = [ pkgs.skhd ];
+  home-manager.users.katja = {
+    home.packages = [ pkgs.skhd ];
+  };
 
   services.ctucx.skhd = {
     enable     = true;
diff --git a/configurations/nixos/configure/avahi.nix b/configurations/nixos/configure/avahi.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ ... }:
 
 {
 
diff --git a/configurations/nixos/configure/bluetooth.nix b/configurations/nixos/configure/bluetooth.nix
@@ -1,64 +1,47 @@
-{ config, pkgs, lib, ... }:
+{ pkgs, ... }:
 
-let
-  cfg = config.ctucxConfig.configure.bluetooth;
+{
 
-in {
-
-  options = {
-    ctucxConfig.configure.bluetooth = lib.mkEnableOption "bluetooth";
+  hardware.bluetooth = {
+    enable      = true;
+    powerOnBoot = false;
   };
 
-  config = lib.mkIf cfg {
-    hardware.bluetooth = {
-      enable      = true;
-      powerOnBoot = false;
-    };
-
-    services.blueman = {
-      enable = true;
-    };
+  services.blueman.enable = true;
 
-    home-manager.users.katha = {
-      home.packages = [ pkgs.blueman ];
+  home-manager.users.katha = {
+    home.packages = [ pkgs.blueman ];
 
-      xdg = {
-        desktopEntries = {
-          blueman-adapters = {
-            name        = "Bluetooth Adapters";
-            settings    = {
-              NoDisplay = "true";
-            };
-          };
-        };
+    xdg = {
+      desktopEntries.blueman-adapters = {
+        name = "Bluetooth Adapters";
+        settings.NoDisplay = "true";
       };
+    };
 
-      wayland.windowManager.sway.config.startup = [
-        { always = true; command = "systemctl --user restart blueman-applet"; }
-      ];
-
-      systemd.user.services = {
-        blueman-applet = {
-          Unit = {
-            Description = "Blueman applet";
-            Requires    = [ "waybar.service" ];
-            After       = [ "graphical-session-pre.target" "tray.target" ];
-            PartOf      = [ "graphical-session.target" ];
-          };
-
-          Service.ExecStart = "${pkgs.blueman}/bin/blueman-applet";
-          Install.WantedBy = [ "graphical-session.target" ];
+    wayland.windowManager.sway.config.startup = [
+      { always = true; command = "systemctl --user restart blueman-applet"; }
+    ];
+
+    systemd.user.services = {
+      blueman-applet = {
+        Unit = {
+          Description = "Blueman applet";
+          Requires    = [ "waybar.service" ];
+          After       = [ "graphical-session-pre.target" "tray.target" ];
+          PartOf      = [ "graphical-session.target" ];
         };
 
-        mpris-proxy = {
-          Unit = {
-            Description = "Mpris proxy";
-            After       = [ "network.target" "sound.target" ];
-          };
+        Service.ExecStart = "${pkgs.blueman}/bin/blueman-applet";
+        Install.WantedBy  = [ "graphical-session.target" ];
+      };
 
-          Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
-          Install.WantedBy = [ "default.target" ];
-        };
+      mpris-proxy = {
+        Unit.Description  = "Mpris proxy";
+        Unit.After        = [ "network.target" "sound.target" ];
+
+        Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
+        Install.WantedBy  = [ "default.target" ];
       };
     };
   };
diff --git a/configurations/nixos/configure/easyeffects.nix b/configurations/nixos/configure/easyeffects.nix
@@ -1,31 +1,22 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, ... }:
 
-let
-  cfg = config.ctucxConfig.services.easyeffects;
-
-in {
+{
 
   home-manager.users.katja = {
-    home.packages = with pkgs; [
-      easyeffects
-    ];
+    home.packages = [ pkgs.easyeffects ];
 
     systemd.user.services.easyeffects = {
-      Unit = {
-        After  = [ "graphical-session-pre.target" ];
-        PartOf = [ "graphical-session.target" ];
-      };
+      Unit.After  = [ "graphical-session-pre.target" ];
+      Unit.PartOf = [ "graphical-session.target" ];
 
       Service = {
         Environment = "PATH=/run/wrappers/bin:/home/katja/.nix-profile/bin:/etc/profiles/per-user/katja/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin";
-        ExecStart = "${pkgs.easyeffects}/bin/easyeffects --gapplication-service";
-        Restart = "always";
-        RestartSec = 5;
+        ExecStart   = "${pkgs.easyeffects}/bin/easyeffects --gapplication-service";
+        Restart     = "always";
+        RestartSec  = 5;
       };
 
-      Install = {
-        WantedBy = [ "graphical-session.target" ];
-      };
+      Install.WantedBy = [ "graphical-session.target" ];
     };
 
     wayland.windowManager.sway.config.startup = [
diff --git a/configurations/nixos/configure/fonts.nix b/configurations/nixos/configure/fonts.nix
@@ -1,31 +1,21 @@
-{ config, pkgs, lib, ... }:
+{ pkgs, ... }:
 
-let
-  cfg = config.ctucxConfig.configure.fonts;
+{
 
-in {
-
-  options = {
-    ctucxConfig.configure.fonts = lib.mkEnableOption "fonts";
-  };
-
-  config = lib.mkIf cfg {
-    fonts = {
-      fontconfig.enable      = true;
-      fontDir.enable         = true;
-      enableGhostscriptFonts = true;
-      enableDefaultPackages  = true;
-      packages  = with pkgs; [
-        dejavu_fonts
-        liberation_ttf
-        ttf_bitstream_vera
-        noto-fonts
-        noto-fonts-emoji
-        font-awesome
-        fira-code
-        fira-mono
-      ];
-    };
+  fonts = {
+    fontconfig.enable      = true;
+    fontDir.enable         = true;
+    enableGhostscriptFonts = true;
+    enableDefaultPackages  = true;
+    packages  = with pkgs; [
+      dejavu_fonts
+      liberation_ttf
+      ttf_bitstream_vera
+      noto-fonts
+      noto-fonts-emoji
+      fira-code
+      fira-mono
+    ];
   };
 
 }
diff --git a/configurations/nixos/configure/gvfs.nix b/configurations/nixos/configure/gvfs.nix
@@ -1,15 +1,14 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, ... }:
 
-let
-  cfg = config.ctucxConfig.services.gvfs;
-
-in {
+{
 
   services = {
     gvfs.enable  = true;
     gvfs.package = (pkgs.gvfs.overrideAttrs (old: {
       mesonFlags = (old.mesonFlags or []) ++ [
         "-Dafp=false"
+        "-Dafc=false"
+        "-Dmtp=false"
         "-Dgphoto2=false"
       ];
     })).override {
diff --git a/configurations/nixos/configure/mako.nix b/configurations/nixos/configure/mako.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ ... }:
 
 {
 

@@ -19,25 +19,21 @@
     };
 
     systemd.user.services.mako = {
-      Unit = {
-        After  = [ "graphical-session-pre.target" ];
-        PartOf = [ "graphical-session.target" ];
-      };
+      Unit.After  = [ "graphical-session-pre.target" ];
+      Unit.PartOf = [ "graphical-session.target" ];
 
       Service = {
-        ExecStart = "${pkgs.mako}/bin/mako";
-        Restart = "always";
+        ExecStart  = "${pkgs.mako}/bin/mako";
+        Restart    = "always";
         RestartSec = 5;
       };
 
-      Install = {
-        WantedBy = [ "graphical-session.target" ];
-      };
+      Install.WantedBy = [ "graphical-session.target" ];
     };
 
      wayland.windowManager.sway.config.startup = [
       { always = true; command = "systemctl --user restart mako"; }
     ];
- };
+  };
 
 } 
\ No newline at end of file
diff --git a/configurations/nixos/configure/pipewire.nix b/configurations/nixos/configure/pipewire.nix
@@ -4,18 +4,18 @@
 
   security.rtkit.enable  = true;
 
-  services = {
-    pipewire = {
-      enable = true;
-      socketActivation = true;
+  services.pipewire = {
+    enable = true;
+    socketActivation = true;
 
-      alsa.enable           = true;
-      pulse.enable          = true;
-    };
+    alsa.enable  = true;
+    pulse.enable = true;
   };
 
-  home-manager.users.katja.home.packages = lib.mkIf config.home-manager.users.katja.wayland.windowManager.sway.enable  [
-    pkgs.pavucontrol
-  ];
+  home-manager.users.katja = {
+    home.packages = lib.mkIf config.home-manager.users.katja.wayland.windowManager.sway.enable  [
+      pkgs.pavucontrol
+    ];
+  };
 
 } 
\ No newline at end of file
diff --git a/configurations/nixos/configure/router/default.nix b/configurations/nixos/configure/router/default.nix
@@ -25,10 +25,10 @@
     resolved.enable       = false;
 
     avahi.enable          = true;
-    avahi.allowInterfaces = [ "brlan" ];
     avahi.reflector       = true;
+    avahi.allowInterfaces = [ "brlan" ];
 
-    kresd.enable = true;
+    kresd.enable      = true;
     kresd.listenPlain = [ "53" ];
     kresd.extraConfig = ''
       require 'math'
diff --git a/configurations/nixos/configure/router/ppp.nix b/configurations/nixos/configure/router/ppp.nix
@@ -6,32 +6,30 @@
 
   services.pppd = {
     enable = true;
-    peers.dtagdsl = {
-      config = ''
-        plugin pppoe.so dtagdsl
-        user "''${DTAG_PPP_USER}"
-        password "''${DTAG_PPP_PASS}"
-        hide-password
-        ifname ppp-dtagdsl
-        persist
-
-        maxfail 0
-        holdoff 5
-
-        noipdefault
-
-        lcp-echo-interval 20
-        lcp-echo-failure 3
-
-        mtu 1492
-        defaultroute
-        replacedefaultroute
-        +ipv6
-      '';
-    };
+    peers.dtagdsl.config = ''
+      plugin pppoe.so dtagdsl
+      user "''${DTAG_PPP_USER}"
+      password "''${DTAG_PPP_PASS}"
+      hide-password
+      ifname ppp-dtagdsl
+      persist
+
+      maxfail 0
+      holdoff 5
+
+      noipdefault
+
+      lcp-echo-interval 20
+      lcp-echo-failure 3
+
+      mtu 1492
+      defaultroute
+      replacedefaultroute
+      +ipv6
+    '';
   };
 
-  environment.etc."ppp/peers/dtagdsl".enable = false;
+  environment.etc."ppp/peers/dtagdsl".enable  = false;
   environment.etc."ip-up.d/1systemd-networkd" = {
     mode = "755";
     text = ''
diff --git a/configurations/nixos/configure/router/systemd-networkd.nix b/configurations/nixos/configure/router/systemd-networkd.nix
@@ -122,11 +122,10 @@
             Table                = 254;
             Priority             = 1900;
             SuppressPrefixLength = 0;
-          }
-          {
-            From     = "2a03:4000:4d:5e:acab::/112";
-            Table    = 1234;
-            Priority = 2000;
+          } {
+            From                 = "2a03:4000:4d:5e:acab::/112";
+            Table                = 1234;
+            Priority             = 2000;
           }
         ];
 
diff --git a/configurations/nixos/configure/smarthome/mqtt-webui/default.nix b/configurations/nixos/configure/smarthome/mqtt-webui/default.nix
@@ -1,9 +1,6 @@
-{ inputs, lib, pkgs, config, ... }:
+{ pkgs, config, ... }:
 
-let
-  configFile = pkgs.writeTextDir "config.json" (builtins.toJSON (import ./config.nix));
-
-in {
+{
 
   dns.zones."ctu.cx".subdomains."smart.home".AAAA = [ config.networking.primaryIP ];
 

@@ -20,8 +17,8 @@ in {
             name  = "mqtt-webui-env";
             paths = [
               pkgs.mqtt-webui
-              configFile
               ./extra-css
+              (pkgs.writeTextDir "config.json" (builtins.toJSON (import ./config.nix)))
             ];
           }}/";
         };

@@ -33,4 +30,4 @@ in {
     };
   };
 
-}
+}+
\ No newline at end of file
diff --git a/configurations/nixos/configure/swaylock.nix b/configurations/nixos/configure/swaylock.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, ... }:
 
 {
 

@@ -6,20 +6,16 @@
 
   services.systemd-lock-handler.enable = true;
 
-  home-manager.users.katja.systemd.user.services = {
-    swaylock = {
-      Unit = {
-        Requisite = [ "graphical-session.target" ];
-        PartOf    = [ "lock.target" "sleep.target" ];
-      };
+  home-manager.users.katja = {
+    systemd.user.services = {
+      swaylock = {
+        Unit.Requisite = [ "graphical-session.target" ];
+        Unit.PartOf    = [ "lock.target" "sleep.target" ];
 
-      Service = {
-        ExecStart    = "${pkgs.swaylock}/bin/swaylock -i /home/katja/Pictures/Backgrounds/lock.png";
-        ExecStopPost = "${pkgs.systemd}/bin/loginctl unlock-session";
-      };
+        Service.ExecStart    = "${pkgs.swaylock}/bin/swaylock -i /home/katja/Pictures/Backgrounds/lock.png";
+        Service.ExecStopPost = "${pkgs.systemd}/bin/loginctl unlock-session";
 
-      Install = {
-        WantedBy = [ "lock.target" "sleep.target" ];
+        Install.WantedBy = [ "lock.target" "sleep.target" ];
       };
     };
   };
diff --git a/configurations/nixos/configure/thunderbolt.nix b/configurations/nixos/configure/thunderbolt.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, ... }:
 
 {
 
diff --git a/configurations/nixos/configure/usbmuxd.nix b/configurations/nixos/configure/usbmuxd.nix
@@ -2,16 +2,11 @@
 
 {
 
-  users = {
-    groups.usbmux = {};
-
-	  users = {
-      katja.extraGroups    = [ "usbmux" ];
-
-      usbmux.description  = "usbmuxd user";
-      usbmux.group        = "usbmux";
-      usbmux.isSystemUser = true;
-    };
+  users.groups.usbmux = {};
+	users.users = {
+    katja.extraGroups   = [ "usbmux" ];
+    usbmux.group        = "usbmux";
+    usbmux.isSystemUser = true;
   };
 
   # Give usbmuxd permission for Apple devices

@@ -20,9 +15,7 @@
   '';
 
   systemd.services.usbmuxd = {
-    description = "usbmuxd";
-    wantedBy = [ "multi-user.target" ];
-    unitConfig.Documentation = "man:usbmuxd(8)";
+    wantedBy      = [ "multi-user.target" ];
     serviceConfig = {
       # Trigger the udev rule manually. This doesn't require replugging the
       # device when first enabling the option to get it to work
diff --git a/configurations/nixos/configure/waybar.nix b/configurations/nixos/configure/waybar.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, ... }:
 
 {
 
diff --git a/configurations/nixos/configure/wlsunset.nix b/configurations/nixos/configure/wlsunset.nix
@@ -1,14 +1,16 @@
-{ config, lib, pkgs, ... }:
+{ ... }:
 
 {
 
-  home-manager.users.katja.services.wlsunset = {
-    enable      = true;
-    latitude    = "8.26";
-    longitude   = "49.01";
-    temperature = {
-      night = 3000;
-      day   = 4500;
+  home-manager.users.katja = {
+    services.wlsunset = {
+      enable      = true;
+      latitude    = "8.26";
+      longitude   = "49.01";
+      temperature = {
+        night = 3000;
+        day   = 4500;
+      };
     };
   };
 
diff --git a/configurations/nixos/configure/xdg.nix b/configurations/nixos/configure/xdg.nix
@@ -1,31 +1,22 @@
-{ config, lib, pkgs, home-manager, ... }:
+{ ... }:
 
-let
-  cfg = config.ctucxConfig.configure.xdg;
+{
 
-in {
+  home-manager.users.katja = {
+    xdg = {
+      enable          = true;
+      mime.enable     = true;
 
-  options = {
-    ctucxConfig.configure.xdg = lib.mkEnableOption "xdg";
-  };
-
-  config = lib.mkIf cfg {
-    home-manager.users.katja = {
-      xdg = {
-        enable          = true;
-        mime.enable     = true;
-
-        userDirs = {
-          enable      = true;
-          desktop     = "\$HOME/Desktop";
-          documents   = "\$HOME/Documents";
-          download    = "\$HOME/Downloads";
-          videos      = "\$HOME/Videos";
-          music       = "\$HOME/Music";
-          pictures    = "\$HOME/Pictures";
-          publicShare = "\$HOME/Public";
-          templates   = "\$HOME/Templates";
-        };
+      userDirs = {
+        enable      = true;
+        desktop     = "\$HOME/Desktop";
+        documents   = "\$HOME/Documents";
+        download    = "\$HOME/Downloads";
+        videos      = "\$HOME/Videos";
+        music       = "\$HOME/Music";
+        pictures    = "\$HOME/Pictures";
+        publicShare = "\$HOME/Public";
+        templates   = "\$HOME/Templates";
       };
     };
   };
diff --git a/configurations/nixos/programs/ausweisapp.nix b/configurations/nixos/programs/ausweisapp.nix
@@ -5,9 +5,7 @@
   networking.firewall.allowedUDPPorts = [ 24727 ];
 
   home-manager.users.katja = {
-    home.packages = with pkgs; [
-      AusweisApp2
-    ];
+    home.packages = [ pkgs.AusweisApp2 ];
   };
 
 }
diff --git a/configurations/nixos/programs/ddcutil.nix b/configurations/nixos/programs/ddcutil.nix
@@ -4,13 +4,12 @@
 
   boot.kernelModules = [ "i2c-dev" ];
 
-  security.sudo.extraRules= [{
+  security.sudo.extraRules = [{
     users    = [ "katja" ];
-    commands = [
-       { command = "${pkgs.ddcutil}/bin/ddcutil" ;
-         options= [ "NOPASSWD" ];
-      }
-    ];
+    commands = [{
+      command = "${pkgs.ddcutil}/bin/ddcutil" ;
+      options = [ "NOPASSWD" ];
+    }];
   }];
 
   home-manager.users.katja = {
diff --git a/configurations/nixos/programs/firefox.nix b/configurations/nixos/programs/firefox.nix
@@ -3,18 +3,13 @@
 {
 
   home-manager.users.katja = {
-    home = {
-      packages = [
-        pkgs.firefoxpwa
-      ];
-      sessionVariables = {
-        BROWSER = "firefox";
-      };
+    home.sessionVariables = {
+      BROWSER = "firefox";
+    };
 
-      file."firefox-gnome-theme" = {
-        source = inputs.firefoxGnomeTheme;
-        target = ".mozilla/firefox/katja/chrome/firefox-gnome-theme";
-      };
+    home.file."firefox-gnome-theme" = {
+      source = inputs.firefoxGnomeTheme;
+      target = ".mozilla/firefox/katja/chrome/firefox-gnome-theme";
     };
 
     programs = {
diff --git a/configurations/nixos/programs/imv.nix b/configurations/nixos/programs/imv.nix
@@ -7,10 +7,8 @@
 
     xdg.desktopEntries = {
       imv-folder = {
-        name        = "imv (Folder)";
-        settings    = {
-          NoDisplay = "true";
-        };
+        name = "imv (Folder)";
+        settings.NoDisplay = "true";
       };
     };
   };
diff --git a/configurations/nixos/programs/libreoffice.nix b/configurations/nixos/programs/libreoffice.nix
@@ -7,33 +7,17 @@
     home.packages = [ pkgs.libreoffice-fresh ];
 
     xdg.desktopEntries = {
-      impress = {
-        name        = "LibreOffice Impress";
-        settings    = {
-          NoDisplay = "true";
-        };
-      };
-
-      math = {
-        name        = "LibreOffice Math";
-        settings    = {
-          NoDisplay = "true";
-        };
-      };
-
-      base = {
-        name        = "LibreOffice Base";
-        settings    = {
-          NoDisplay = "true";
-        };
-      };
-
-      draw = {
-        name        = "LibreOffice Draw";
-        settings    = {
-          NoDisplay = "true";
-        };
-      };
+      impress.name = "LibreOffice Impress";
+      impress.settings.NoDisplay = "true";
+
+      math.name = "LibreOffice Math";
+      math.settings.NoDisplay = "true";
+
+      base.name = "LibreOffice Base";
+      base.settings.NoDisplay = "true";
+
+      draw.name = "LibreOffice Draw";
+      draw.settings.NoDisplay = "true";
     };
   };
 
diff --git a/configurations/nixos/programs/mpv.nix b/configurations/nixos/programs/mpv.nix
@@ -8,22 +8,14 @@
     ];
 
     programs = lib.mkIf (config.wm.gnome.enable != true) {
-      mpv = {
-        enable  = true;
-        scripts = [
-          pkgs.mpvScripts.mpris
-        ];
-      };
+      mpv.enable  = true;
+      mpv.scripts = [ pkgs.mpvScripts.mpris ];
     };
 
     xdg = lib.mkIf (config.wm.gnome.enable != true) {
       desktopEntries = {
-        umpv = {
-          name        = "umpv Media Player";
-          settings    = {
-            NoDisplay = "true";
-          };
-        };
+        umpv.name = "umpv Media Player";
+        umpv.settings.NoDisplay = "true";
       };
     };
   };
diff --git a/configurations/nixos/programs/sway.nix b/configurations/nixos/programs/sway.nix
@@ -34,8 +34,8 @@
     '';
 
     wayland.windowManager.sway = let
-      cfg         = config.home-manager.users.katja.wayland.windowManager.sway;
-      modifier    = cfg.config.modifier;
+      cfg      = config.home-manager.users.katja.wayland.windowManager.sway;
+      modifier = cfg.config.modifier;
 
     in {
       enable              = true;
diff --git a/configurations/nixos/programs/thunar.nix b/configurations/nixos/programs/thunar.nix
@@ -1,29 +1,25 @@
-{ config, pkgs, lib, ... }:
+{ ctucxConfig, config, pkgs, lib, ... }:
 
 {
 
-  ctucxConfig.configure.gvfs = true;
+  imports = [
+    ctucxConfig.configure.gvfs
+  ];
 
   services.tumbler.enable = true;
 
   home-manager.users.katja = {
     home.packages = with pkgs; [ xfce.thunar ];
 
-    xdg = {
-      desktopEntries = {
-        thunar-bulk-rename = {
-          name        = "Bulk Rename";
-          settings    = {
-            NoDisplay = "true";
-          };
-        };
-
-        thunar-settings = {
-          name        = "Thunar settings";
-          settings    = {
-            NoDisplay = "true";
-          };
-        };
+    xdg.desktopEntries = {
+      thunar-bulk-rename = {
+        name = "Bulk Rename";
+        settings.NoDisplay = "true";
+      };
+
+      thunar-settings = {
+        name = "Thunar settings";
+        settings.NoDisplay = "true";
       };
     };
 
diff --git a/configurations/nixos/programs/thunderbird.nix b/configurations/nixos/programs/thunderbird.nix
@@ -3,24 +3,20 @@
 {
 
   home-manager.users.katja = { 
-    home.packages = with pkgs; [ thunderbird ];
+    home.packages = [ pkgs.thunderbird ];
 
     systemd.user.services.thunderbird = lib.mkIf config.home-manager.users.katja.wayland.windowManager.sway.enable {
-      Unit = {
-        After  = [ "graphical-session-pre.target" ];
-        PartOf = [ "graphical-session.target" ];
-      };
+      Unit.After  = [ "graphical-session-pre.target" ];
+      Unit.PartOf = [ "graphical-session.target" ];
 
       Service = {
         Environment = "PATH=/run/wrappers/bin:/home/katja/.nix-profile/bin:/etc/profiles/per-user/katja/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin";
-        ExecStart = "${pkgs.thunderbird}/bin/thunderbird";
-        Restart = "always";
-        RestartSec = 5;
+        ExecStart   = "${pkgs.thunderbird}/bin/thunderbird";
+        Restart     = "always";
+        RestartSec  = 5;
       };
 
-      Install = {
-        WantedBy = [ "graphical-session.target" ];
-      };
+      Install.WantedBy = [ "graphical-session.target" ];
     };
 
     wayland.windowManager.sway.config.startup = [

@@ -28,17 +24,15 @@
     ];
 
     xdg = {
-      enable          = true;
-      mime.enable     = true;
+      enable      = true;
+      mime.enable = true;
 
       #force hm to override existing mimeapps.list file
       configFile."mimeapps.list".force = true;
 
-      mimeApps = {
-        enable              = true;
-        defaultApplications = {
-          "x-scheme-handler/mailto"     = "thunderbird.desktop";
-        };
+      mimeApps.enable              = true;
+      mimeApps.defaultApplications = {
+        "x-scheme-handler/mailto" = "thunderbird.desktop";
       };
     };
 
diff --git a/configurations/nixos/services/dns-server.nix b/configurations/nixos/services/dns-server.nix
@@ -135,7 +135,6 @@ in {
           "acme".NS = [ "ns1" "ns2" ];
 
           _atproto.TXT = [ "did=did:plc:zaeuok3fmh2pcp4cjiicku4i" ];
-          test.TXT = [ "test uwu"];
         } // (generateACMERecordsPerZone "ctu.cx");
       };
 

@@ -178,7 +177,7 @@ in {
       "flauschehorn.sexy" = {
         inherit SOA NS CAA;
 
-        MX  = with mx; [ (mx 10 "rx300.kunbox.net.") ];
+        MX  = [ (mx.mx 10 "rx300.kunbox.net.") ];
         TXT = [ "v=spf1 mx ~all" ];
 
         subdomains = {
diff --git a/configurations/nixos/services/matrix-synapse.nix b/configurations/nixos/services/matrix-synapse.nix
@@ -1,4 +1,4 @@
-{ inputs, config, lib, pkgs, ... }:
+{ config, lib, pkgs, ... }:
 
 {
 

@@ -64,7 +64,10 @@
       enable       = true;
       virtualHosts = let
         matrixServerConfig = { "m.server" = "matrix.ctu.cx:443"; };
-        matrixClientConfig = { "m.homeserver" = { "base_url" = "https://matrix.ctu.cx"; }; "org.matrix.msc3575.proxy" = { "url" = "https://matrix.ctu.cx"; }; };
+        matrixClientConfig = {
+          "m.homeserver"             = { "base_url" = config.services.matrix-synapse.settings.public_baseurl; };
+          "org.matrix.msc3575.proxy" = { "url"      = config.services.matrix-synapse.settings.public_baseurl; };
+        };
       in {
         "ctu.cx" = {
           useACMEHost = "${config.networking.fqdn}";

@@ -101,10 +104,8 @@
 
             "/".root = pkgs.cinny.override {
               conf = {
-                defaultHomeserver = 0;
-                homeserverList    = [
-                  "matrix.ctu.cx"
-                ];
+                defaultHomeserver      = 0;
+                homeserverList         = [ "matrix.ctu.cx" ];
                 allowCustomHomeservers = false;
                 hashRouter.enabled     = true;
               };
diff --git a/configurations/nixos/services/mautrix-whatsapp.nix b/configurations/nixos/services/mautrix-whatsapp.nix
@@ -5,7 +5,7 @@
   users.users.matrix-synapse.extraGroups = [ "mautrix-whatsapp" ];
 
   nixpkgs.overlays = [ (final: prev: {
-        mautrix-whatsapp = prev.mautrix-whatsapp.override { withGoolm = true; };
+    mautrix-whatsapp = prev.mautrix-whatsapp.override { withGoolm = true; };
   })];
 
   services = {
diff --git a/configurations/nixos/services/syncthing-nginx.nix b/configurations/nixos/services/syncthing-nginx.nix
@@ -11,9 +11,9 @@
   systemd.services.syncthing.onFailure = [ "email-notify@%i.service" ];
 
   services = {
-    syncthing = {
-      guiAddress = "[::1]:8384";
-      settings.gui.insecureSkipHostcheck = true;
+    syncthing.guiAddress = "[::1]:8384";
+    syncthing.settings   = {
+      gui.insecureSkipHostcheck = true;
     };
 
     nginx = {
diff --git a/configurations/nixos/websites/dav.ctu.cx.nix b/configurations/nixos/websites/dav.ctu.cx.nix
@@ -21,17 +21,15 @@
   systemd.services.radicale.onFailure = [ "email-notify@%i.service" ];
 
   services = {
-    radicale = {
-      enable = true;
-      settings = {
-        server.hosts                        = [ "[::1]:5232" ];
-        web.type                            = "internal";
-        storage.filesystem_folder           = "/var/lib/radicale/collections";
-        headers.Access-Control-Allow-Origin = "*";
-        auth.type                           = "htpasswd";
-        auth.htpasswd_filename              = config.age.secrets.radicale-users.path;
-        auth.htpasswd_encryption            = "plain";
-      };
+    radicale.enable = true;
+    radicale.settings = {
+      server.hosts                        = [ "[::1]:5232" ];
+      web.type                            = "internal";
+      storage.filesystem_folder           = "/var/lib/radicale/collections";
+      headers.Access-Control-Allow-Origin = "*";
+      auth.type                           = "htpasswd";
+      auth.htpasswd_filename              = config.age.secrets.radicale-users.path;
+      auth.htpasswd_encryption            = "plain";
     };
 
     nginx = {
diff --git a/configurations/nixos/websites/dendrite.ctucx.de.nix b/configurations/nixos/websites/dendrite.ctucx.de.nix
@@ -29,7 +29,7 @@
   services.nginx = {
     enable       = true;
     virtualHosts = {
-      "dendrite.ctucx.de" = {
+      "${config.services.dendrite.settings.global.server_name}" = {
         useACMEHost = "${config.networking.fqdn}";
         forceSSL    = true;
         kTLS        = true;

@@ -39,7 +39,7 @@
           "/".root             = pkgs.cinny.override {
             conf = {
               defaultHomeserver = 0;
-              homeserverList    = [ "dendrite.ctucx.de" ];
+              homeserverList    = [ "${config.services.dendrite.settings.global.server_name}" ];
               allowCustomHomesevrers = false;
             };
           };
diff --git a/configurations/nixos/websites/grafana.ctu.cx/default.nix b/configurations/nixos/websites/grafana.ctu.cx/default.nix
@@ -11,71 +11,68 @@
 
   systemd.services.grafana.onFailure = [ "email-notify@%i.service" ];
 
-  services = {
-    grafana = {
-      enable  = true;
-
-      settings = {
-        server = {
-          domain    = "grafana.ctu.cx";
-          root_url  = "https://grafana.ctu.cx/";
-          http_addr = "::1";
-          http_port = 3001;
-        };
-        security.allow_embedding = true;
-        "users".auto_assign_org_role = "Viewer";
-#        "users".viewers_can_edit = true;
-        "users".home_page = "/d/FRDYqjEGz/smarthome-influx";
-        "auth".disable_login_form = true;
-        "auth.basic".enabled = false;
-        "auth.anonymous".enabled = true;
-        "auth.anonymous".org_name = "Main Org.";
-        "auth.anonymous".org_role = "Viewer";
+  services.grafana = {
+    enable   = true;
+    settings = {
+      server = {
+        domain    = "grafana.ctu.cx";
+        root_url  = "https://${config.services.grafana.settings.server.domain}/";
+        http_addr = "::1";
+        http_port = 3001;
       };
+      security.allow_embedding = true;
+      "users".auto_assign_org_role = "Viewer";
+#        "users".viewers_can_edit = true;
+      "users".home_page = "/d/FRDYqjEGz/smarthome-influx";
+      "auth".disable_login_form = true;
+      "auth.basic".enabled = false;
+      "auth.anonymous".enabled = true;
+      "auth.anonymous".org_name = "Main Org.";
+      "auth.anonymous".org_role = "Viewer";
+    };
 
-      provision = {
-        enable      = true;
-        datasources.settings.datasources = [
+    provision = {
+      enable      = true;
+      datasources.settings.datasources = [
 
-          {
-            name      = "Prometheus";
-            type      = "prometheus";
-            url       = "https://prometheus.ctu.cx/";
-            isDefault = true;
-            editable  = false;
-            jsonData.timeInterval = "20s";
-          }
+        {
+          name      = "Prometheus";
+          type      = "prometheus";
+          url       = "https://prometheus.ctu.cx/";
+          isDefault = true;
+          editable  = false;
+          jsonData.timeInterval = "20s";
+        }
 
-          {
-            name                   = "InfluxDB (mqttData)";
-            type                   = "influxdb";
-            url                    = "https://influx.home.ctu.cx";
-            orgId                  = 1;
-            database               = "mqttData";
-            editable               = false;
-            jsonData.version       = "Flux";
-            jsonData.organization  = "katja";
-            jsonData.defaultBucket = "mqttData";
-            secureJsonData.token   = "$__file{${config.age.secrets.grafana-influx-token-mqttData.path}}";
-          }
+        {
+          name                   = "InfluxDB (mqttData)";
+          type                   = "influxdb";
+          url                    = "https://influx.home.ctu.cx";
+          orgId                  = 1;
+          database               = "mqttData";
+          editable               = false;
+          jsonData.version       = "Flux";
+          jsonData.organization  = "katja";
+          jsonData.defaultBucket = "mqttData";
+          secureJsonData.token   = "$__file{${config.age.secrets.grafana-influx-token-mqttData.path}}";
+        }
 
-        ];
+      ];
 
-        dashboards.settings.providers = [{
-          folder = "provisioned";
-          options.path = ./dashboards;
-        }];
-      };
+      dashboards.settings.providers = [{
+        folder = "provisioned";
+        options.path = ./dashboards;
+      }];
     };
+  };
 
-    nginx = {
-      enable = true;
-      virtualHosts."grafana.ctu.cx" = {
-        useACMEHost = "${config.networking.hostName}.${config.networking.domain}";
-        forceSSL    = true;
-        kTLS        = true;
-        locations."/".proxyPass = "http://[::1]:${toString config.services.grafana.settings.server.http_port}/";
-      };
+  services.nginx = {
+    enable = true;
+    virtualHosts."${config.services.grafana.settings.server.domain}" = {
+      useACMEHost = "${config.networking.fqdn}";
+      forceSSL    = true;
+      kTLS        = true;
+      locations."/".proxyPass = "http://[::1]:${toString config.services.grafana.settings.server.http_port}/";
     };
   };
 
diff --git a/configurations/nixos/websites/grocy.ctu.cx.nix b/configurations/nixos/websites/grocy.ctu.cx.nix
@@ -4,13 +4,6 @@
 
   dns.zones."ctu.cx".subdomains.grocy.CNAME = [ "${config.networking.fqdn}." ];
 
-
-  services.nginx.virtualHosts."grocy.ctu.cx" = {
-    useACMEHost = "${config.networking.hostName}.${config.networking.domain}";
-    forceSSL    = true;
-    kTLS        = true;
-  };
-
   services.grocy = {
     enable = true;
     hostName = "grocy.ctu.cx";

@@ -24,4 +17,10 @@
     };
   };
 
+  services.nginx.virtualHosts."${config.services.grocy.hostName}" = {
+    useACMEHost = "${config.networking.fqdn}";
+    forceSSL    = true;
+    kTLS        = true;
+  };
+
 }
diff --git a/configurations/nixos/websites/storage.home.ctu.cx/default.nix b/configurations/nixos/websites/storage.home.ctu.cx/default.nix
@@ -2,7 +2,7 @@
 
 {
 
-  dns.zones."ctu.cx".subdomains."storage.home".CNAME = lib.mkIf config.networking.usePBBUplink [ "${config.networking.fqdn}." ];
+  dns.zones."ctu.cx".subdomains."storage.home".CNAME = [ "${config.networking.fqdn}." ];
 
   services.nginx.virtualHosts = {
     "storage.home.ctu.cx" = {
diff --git a/configurations/nixos/websites/things.ctu.cx.nix b/configurations/nixos/websites/things.ctu.cx.nix
@@ -7,23 +7,23 @@
   age.secrets.restic-ctucx-things.file = ./. + "/../../../secrets/${config.networking.hostName}/restic/ctucx-things.age";
 
   restic-backups.ctucx-things = {
-    user            = "ctucx-things";
-    passwordFile    = config.age.secrets.restic-ctucx-things.path;
-    paths           = [ "/var/lib/ctucx-things" ];
+    user         = "ctucx-things";
+    passwordFile = config.age.secrets.restic-ctucx-things.path;
+    paths        = [ "/var/lib/ctucx-things" ];
+  };
+
+  services.ctucx-things = {
+    enable       = true;
+    storagePath  = "/var/lib/ctucx-things";
+    nginx.enable = true;
+    nginx.domain = "things.ctu.cx";
   };
 
   services.nginx.virtualHosts."things.ctu.cx" = {
-    useACMEHost = "${config.networking.hostName}.${config.networking.domain}";
+    useACMEHost = "${config.networking.fqdn}";
     forceSSL    = true;
     kTLS        = true;
   };
 
-  services.ctucx-things = {
-    enable      = true;
-    storagePath = "/var/lib/ctucx-things";
-    nginx.enable     = true;
-    nginx.domain     = "things.ctu.cx";
-  };
-
 }
 
diff --git a/configurations/nixos/websites/vault.ctu.cx.nix b/configurations/nixos/websites/vault.ctu.cx.nix
@@ -40,7 +40,7 @@
         SMTP_SECURITY = "starttls";
 
         ROCKET_ADDRESS = "::1";
-        ROCKET_PORT = 8582;
+        ROCKET_PORT    = 8582;
       };
     };
 

@@ -50,10 +50,12 @@
         useACMEHost = "${config.networking.fqdn}";
         forceSSL    = true;
         kTLS        = true;
-        locations."/".proxyPass = "http://[::1]:${toString config.services.vaultwarden.config.ROCKET_PORT}/";
-        locations."/notifications/hub" = {
-          proxyPass = "http://[::1]:${toString config.services.vaultwarden.config.ROCKET_PORT}/";
-          proxyWebsockets = true;
+        locations   = {
+          "/".proxyPass = "http://[::1]:${toString config.services.vaultwarden.config.ROCKET_PORT}/";
+          "/notifications/hub" = {
+            proxyPass = "http://[::1]:${toString config.services.vaultwarden.config.ROCKET_PORT}/";
+            proxyWebsockets = true;
+          };
         };
       };
     };
diff --git a/configurations/nixos/wm/gnome.nix b/configurations/nixos/wm/gnome.nix
@@ -1,10 +1,10 @@
-{ inputs, nixStd, config, ctucxConfig, lib, pkgs, homeManager, ... }:
+{ inputs, nixStd, config, ctucxConfig, lib, pkgs, ... }:
 
 {
 
   nixpkgs.overlays = [(final: prev: {
     # patch gdm to automaticly select the first user
-    gnome-shell    = prev.gnome-shell.overrideAttrs (prevAttrs: {
+    gnome-shell = prev.gnome-shell.overrideAttrs (prevAttrs: {
       patches = prevAttrs.patches ++ [ ../../../pkgs/gdm-autoselect-user.patch ];
     });
 

@@ -17,9 +17,11 @@
   imports = [
     ctucxConfig.configure.mobile-device
     ctucxConfig.configure.thunderbolt
-    ctucxConfig.configure.fonts
     ctucxConfig.configure.xdg
+    ctucxConfig.configure.fonts
     ctucxConfig.configure.pipewire
+    ctucxConfig.configure.gvfs
+    ctucxConfig.configure.avahi
 
     ctucxConfig.services.syncthing
     

@@ -62,29 +64,15 @@
 
   boot.plymouth.enable = true;
 
+  users.users.katja.extraGroups = [ "dialout" "networkmanager"];
+
   hardware.bluetooth.settings = {
     General.Experimental = true;
   };
 
-  users.users.katja.extraGroups = [ "dialout" "networkmanager"];
-
-  # networking.networkmanager.wifi.backend = "iwd";
-
   services = {
     nscd.enable     = true;
     printing.enable = true;
-    avahi.enable    = true;
-    gvfs.package = (pkgs.gvfs.overrideAttrs (old: {
-      mesonFlags = (old.mesonFlags or []) ++ [
-        "-Dafp=false"
-        "-Dafc=false"
-        "-Dmtp=false"
-        "-Dgphoto2=false"
-      ];
-    })).override {
-      samba        = null;
-      gnomeSupport = false;
-    };
 
     #required for gnome-calendar
     gnome.evolution-data-server.enable  = true;
diff --git a/configurations/nixos/wm/sway.nix b/configurations/nixos/wm/sway.nix
@@ -17,9 +17,7 @@
     ];
   };
 
-  programs = {
-    dconf.enable = true;
-  };
+  programs.dconf.enable = true;
 
   services = {
     nscd.enable         = true;
diff --git a/flake.nix b/flake.nix
@@ -3,8 +3,10 @@
   description = "A flake for building my infra";
 
   outputs = inputs: let
+    nixpkgsLib = inputs.nixpkgs.lib;
+
     forAllSystems = function: (
-      inputs.nixpkgs.lib.genAttrs [
+      nixpkgsLib.genAttrs [
         "x86_64-linux"
         "aarch64-linux"
         "aarch64-darwin"

@@ -29,14 +31,14 @@
       transformer = transformer;
     };
 
-    darwinMachines = inputs.nixpkgs.lib.filterAttrs (name: machine: inputs.nixpkgs.lib.strings.hasSuffix "darwin" machine.system) ctucxMachines;
-    nixosMachines  = inputs.nixpkgs.lib.filterAttrs (name: machine: inputs.nixpkgs.lib.strings.hasSuffix "linux"  machine.system) ctucxMachines;
+    darwinMachines = nixpkgsLib.filterAttrs (name: machine: nixpkgsLib.strings.hasSuffix "darwin" machine.system) ctucxMachines;
+    nixosMachines  = nixpkgsLib.filterAttrs (name: machine: nixpkgsLib.strings.hasSuffix "linux"  machine.system) ctucxMachines;
 
   in {
 
     ctucxConfig.common = loadDir ./configurations/common;
-    ctucxConfig.nixos  = inputs.nixpkgs.lib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/nixos);
-    ctucxConfig.darwin = inputs.nixpkgs.lib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/darwin);
+    ctucxConfig.nixos  = nixpkgsLib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/nixos);
+    ctucxConfig.darwin = nixpkgsLib.recursiveUpdate inputs.self.ctucxConfig.common (loadDir ./configurations/darwin);
 
     nixosModules       = loadDir ./modules/nixos;
     darwinModules      = loadDir ./modules/darwin;

@@ -47,8 +49,8 @@
       transformer = transformer;
     };
 
-    overlays.unstable      = final: prev: { unstable = inputs.nixpkgsUnstable.legacyPackages.${prev.system}; };
-    overlays.darwinOverlay = import ./pkgs/darwinOverlay.nix;
+    overlays.nixpkgsUnstable = final: prev: { unstable = inputs.nixpkgsUnstable.legacyPackages.${prev.system}; };
+    overlays.darwinOverlay   = import ./pkgs/darwinOverlay.nix;
 
     overlays.packages = final: prev: inputs.haumea.lib.load {
       src         = ./pkgs/all;

@@ -62,7 +64,7 @@
       transformer = transformer;
     };
 
-    nixosConfigurations = builtins.mapAttrs (name: machine: inputs.nixpkgs.lib.nixosSystem {
+    nixosConfigurations = builtins.mapAttrs (name: machine: nixpkgsLib.nixosSystem {
       system = machine.system;
 
       specialArgs = {

@@ -77,7 +79,7 @@
       modules = [
         ({ ... }: { nixpkgs.overlays = [
           inputs.self.overlays.packages
-          inputs.self.overlays.unstable
+          inputs.self.overlays.nixpkgsUnstable
 
           inputs.stagit.overlays.default
           inputs.travelynx2fedi.overlays.default

@@ -109,7 +111,7 @@
       pkgs = import inputs.nixpkgsDarwin {
         system   = machine.system;
         overlays = [
-          inputs.self.overlays.unstable
+          inputs.self.overlays.nixpkgsUnstable
           inputs.self.overlays.packages
           inputs.self.overlays.darwinPackages
           inputs.self.overlays.darwinOverlay

@@ -153,7 +155,7 @@
       src = ./pkgs/darwin;
     }) else {}));
 
-    checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) (inputs.nixpkgs.lib.filterAttrs (key: value: key != "x86_64-darwin") inputs.deploy-rs.lib);
+    checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) (nixpkgsLib.lib.filterAttrs (key: value: key != "x86_64-darwin") inputs.deploy-rs.lib);
   };
 
   inputs = {
diff --git a/machines/briefkasten/default.nix b/machines/briefkasten/default.nix
@@ -60,20 +60,17 @@
     nix.optimise.automatic = false;
     nix.gc.automatic       = false;
 
-    services.logind.extraConfig = ''
-      # don’t shutdown when power button is short-pressed
-      HandlePowerKey=ignore
-    '';
-
     networking = {
-      domain     = "home.ctu.cx";
       primaryIP  = "2a03:4000:4d:5e:acab::1";
       primaryIP4 = "10.0.0.1";
+
+      domain     = "home.ctu.cx";
     };
 
     services = {
-      usbmuxd.enable = true;
       email-notify.enable = true;
+      usbmuxd.enable      = true;
+      logind.powerKey     = "ignore";
     };
 
     powerManagement.cpuFreqGovernor    = "powersave";
diff --git a/machines/seifenkiste/default.nix b/machines/seifenkiste/default.nix
@@ -15,10 +15,8 @@
     boot = {
       loader.systemd-boot.enable = lib.mkForce false;
 
-      lanzaboote = {
-        enable = true;
-        pkiBundle = "/etc/secureboot";
-      };
+      lanzaboote.enable    = true;
+      lanzaboote.pkiBundle = "/etc/secureboot";
 
       kernelPackages = pkgs.linuxPackages_latest;
 

@@ -30,16 +28,11 @@
       initrd.systemd.enable = true;
     };
 
-    nix = {
-      settings.experimental-features = [ "pipe-operator" ];
-      gc.automatic = lib.mkForce false;
-    };
+    nix.settings.experimental-features = [ "pipe-operator" ];
+    nix.gc.automatic                   = lib.mkForce false;
 
-    services = {
-      openssh.enable = true;
-      fprintd.enable = true;
-      fwupd.enable   = true;
-    };
+    services.fprintd.enable = true;
+    services.fwupd.enable   = true;
 
     security.pam.services.login.fprintAuth = lib.mkForce false;