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

feat(odin): update to 26.05

Zander Hawke 6 napja
szülő
commit
74973f13ba

+ 30 - 30
flake.lock

@@ -102,11 +102,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1780789116,
-        "narHash": "sha256-+/LcDMJGYQVLp3ECZ1jBhj3GcQU+Yt+OTsDsQFz8cMs=",
+        "lastModified": 1781190061,
+        "narHash": "sha256-QRMpLbsmlciMGv4yx75FUoIl54K02JbIX1tgdPHPw1s=",
         "owner": "lnl7",
         "repo": "nix-darwin",
-        "rev": "731951a251ca96cbd12a8e1bde63737e21947644",
+        "rev": "f2b3fdb347f91dfd344ad196666a0b0fe8aad05c",
         "type": "github"
       },
       "original": {
@@ -132,11 +132,11 @@
         "rust-overlay": "rust-overlay"
       },
       "locked": {
-        "lastModified": 1781041252,
-        "narHash": "sha256-i25K7cJKTkVWRgMLPQt2UI7E9TxyepRfkGnTT0LfxPM=",
+        "lastModified": 1781538852,
+        "narHash": "sha256-eALw5HvwZMNrP2++x3fv9j8WR/yuBTmcgeqcB0ZY8LU=",
         "owner": "cachix",
         "repo": "devenv",
-        "rev": "4ec8cee2f960a44dff75b70fe7ab9b2428bc2c6e",
+        "rev": "78279726f86be1b575cca66d082a0ac032d617d4",
         "type": "github"
       },
       "original": {
@@ -152,11 +152,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1780894562,
-        "narHash": "sha256-c3430xwxwhHipl3jigUGMMBfpaMylDqytW/kdmB3ZGs=",
+        "lastModified": 1781152676,
+        "narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=",
         "owner": "nix-community",
         "repo": "disko",
-        "rev": "24fed06cac83bcc44ac8efbb57cab1a82fa0bedc",
+        "rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
         "type": "github"
       },
       "original": {
@@ -173,11 +173,11 @@
       },
       "locked": {
         "dir": "pkgs/firefox-addons",
-        "lastModified": 1781064146,
-        "narHash": "sha256-HjjvV8nCE6/sTgghlTW1ht8Rs3VZB55tV8wWces8DwY=",
+        "lastModified": 1781409739,
+        "narHash": "sha256-6dadOVlqPpjy0w4WuwvX+Qx0Kkaabm3tahMrCrr72Rg=",
         "owner": "rycee",
         "repo": "nur-expressions",
-        "rev": "5213e7922ccfed3b070bf125c103504bc37852eb",
+        "rev": "ef56de5faccb3ac59d95aa31cce551ff72e35bed",
         "type": "gitlab"
       },
       "original": {
@@ -396,11 +396,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1781063120,
-        "narHash": "sha256-1UIF/mDJluwJQjmmcZ2j1L2+mjYsefe82QCLj0TYSOg=",
+        "lastModified": 1781319724,
+        "narHash": "sha256-ZGuxexEMo4Xv28KJ0dX/m/PHN4oZIOnxHZpNTyrvx4M=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "baa46aeb6d02e0ba13de67cd35e3d57aedfacf01",
+        "rev": "8355f0a16b2dbb06a97959a918af5b239bbe05ae",
         "type": "github"
       },
       "original": {
@@ -549,11 +549,11 @@
     },
     "nixpkgs-darwin": {
       "locked": {
-        "lastModified": 1780773863,
-        "narHash": "sha256-t0AXyb11HJHwyRkCed8y15unmgwVlbgcIEVdV1XxYvA=",
+        "lastModified": 1781236690,
+        "narHash": "sha256-ox8n9kxKUnMP2Q9sq2NWul2lOUzNFwlvlCVtH4hP0hY=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "20872773637de0b44f7ac04cde2098db1286e6d5",
+        "rev": "b5e61da309336bdba24f964dce712a5ab8e0092e",
         "type": "github"
       },
       "original": {
@@ -565,11 +565,11 @@
     },
     "nixpkgs-unstable": {
       "locked": {
-        "lastModified": 1780930886,
-        "narHash": "sha256-rppURzHviaQN131F+nLiLdGfcb0uCd9gGP0E5+iw9MI=",
+        "lastModified": 1781454065,
+        "narHash": "sha256-d2xfDjnfRuf/xYGdu9VVRHiav/2w5hDL/5cw2TuVAXw=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "8c3cede7ddc26bd659d2d383b5610efbd2c7a16e",
+        "rev": "9eac87a12312b8f60dd52e1c6e1a265f6fc7f5fc",
         "type": "github"
       },
       "original": {
@@ -581,11 +581,11 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1780902259,
-        "narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=",
+        "lastModified": 1781216227,
+        "narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca",
+        "rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0",
         "type": "github"
       },
       "original": {
@@ -618,11 +618,11 @@
         "systems": "systems_2"
       },
       "locked": {
-        "lastModified": 1781038653,
-        "narHash": "sha256-MxUVyE7A5QMJXOEFQhOHsqs4UPhujeDgdFhguE7Wmic=",
+        "lastModified": 1781531135,
+        "narHash": "sha256-3KSvmSd9v143GHQKb8yFytNBSc5oSJEJrhoPoOoPEp8=",
         "owner": "nix-community",
         "repo": "nixvim",
-        "rev": "e7ce6708cc5b6275406a8feee06ca50c5cafd6bf",
+        "rev": "7c091e01995bc95aedc770c58f28ac96c0eea824",
         "type": "github"
       },
       "original": {
@@ -749,11 +749,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1780957638,
-        "narHash": "sha256-NQ0WpkNDRR79BWGNmh1dpgchGJnALW7De71kaXD87nc=",
+        "lastModified": 1781426426,
+        "narHash": "sha256-yzxJMNgv/sLishhCT9G2lm7W9CjHSlXWkfbWC7vfjqc=",
         "owner": "0xc000022070",
         "repo": "zen-browser-flake",
-        "rev": "fc9b27eb5585548282004fac3f0d34fcf2f06467",
+        "rev": "df336067c1a8af3bfce3f0b88b66dc1c57411b4e",
         "type": "github"
       },
       "original": {

+ 3 - 3
home/features/nvim/default.nix

@@ -9,9 +9,9 @@
 
   home.packages = [ pkgs.unstable.opencode ];
 
-  programs.fish.interactiveShellInit = ''
-    set OPENROUTER_API_KEY $(cat ${config.age.secrets."meili/openrouter".path})
-  '';
+  # programs.fish.interactiveShellInit = ''
+  #   set OPENROUTER_API_KEY $(cat ${config.age.secrets."meili/openrouter".path})
+  # '';
 
   programs.nixvim = {
     enable = true;

+ 1 - 1
hosts/odin/services/caddy.nix

@@ -5,7 +5,7 @@
 
     package = pkgs.caddy.withPlugins {
       plugins = [ "github.com/caddy-dns/[email protected]" ];
-      hash = "sha256-mkOi+t1bDwSSh7TW0xVPfWPjLEi7vrGcO8VIkkGTVlM=";
+      hash = "sha256-I0FjQOfFaGlOEJlQECmYNBKjIY4CIg5aCCQ/ORmnrSU=";
     };
 
     environmentFile = config.age.secrets."odin/services/caddy".path;

+ 83 - 64
hosts/odin/system/impermanence.nix

@@ -1,6 +1,6 @@
 { config
 , inputs
-, lib
+, pkgs
 , ...
 }:
 {
@@ -8,76 +8,95 @@
     inputs.impermanence.nixosModules.impermanence
   ];
 
-  boot.initrd.postDeviceCommands = lib.mkAfter ''
-    #!/bin/sh
-    DEVICE=${config.disko.devices.disk.main.device}-part2
+  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" ]; 
+    # Run strictly before the root partition gets mounted by stage 1
+    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 ];
 
-    # Mount Btrfs root
-    mkdir -p /mnt
-    if ! mount -o subvol=/ $DEVICE /mnt; then
-      echo "Failed to mount $DEVICE at /mnt"
-      exit 1
-    fi
+    serviceConfig = {
+      Type = "oneshot";
+      RemainAfterExit = true;
+      ExecStart = pkgs.writeShellScript "rollback-root-script" ''
+        set -e
+        DEVICE="${config.disko.devices.disk.main.device}-part2"
 
-    # Create directory for old roots
-    mkdir -p /mnt/old-roots
+        # Mount Btrfs root
+        mkdir -p /mnt
+        if ! mount -o subvol=/ "$DEVICE" /mnt; then
+          echo "Failed to mount $DEVICE at /mnt"
+          exit 1
+        fi
 
-    # Move current root to old-roots with current timestamp
-    if [[ -e /mnt/@root ]]; then
-      timestamp=$(date +%Y-%m-%d_%H:%M:%S)
-      if ! btrfs subvolume snapshot -r /mnt/@root "/mnt/old-roots/@root-$timestamp"; then
-        echo "Failed to move /mnt/@root to old-roots"
-        umount /mnt
-        exit 1
-      fi
-    fi
+        # Create directory for old roots
+        mkdir -p /mnt/old-roots
 
-    # Function to recursively delete subvolumes
-    delete_subvolume_recursively() {
-      for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
-        delete_subvolume_recursively "/mnt/$i"
-      done
-      if ! btrfs subvolume delete "$1"; then
-        echo "Failed to delete subvolume $1"
-      fi
-    }
+        # Move current root to old-roots with current timestamp
+        if [[ -e /mnt/@root ]]; then
+          timestamp=$(date +%Y-%m-%d_%H:%M:%S)
+          if ! btrfs subvolume snapshot -r /mnt/@root "/mnt/old-roots/@root-$timestamp"; then
+            echo "Failed to move /mnt/@root to old-roots"
+            umount /mnt
+            exit 1
+          fi
+        fi
 
-    # Delete old roots more than 5
-    index=0
-    for i in $(btrfs subvolume list /mnt | grep 'old-roots/@root-' | cut -f 9- -d ' ' | sort -r); do
-      if [[ $index -ge 5 ]]; then
-        delete_subvolume_recursively "/mnt/$i"
-      fi
-      index=$((index + 1))
-    done
+        # Function to recursively delete subvolumes
+        delete_subvolume_recursively() {
+          for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
+            delete_subvolume_recursively "/mnt/$i"
+          done
+          if ! btrfs subvolume delete "$1"; then
+            echo "Failed to delete subvolume $1"
+          fi
+        }
 
-    # Create or restore fresh root
-    if [[ -e /mnt/@root-blank ]]; then
-      delete_subvolume_recursively /mnt/@root
-      if ! btrfs subvolume snapshot /mnt/@root-blank /mnt/@root; then
-        echo "Failed to snapshot @root-blank to @root"
-        umount /mnt
-        exit 1
-      fi
-    else
-      if ! btrfs subvolume create /mnt/@root-blank; then
-        echo "Failed to create @root-blank"
-        umount /mnt
-        exit 1
-      fi
-      if ! btrfs subvolume create /mnt/@root; then
-        echo "Failed to create @root"
-        umount /mnt
-        exit 1
-      fi
-    fi
+        # Delete old roots more than 5
+        index=0
+        for i in $(btrfs subvolume list /mnt | grep 'old-roots/@root-' | cut -f 9- -d ' ' | sort -r); do
+          if [[ $index -ge 5 ]]; then
+            delete_subvolume_recursively "/mnt/$i"
+          fi
+          index=$((index + 1))
+        done
 
-    # Unmount
-    if ! umount /mnt; then
-      echo "Failed to unmount /mnt"
-      exit 1
-    fi
-  '';
+        # Create or restore fresh root
+        if [[ -e /mnt/@root-blank ]]; then
+          delete_subvolume_recursively /mnt/@root
+          if ! btrfs subvolume snapshot /mnt/@root-blank /mnt/@root; then
+            echo "Failed to snapshot @root-blank to @root"
+            umount /mnt
+            exit 1
+          fi
+        else
+          if ! btrfs subvolume create /mnt/@root-blank; then
+            echo "Failed to create @root-blank"
+            umount /mnt
+            exit 1
+          fi
+          if ! btrfs subvolume create /mnt/@root; then
+            echo "Failed to create @root"
+            umount /mnt
+            exit 1
+          fi
+        fi
+
+        # Unmount
+        if ! umount /mnt; then
+          echo "Failed to unmount /mnt"
+          exit 1
+        fi
+      '';
+    };
+  };
 
   # Persistent directories for impermanence
   fileSystems."/persist".neededForBoot = true;

+ 10 - 5
packages/grist-core/default.nix

@@ -5,6 +5,9 @@
 , fetchYarnDeps
 , yarn
 , nodejs
+, node-pre-gyp
+, node-gyp
+, node-gyp-build
 , prefetch-yarn-deps
 , fixup-yarn-lock
 , makeWrapper
@@ -43,18 +46,18 @@ in
 
 stdenv.mkDerivation rec {
   pname = "grist-core";
-  version = "1.7.8";
+  version = "1.7.15";
 
   src = fetchFromGitHub {
     owner = "gristlabs";
     repo = "grist-core";
     tag = "v${version}";
-    hash = "sha256-e68PtWdlgKdjCj97fp+Rh3WwwwIcvKSXlx4Ry1qUeLg=";
+    hash = "sha256-NOD2TOYcOXG+VmJBtg555cuHAS4neGvJKLYuOrdXXLE=";
   };
 
   offlineCache = fetchYarnDeps {
     yarnLock = "${src}/yarn.lock";
-    hash = "sha256-7zyuBxheftgCXGjjJ+rdwSslIro9IEd/uvmo4xp6I+Q=";
+    hash = "sha256-OvJMfHlToOJkPe8wP3zGRXvqHr4mhO1wGVKrec9Q/h4=";
   };
 
   gristPython = python3.withPackages (pkgs: with pkgs; [
@@ -73,7 +76,9 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     yarn
     nodejs
-    nodejs.pkgs.node-pre-gyp
+    node-pre-gyp
+    node-gyp
+    node-gyp-build
     prefetch-yarn-deps
     fixup-yarn-lock
     makeWrapper
@@ -117,7 +122,7 @@ stdenv.mkDerivation rec {
     fixup-yarn-lock yarn.lock
 
     yarn config --offline set yarn-offline-mirror ${offlineCache}
-    yarn --offline --frozen-lockfile --ignore-platform --ignore-engines --no-progress --non-interactive install
+    yarn --offline --frozen-lockfile --ignore-platform --ignore-engines --no-progress --non-interactive --ignore-scripts install
 
     patchShebangs node_modules
     patchShebangs buildtools