From 4386027761f21d01d4650529ec7c92bf4dafa0c1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 3 Dec 2025 10:02:15 +0100 Subject: [PATCH] refactor(nixos): standardize configuration structures - Renamed and reorganized configuration keys for consistency (`settings` usage). - Updated Postfix, systemd, and Syncthing configurations to adhere to the standardized format. - Improved maintainability and readability of NixOS configurations. --- systems/x86_64-linux/sgx/default.nix | 2 +- systems/x86_64-linux/sgx/fileserver.nix | 62 +++++++++++++------------ systems/x86_64-linux/sgx/mail.nix | 4 +- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/systems/x86_64-linux/sgx/default.nix b/systems/x86_64-linux/sgx/default.nix index 42ea1a1..71a5597 100644 --- a/systems/x86_64-linux/sgx/default.nix +++ b/systems/x86_64-linux/sgx/default.nix @@ -64,7 +64,7 @@ systemd.targets.hybrid-sleep.enable = false; services.xserver.displayManager.gdm.autoSuspend = false; - services.logind.lidSwitch = "ignore"; + services.logind.settings.Login.HandleLidSwitch = "ignore"; system.stateVersion = "23.11"; } diff --git a/systems/x86_64-linux/sgx/fileserver.nix b/systems/x86_64-linux/sgx/fileserver.nix index 41c3076..033d61f 100644 --- a/systems/x86_64-linux/sgx/fileserver.nix +++ b/systems/x86_64-linux/sgx/fileserver.nix @@ -117,37 +117,39 @@ dataDir = "/mnt/raid/Qmultimedia/syncthing"; # Default folder for new synced folders configDir = "/mnt/raid/Qmultimedia/syncthing/.config/syncthing"; # Folder for Syncthing's settings and keys guiAddress = "127.0.0.1:8384"; - settings.gui.insecureSkipHostcheck = true; - devices = { - "sgx" = { - id = "2AAVSVQ-PK66I2B-2B4KWAU-TF674DG-IXNEKLF-CIWK7HG-7MUC7OW-DQQNAQM"; + settings = { + gui.insecureSkipHostcheck = true; + devices = { + "sgx" = { + id = "2AAVSVQ-PK66I2B-2B4KWAU-TF674DG-IXNEKLF-CIWK7HG-7MUC7OW-DQQNAQM"; + }; + "S25" = { + id = "7Q7XQXG-VF7QM6Y-HJST4V2-RWOPB3M-GHXQDLL-SRRN3IL-3PHKNOZ-D2IFIQV"; + }; + "m4" = { + id = "WLIPM6R-RHVUP3S-7DVQJTD-M7NAMCH-ZFEAFI4-HOVXOBN-Q7RTQNG-FMU36QC"; + }; + "x1" = { + id = "ZXRDFYU-W22PYCZ-7QJJCVN-GGHP3TS-KSY56B4-75OLQRN-UR2A4ZU-7BQBQQZ"; + }; }; - "S25" = { - id = "7Q7XQXG-VF7QM6Y-HJST4V2-RWOPB3M-GHXQDLL-SRRN3IL-3PHKNOZ-D2IFIQV"; - }; - "m4" = { - id = "WLIPM6R-RHVUP3S-7DVQJTD-M7NAMCH-ZFEAFI4-HOVXOBN-Q7RTQNG-FMU36QC"; - }; - "x1" = { - id = "ZXRDFYU-W22PYCZ-7QJJCVN-GGHP3TS-KSY56B4-75OLQRN-UR2A4ZU-7BQBQQZ"; - }; - }; - folders = { - "qibxq-03l4j" = { - path = "~/logseq"; - devices = [ - "sgx" - "S25" - "x1" - "m4" - ]; - }; - "sm-s931b_hjcb-Bilder" = { - path = "/mnt/raid/Qmultimedia/S25-Kamera"; - devices = [ - "sgx" - "S25" - ]; + folders = { + "qibxq-03l4j" = { + path = "~/logseq"; + devices = [ + "sgx" + "S25" + "x1" + "m4" + ]; + }; + "sm-s931b_hjcb-Bilder" = { + path = "/mnt/raid/Qmultimedia/S25-Kamera"; + devices = [ + "sgx" + "S25" + ]; + }; }; }; }; diff --git a/systems/x86_64-linux/sgx/mail.nix b/systems/x86_64-linux/sgx/mail.nix index e38ebd0..0463ea6 100644 --- a/systems/x86_64-linux/sgx/mail.nix +++ b/systems/x86_64-linux/sgx/mail.nix @@ -7,8 +7,8 @@ services.postfix = { enable = true; - settings.main.relayhost = [ "[smtp.gmail.com]:587" ]; - config = { + setting.main = { + relayhost = [ "[smtp.gmail.com]:587" ]; smtp_use_tls = "yes"; smtp_sasl_auth_enable = "yes"; smtp_sasl_security_options = "";