From f2462d1fe2e5293151df66891b598c4ca8633ef3 Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Thu, 12 Dec 2024 07:54:44 +0400 Subject: [PATCH] fix the formatting fix the formatting according to the latest rfc guidelines. Signed-off-by: Brian McGillion --- lib.nix | 12 +++-- modules/common/boot/systemd-boot-dtb.nix | 3 +- modules/desktop/graphics/labwc.config.nix | 50 ++++++++----------- .../desktop/graphics/styles/lock-layout.nix | 2 +- .../microvm/virtualization/microvm/appvm.nix | 13 +++-- .../agx-netvm-wlan-pci-passthrough.nix | 3 +- .../nx-netvm-ethernet-pci-passthrough.nix | 3 +- .../pci-passthrough-common.nix | 3 +- modules/reference/programs/google-chrome.nix | 5 +- .../services/proxy-server/3proxy-config.nix | 11 ++-- 10 files changed, 53 insertions(+), 52 deletions(-) diff --git a/lib.nix b/lib.nix index 174337f0d..26a4e4f8d 100644 --- a/lib.nix +++ b/lib.nix @@ -43,10 +43,14 @@ nixpkgs.lib.extend ( lib.filterAttrs ( _: value: let - platforms = lib.attrByPath [ - "meta" - "platforms" - ] [ ] value; + platforms = + lib.attrByPath + [ + "meta" + "platforms" + ] + [ ] + value; in lib.elem system platforms ); diff --git a/modules/common/boot/systemd-boot-dtb.nix b/modules/common/boot/systemd-boot-dtb.nix index a7e32ec55..4f431c920 100644 --- a/modules/common/boot/systemd-boot-dtb.nix +++ b/modules/common/boot/systemd-boot-dtb.nix @@ -23,7 +23,8 @@ in config = mkIf cfg.enable { boot.loader.systemd-boot = { - extraFiles."dtbs/${config.hardware.deviceTree.name}" = "${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}"; + extraFiles."dtbs/${config.hardware.deviceTree.name}" = + "${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}"; extraInstallCommands = '' # Find out the latest generation from loader.conf default_cfg=$(${pkgs.coreutils}/bin/cat /boot/loader/loader.conf | ${pkgs.gnugrep}/bin/grep default | ${pkgs.gawk}/bin/awk '{print $2}') diff --git a/modules/desktop/graphics/labwc.config.nix b/modules/desktop/graphics/labwc.config.nix index 5848ba02c..6d0f094ab 100644 --- a/modules/desktop/graphics/labwc.config.nix +++ b/modules/desktop/graphics/labwc.config.nix @@ -105,16 +105,14 @@ let - ${ - lib.concatStringsSep "\n" ( - builtins.map (index: '' - - - - - '') (lib.lists.range 1 cfg.maxDesktops) - ) - } + ${lib.concatStringsSep "\n" ( + builtins.map (index: '' + + + + + '') (lib.lists.range 1 cfg.maxDesktops) + )} @@ -162,31 +160,25 @@ let - ${ - lib.optionalString (!config.ghaf.profiles.debug.enable) '' - - '' - } + ${lib.optionalString (!config.ghaf.profiles.debug.enable) '' + + ''} - ${ - lib.concatStringsSep "\n" ( - map (rule: '' - - '') cfg.frameColouring - ) - } - ${ - lib.concatStringsSep "\n" ( - map (rule: '' - - '') cfg.securityContext - ) - } + ${lib.concatStringsSep "\n" ( + map (rule: '' + + '') cfg.frameColouring + )} + ${lib.concatStringsSep "\n" ( + map (rule: '' + + '') cfg.securityContext + )} yes diff --git a/modules/desktop/graphics/styles/lock-layout.nix b/modules/desktop/graphics/styles/lock-layout.nix index 1ee3f4efd..f549c70f5 100644 --- a/modules/desktop/graphics/styles/lock-layout.nix +++ b/modules/desktop/graphics/styles/lock-layout.nix @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # Ghaf lock screen layout -# Base layout taken from gtklock upstream: https://github.com/jovanlanik/gtklock/blob/master/res/gtklock.ui +# Base layout taken from gtklock upstream: https://github.com/jovanlanik/gtklock/blob/master/res/gtklock.ui { writeText, ... diff --git a/modules/microvm/virtualization/microvm/appvm.nix b/modules/microvm/virtualization/microvm/appvm.nix index 6e912a174..26d438876 100644 --- a/modules/microvm/virtualization/microvm/appvm.nix +++ b/modules/microvm/virtualization/microvm/appvm.nix @@ -137,11 +137,14 @@ let nixpkgs.buildPlatform.system = configHost.nixpkgs.buildPlatform.system; nixpkgs.hostPlatform.system = configHost.nixpkgs.hostPlatform.system; - environment.systemPackages = [ - pkgs.tpm2-tools - pkgs.opensc - pkgs.givc-cli - ] ++ vm.packages ++ appPackages; + environment.systemPackages = + [ + pkgs.tpm2-tools + pkgs.opensc + pkgs.givc-cli + ] + ++ vm.packages + ++ appPackages; security.tpm2 = { enable = true; diff --git a/modules/reference/hardware/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix b/modules/reference/hardware/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix index 7811b48a0..50da81485 100644 --- a/modules/reference/hardware/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix +++ b/modules/reference/hardware/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix @@ -10,7 +10,8 @@ let cfg = config.ghaf.hardware.nvidia.orin.agx; in { - options.ghaf.hardware.nvidia.orin.agx.enableNetvmWlanPCIPassthrough = lib.mkEnableOption "WLAN card PCI passthrough to NetVM"; + options.ghaf.hardware.nvidia.orin.agx.enableNetvmWlanPCIPassthrough = + lib.mkEnableOption "WLAN card PCI passthrough to NetVM"; config = lib.mkIf cfg.enableNetvmWlanPCIPassthrough { # Orin AGX WLAN card PCI passthrough ghaf.hardware.nvidia.orin.enablePCIPassthroughCommon = true; diff --git a/modules/reference/hardware/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix b/modules/reference/hardware/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix index 77cbb66f6..fbe475600 100644 --- a/modules/reference/hardware/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix +++ b/modules/reference/hardware/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix @@ -5,7 +5,8 @@ let cfg = config.ghaf.hardware.nvidia.orin.nx; in { - options.ghaf.hardware.nvidia.orin.nx.enableNetvmEthernetPCIPassthrough = lib.mkEnableOption "Ethernet card PCI passthrough to NetVM"; + options.ghaf.hardware.nvidia.orin.nx.enableNetvmEthernetPCIPassthrough = + lib.mkEnableOption "Ethernet card PCI passthrough to NetVM"; config = lib.mkIf cfg.enableNetvmEthernetPCIPassthrough { # Orin NX Ethernet card PCI Passthrough ghaf.hardware.nvidia.orin.enablePCIPassthroughCommon = true; diff --git a/modules/reference/hardware/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix index 56d447427..1d87430d0 100644 --- a/modules/reference/hardware/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix +++ b/modules/reference/hardware/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix @@ -5,7 +5,8 @@ let cfg = config.ghaf.hardware.nvidia.orin; in { - options.ghaf.hardware.nvidia.orin.enablePCIPassthroughCommon = lib.mkEnableOption "Enable common options related to PCI passthrough on Orin AGX and NX"; + options.ghaf.hardware.nvidia.orin.enablePCIPassthroughCommon = + lib.mkEnableOption "Enable common options related to PCI passthrough on Orin AGX and NX"; config = lib.mkIf cfg.enablePCIPassthroughCommon { boot.kernelModules = [ "vfio_pci" diff --git a/modules/reference/programs/google-chrome.nix b/modules/reference/programs/google-chrome.nix index 543f33a29..d6bd571a2 100644 --- a/modules/reference/programs/google-chrome.nix +++ b/modules/reference/programs/google-chrome.nix @@ -42,9 +42,8 @@ in Make sure the selected policy is supported on Linux and your browser version. ''; - default = - { - }; + default = { + }; example = lib.literalExpression '' { "BrowserSignin" = 0; diff --git a/modules/reference/services/proxy-server/3proxy-config.nix b/modules/reference/services/proxy-server/3proxy-config.nix index ed768070c..efa4f276c 100644 --- a/modules/reference/services/proxy-server/3proxy-config.nix +++ b/modules/reference/services/proxy-server/3proxy-config.nix @@ -90,9 +90,8 @@ in }; config = mkIf cfg.enable { - assertions = - [ - ]; + assertions = [ + ]; # Define a new group for proxy management users.groups.${proxyGroupName} = { }; # Create a group named proxy-admin @@ -100,7 +99,7 @@ in users.users.${proxyUserName} = { isSystemUser = true; description = "Proxy User for managing allowlist and services"; - # extraGroups = [ "${proxyGroupName}" ]; # Adding to 'proxy-admin' for specific access + # extraGroups = [ "${proxyGroupName}" ]; # Adding to 'proxy-admin' for specific access group = "${proxyGroupName}"; }; @@ -126,8 +125,8 @@ in polkit = { enable = true; debug = true; - # Polkit rules for allowing proxy-user to run proxy related systemctl - # commands without sudo and password requirement + # Polkit rules for allowing proxy-user to run proxy related systemctl + # commands without sudo and password requirement extraConfig = '' polkit.addRule(function(action, subject) { if ((action.id == "org.freedesktop.systemd1.manage-units" &&