Forráskód Böngészése

fix: trim whitespaces and nixfmt

Zander Hawke 1 napja
szülő
commit
4d853407a7
2 módosított fájl, 59 hozzáadás és 47 törlés
  1. 17 10
      hosts/odin/system/impermanence.nix
  2. 42 37
      packages/grist-core.nix

+ 17 - 10
hosts/odin/system/impermanence.nix

@@ -1,7 +1,8 @@
-{ config
-, inputs
-, pkgs
-, ...
+{
+  config,
+  inputs,
+  pkgs,
+  ...
 }:
 {
   imports = [
@@ -11,16 +12,22 @@
   boot.initrd.systemd.services.rollback-root = {
     description = "Rollback Btrfs root filesystem to a pristine state";
     wantedBy = [ "initrd.target" ];
-    
+
     # Run after the physical storage device node exists
-    after = [ "block-device-systemd-sysext.target" ]; 
+    after = [ "block-device-systemd-sysext.target" ];
     # Run strictly before the root partition gets mounted by stage 1
-    before = [ "sysroot.mount" ]; 
-    
+    before = [ "sysroot.mount" ];
+
     unitConfig.DefaultDependencies = "no";
-    
+
     # We explicitly include packages needed inside the initrd environment
-    path = with pkgs; [ btrfs-progs coreutils util-linux gawk gnugrep ];
+    path = with pkgs; [
+      btrfs-progs
+      coreutils
+      util-linux
+      gawk
+      gnugrep
+    ];
 
     serviceConfig = {
       Type = "oneshot";

+ 42 - 37
packages/grist-core.nix

@@ -1,23 +1,24 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, python3
-, fetchYarnDeps
-, yarn
-, nodejs
-, node-pre-gyp
-, node-gyp
-, prefetch-yarn-deps
-, fixup-yarn-lock
-, makeWrapper
-, gitUpdater
-, pkg-config
-, sqlite
-, apple-sdk
-, cctools
-, cacert
-, fetchPypi
-, python3Packages
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  python3,
+  fetchYarnDeps,
+  yarn,
+  nodejs,
+  node-pre-gyp,
+  node-gyp,
+  prefetch-yarn-deps,
+  fixup-yarn-lock,
+  makeWrapper,
+  gitUpdater,
+  pkg-config,
+  sqlite,
+  apple-sdk,
+  cctools,
+  cacert,
+  fetchPypi,
+  python3Packages,
 }:
 
 let
@@ -59,18 +60,20 @@ stdenv.mkDerivation rec {
     hash = "sha256-7zyuBxheftgCXGjjJ+rdwSslIro9IEd/uvmo4xp6I+Q=";
   };
 
-  gristPython = python3.withPackages (pkgs: with pkgs; [
-    friendly-traceback
-    openpyxl
-    astroid
-    roman
-    chardet
-    iso8601
-    phonenumberslite
-    python-dateutil
-    sortedcontainers
-    unittest-xml-reporting
-  ]);
+  gristPython = python3.withPackages (
+    pkgs: with pkgs; [
+      friendly-traceback
+      openpyxl
+      astroid
+      roman
+      chardet
+      iso8601
+      phonenumberslite
+      python-dateutil
+      sortedcontainers
+      unittest-xml-reporting
+    ]
+  );
 
   nativeBuildInputs = [
     yarn
@@ -82,13 +85,15 @@ stdenv.mkDerivation rec {
     makeWrapper
     pkg-config
     python3
-  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+  ]
+  ++ lib.optionals stdenv.hostPlatform.isDarwin [
     cctools
   ];
 
   buildInputs = [
     sqlite
-  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+  ]
+  ++ lib.optionals stdenv.hostPlatform.isDarwin [
     apple-sdk
   ];
 
@@ -158,13 +163,13 @@ stdenv.mkDerivation rec {
     rm -f $out/libexec/static/mocha.js
     rm -f $out/libexec/static/sinon.js
     rm -f $out/libexec/static/mocha.css
-    
+
     # Fix or remove broken symlinks
     find $out/libexec/bower_components -type l ! -exec test -e {} \; -delete
-    
+
     # Remove problematic .bin directories
     find $out/libexec/node_modules -name '.bin' -type d -print0 | xargs -0 rm -rf 2>/dev/null || true
-    
+
     # Fix ELF binaries in Python virtual environment using autoPatchelf
     if [ -d "$out/libexec/sandbox_venv3" ]; then
       find "$out/libexec/sandbox_venv3" -type f -executable \