From 3c6fc1476a0a3ff5dd6e5c5d60561c69192a7cfc Mon Sep 17 00:00:00 2001 From: Henri Dohmen Date: Thu, 15 May 2025 00:00:46 +0200 Subject: [PATCH] formatting --- host/roam/default.nix | 7 +---- lib.nix | 2 +- mod/boot.nix | 28 +++++++++-------- mod/fonts.nix | 18 ++++++----- mod/network.nix | 72 ++++++++++++++++++++++--------------------- mod/services.nix | 16 +++++----- 6 files changed, 73 insertions(+), 70 deletions(-) diff --git a/host/roam/default.nix b/host/roam/default.nix index f7e8153..fd505b0 100644 --- a/host/roam/default.nix +++ b/host/roam/default.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ ... }: { networking.hostName = "roam"; diff --git a/lib.nix b/lib.nix index 25b012d..aca2364 100644 --- a/lib.nix +++ b/lib.nix @@ -9,7 +9,7 @@ rec { name = lib.removeSuffix ".nix" name; value = if value == "regular" then - builtins.toPath (path + "/${name}") + path + "/${name}" else if value == "directory" then walk-dir (path + "/${name}") else diff --git a/mod/boot.nix b/mod/boot.nix index 7c241f1..6e6b9fe 100644 --- a/mod/boot.nix +++ b/mod/boot.nix @@ -1,18 +1,20 @@ { pkgs, ... }: { - boot.loader = { - efi.canTouchEfiVariables = true; - grub = { - enable = true; - efiSupport = true; - device = "nodev"; + boot = { + loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + efiSupport = true; + device = "nodev"; + }; }; + + # otherwise /tmp is on disk. This *may* be problematic as nix + # builds in /tmp but I think my swap is large enough... + tmp.useTmpfs = true; + + kernelPackages = pkgs.linuxPackages_6_13; + kernel.sysctl."kernel.sysrq" = 1; }; - - # otherwise /tmp is on disk. This *may* be problematic as nix - # builds in /tmp but I think my swap is large enough... - boot.tmp.useTmpfs = true; - - boot.kernelPackages = pkgs.linuxPackages_6_13; - boot.kernel.sysctl."kernel.sysrq" = 1; } diff --git a/mod/fonts.nix b/mod/fonts.nix index 9e5a1b7..c9fbe42 100644 --- a/mod/fonts.nix +++ b/mod/fonts.nix @@ -1,11 +1,13 @@ { pkgs, ... }: { - fonts.packages = with pkgs; [ - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - nerd-fonts.noto - ]; - fonts.fontDir.enable = true; - fonts.fontconfig.defaultFonts.monospace = [ "Noto Nerd Font Mono" ]; + fonts = { + packages = with pkgs; [ + noto-fonts + noto-fonts-cjk-sans + noto-fonts-emoji + nerd-fonts.noto + ]; + fontDir.enable = true; + fontconfig.defaultFonts.monospace = [ "Noto Nerd Font Mono" ]; + }; } diff --git a/mod/network.nix b/mod/network.nix index 1e3d2a1..6a5eb1a 100644 --- a/mod/network.nix +++ b/mod/network.nix @@ -11,41 +11,43 @@ networking = { enableIPv6 = true; - networkmanager.enable = true; - networkmanager.wifi.macAddress = "random"; - networkmanager.ensureProfiles.profiles = { - "tuda-vpn" = { - connection = { - autoconnect = "false"; - id = "tuda-vpn"; - type = "vpn"; - }; - ipv4 = { - method = "auto"; - }; - ipv6 = { - addr-gen-mode = "stable-privacy"; - method = "auto"; - }; - vpn = { - authtype = "password"; - autoconnect-flags = "0"; - certsigs-flags = "0"; - cookie-flags = "2"; - disable_udp = "no"; - enable_csd_trojan = "no"; - gateway = "vpn.hrz.tu-darmstadt.de"; - gateway-flags = "2"; - gwcert-flags = "2"; - lasthost-flags = "0"; - pem_passphrase_fsid = "no"; - prevent_invalid_cert = "no"; - protocol = "anyconnect"; - resolve-flags = "2"; - service-type = "org.freedesktop.NetworkManager.openconnect"; - stoken_source = "disabled"; - xmlconfig-flags = "0"; - password-flags = 0; + networkmanager = { + enable = true; + wifi.macAddress = "random"; + ensureProfiles.profiles = { + "tuda-vpn" = { + connection = { + autoconnect = "false"; + id = "tuda-vpn"; + type = "vpn"; + }; + ipv4 = { + method = "auto"; + }; + ipv6 = { + addr-gen-mode = "stable-privacy"; + method = "auto"; + }; + vpn = { + authtype = "password"; + autoconnect-flags = "0"; + certsigs-flags = "0"; + cookie-flags = "2"; + disable_udp = "no"; + enable_csd_trojan = "no"; + gateway = "vpn.hrz.tu-darmstadt.de"; + gateway-flags = "2"; + gwcert-flags = "2"; + lasthost-flags = "0"; + pem_passphrase_fsid = "no"; + prevent_invalid_cert = "no"; + protocol = "anyconnect"; + resolve-flags = "2"; + service-type = "org.freedesktop.NetworkManager.openconnect"; + stoken_source = "disabled"; + xmlconfig-flags = "0"; + password-flags = 0; + }; }; }; }; diff --git a/mod/services.nix b/mod/services.nix index ca1f2a3..1bbaddd 100644 --- a/mod/services.nix +++ b/mod/services.nix @@ -1,11 +1,13 @@ { ... }: { - services.printing.enable = true; - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; + services = { + printing.enable = true; + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + udisks2.enable = true; + emacs.enable = true; }; - services.udisks2.enable = true; - services.emacs.enable = true; }