From 3cdde044275253d4235361e1f517f62b67b5181f Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 22 May 2025 18:45:05 +0700 Subject: [PATCH] chore(nix): Upgrade nixpkgs to v25.05 --- nix/flake.lock | 60 ++++++++++++------------- nix/flake.nix | 6 +-- nix/modules/darwin/kanata.nix | 7 +-- nix/overlays/rclone-purego-update.patch | 28 ++++++++++++ nix/overlays/rclone.nix | 12 +++++ nix/systems/darwin/configuration.nix | 3 +- nix/systems/darwin/default.nix | 12 ++--- 7 files changed, 85 insertions(+), 43 deletions(-) create mode 100644 nix/overlays/rclone-purego-update.patch create mode 100644 nix/overlays/rclone.nix diff --git a/nix/flake.lock b/nix/flake.lock index 0a5ce4b..f682335 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -3,11 +3,11 @@ "brew-api": { "flake": false, "locked": { - "lastModified": 1746075301, - "narHash": "sha256-xT5nZclHg9+Gb3pdQKxX0/jU+UqWcDPFonJQxo/TrRo=", + "lastModified": 1747892672, + "narHash": "sha256-HV75WZVNeL5oYLU1Aacs5ljUVJnVxMDTuunOo1juiCk=", "owner": "null2264", "repo": "brew-api", - "rev": "2c5ff7f0c7e1626c5a750bbefbdf6461b013cb07", + "rev": "518da4e0acd9b086c572b02d013f01913ffb4385", "type": "github" }, "original": { @@ -59,11 +59,11 @@ ] }, "locked": { - "lastModified": 1746065253, - "narHash": "sha256-z7Dut9R0QC5Agwm1XsLt4vPnXHxx4pqUfymFGMqHF9Y=", + "lastModified": 1747879304, + "narHash": "sha256-iXI8RxUQAxz4tgdqyGN0J96G+GZTCzFNE23lMSar8Dw=", "owner": "null2264", "repo": "nixpkgs-firefox-darwin", - "rev": "7389895f4c21807c901ebd46c8148dc2082e0db6", + "rev": "f365f154dbec11b1401053fbf4fd62c9778842ac", "type": "github" }, "original": { @@ -174,16 +174,16 @@ ] }, "locked": { - "lastModified": 1745557122, - "narHash": "sha256-eqSo9ugzsqhFgaDFYUZj943nurlX4L6f+AW0skJ4W+M=", + "lastModified": 1747556831, + "narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=", "owner": "nix-community", "repo": "home-manager", - "rev": "dd26f75fb4ec1c731d4b1396eaf4439ce40a91c1", + "rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } @@ -195,16 +195,16 @@ ] }, "locked": { - "lastModified": 1743127615, - "narHash": "sha256-+sMGqywrSr50BGMLMeY789mSrzjkoxZiu61eWjYS/8o=", + "lastModified": 1747752302, + "narHash": "sha256-XqNAcEFfe5tJZGlx+Su0G67ZwRwZmHNWwiMK0fji0Hw=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "fc843893cecc1838a59713ee3e50e9e7edc6207c", + "rev": "74ecd01d2c122f8a4a48066ab1d48f3e01671671", "type": "github" }, "original": { "owner": "LnL7", - "ref": "nix-darwin-24.11", + "ref": "nix-darwin-25.05", "repo": "nix-darwin", "type": "github" } @@ -232,11 +232,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1745930157, - "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -248,16 +248,16 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1746069537, - "narHash": "sha256-qe94CgYtR2ocfwIJtXxNvXKWpSVyxN30EAjaVifIXOg=", + "lastModified": 1747903122, + "narHash": "sha256-8QGbZZBlUpTXLb3GrMZX3lSl2KBnuOwDsrakdO/NGUA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a8b61905f62148cded3513de89f4aea40ccb3e4b", + "rev": "fe9e37d756d2523ae7398512d66e435701e06b9e", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "nixpkgs", "type": "github" } @@ -280,11 +280,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1746074953, - "narHash": "sha256-3cUxUo0KO5rr8v2dhDHrcVbUXiKoxu19xKlrjtIdhWQ=", + "lastModified": 1747903300, + "narHash": "sha256-Iifnh7KqAXAe3jbiFnW55OLuFmnK04QwKjrAAmb3QpU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfbc694c826a0ef02625aa544a97e06705e0ba7d", + "rev": "fece391c3143144350a0025c1c6ba34404bfc9ab", "type": "github" }, "original": { @@ -301,11 +301,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1746072313, - "narHash": "sha256-yOs7FBbds9EGvriM+Jc7il7w31LZwuIPYZCi+fkvXEY=", + "lastModified": 1747897979, + "narHash": "sha256-fWXSzuYKtZAhbPt9D5wUEJi6YDfWubSNyzywS+uor2k=", "owner": "nix-community", "repo": "NUR", - "rev": "88952868f3b10fc704e5ce4936fba9d2104ca1d4", + "rev": "83e3c7a2d3f5b90d381eb1951f13588daa2ec8af", "type": "github" }, "original": { @@ -381,11 +381,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1745983288, - "narHash": "sha256-XUNZDucHnw5SpTG3iJ8xrc6vGdVaP/5jlWErVjOdl/4=", + "lastModified": 1747607404, + "narHash": "sha256-xj2Ji+rE+oYjf0BsTDT7K/StnYuZQK9MTbX8U1DUcC0=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "96d7adda80b8bfc06fc0669b68a40feb2339fa95", + "rev": "8c1be0e5e9a7f35ccd6f7b10bcfa08f2734dad91", "type": "github" }, "original": { diff --git a/nix/flake.nix b/nix/flake.nix index be5b7b4..eada3c2 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -40,7 +40,7 @@ # FIXME: p11-kit failed to build. Probably due to them focusing on Linux for iteration 6. # # REF: https://github.com/NixOS/nixpkgs/pull/352800 -> "Let's consider this one Linux-only." - nixpkgs-stable.url = "github:NixOS/nixpkgs/release-24.11"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/release-25.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/master"; nur.url = "github:nix-community/NUR"; @@ -52,12 +52,12 @@ }; home-manager = { - url = "github:nix-community/home-manager/release-24.11"; + url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; nix-darwin = { - url = "github:LnL7/nix-darwin/nix-darwin-24.11"; + url = "github:LnL7/nix-darwin/nix-darwin-25.05"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; firefox-darwin = { diff --git a/nix/modules/darwin/kanata.nix b/nix/modules/darwin/kanata.nix index 693284b..51ebf31 100644 --- a/nix/modules/darwin/kanata.nix +++ b/nix/modules/darwin/kanata.nix @@ -1,8 +1,9 @@ -{ user }: - { pkgs, ... }: -{ +let + # Figure out how to do multi-user here now that nix-darwin forced you to use root + user = "ziro"; +in { launchd.user.agents.kanata = { command = "/usr/bin/sudo ${pkgs.kanata}/bin/kanata -c ${../../../include/kanata.kbd} -n"; serviceConfig = { diff --git a/nix/overlays/rclone-purego-update.patch b/nix/overlays/rclone-purego-update.patch new file mode 100644 index 0000000..b936c1c --- /dev/null +++ b/nix/overlays/rclone-purego-update.patch @@ -0,0 +1,28 @@ +diff --git a/go.mod b/go.mod +index f4d830b89..af23fc0d9 100644 +--- a/go.mod ++++ b/go.mod +@@ -134,7 +134,7 @@ require ( + github.com/cronokirby/saferith v0.33.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dustin/go-humanize v1.0.1 // indirect +- github.com/ebitengine/purego v0.8.1 // indirect ++ github.com/ebitengine/purego v0.8.3 // indirect + github.com/emersion/go-message v0.18.0 // indirect + github.com/emersion/go-textwrapper v0.0.0-20200911093747-65d896831594 // indirect + github.com/emersion/go-vcard v0.0.0-20230815062825-8fda7d206ec9 // indirect +diff --git a/go.sum b/go.sum +index 06a76c5ef..28b4dddbe 100644 +--- a/go.sum ++++ b/go.sum +@@ -213,8 +213,8 @@ github.com/dsnet/try v0.0.3/go.mod h1:WBM8tRpUmnXXhY1U6/S8dt6UWdHTQ7y8A5YSkRCkq4 + github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= + github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= + github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +-github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= +-github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= ++github.com/ebitengine/purego v0.8.3 h1:K+0AjQp63JEZTEMZiwsI9g0+hAMNohwUOtY0RPGexmc= ++github.com/ebitengine/purego v0.8.3/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= + github.com/emersion/go-message v0.18.0 h1:7LxAXHRpSeoO/Wom3ZApVZYG7c3d17yCScYce8WiXA8= + github.com/emersion/go-message v0.18.0/go.mod h1:Zi69ACvzaoV/MBnrxfVBPV3xWEuCmC2nEN39oJF4B8A= + github.com/emersion/go-textwrapper v0.0.0-20200911093747-65d896831594 h1:IbFBtwoTQyw0fIM5xv1HF+Y+3ZijDR839WMulgxCcUY= diff --git a/nix/overlays/rclone.nix b/nix/overlays/rclone.nix new file mode 100644 index 0000000..d5ae6f4 --- /dev/null +++ b/nix/overlays/rclone.nix @@ -0,0 +1,12 @@ +# FIXME: Remove later +final: prev: + +{ + rclone = prev.rclone.overrideAttrs (old: { + patches = [ + ./rclone-purego-update.patch + ]; + + vendorHash = "sha256-HtwGNySjRzWH7e9rO+Ixwc3L3tHQP2z5QQuTFO6pdUc="; + }); +} diff --git a/nix/systems/darwin/configuration.nix b/nix/systems/darwin/configuration.nix index b5a8a03..1d9e42f 100644 --- a/nix/systems/darwin/configuration.nix +++ b/nix/systems/darwin/configuration.nix @@ -86,8 +86,8 @@ in { ''; # Auto upgrade nix package and the daemon service. - services.nix-daemon.enable = true; nix = { + enable = true; package = pkgs.nix; settings.experimental-features = "nix-command flakes"; # stopping nix from crying about using experimental features flakes and nix-command nixPath = [ "nixpkgs=/run/current-system/sw/nixpkgs" ]; @@ -110,6 +110,7 @@ in { # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system = { + primaryUser = "ziro"; stateVersion = 4; # Nix-darwin does not link installed applications to the user environment. This means apps will not show up # in spotlight, and when launched through the dock they come with a terminal window. This is a workaround. diff --git a/nix/systems/darwin/default.nix b/nix/systems/darwin/default.nix index 4de4ed5..82396c7 100644 --- a/nix/systems/darwin/default.nix +++ b/nix/systems/darwin/default.nix @@ -4,10 +4,6 @@ let mkCommon = import ../../lib/mkCommon.nix; mkSystem = import ../../lib/mkSystem.nix; mkBrew = import ../../overlays/darwin/brew.nix; - - kanataModules = [ - (import ../../modules/darwin/kanata.nix { user = "ziro"; }) - ]; in { # Host list @@ -30,6 +26,7 @@ in (import ../../overlays/darwin/heliport.nix) (import ../../overlays/darwin/kanata.nix) (import ../../overlays/vesktop.nix) + (import ../../overlays/rclone.nix) # FIXME: Remove later ]; nur = nur; } @@ -43,8 +40,9 @@ in modules = [ inputs.spicetify-nix.nixosModules.default # Also works on nix-darwin thanks to it being nixosConfiguration replacement for macOS ./configuration.nix + ../../modules/darwin/kanata.nix #../../modules/darwin/dnscrypt.nix - ] ++ kanataModules; + ]; }; # Imaginary M1, just for reference @@ -61,6 +59,7 @@ in (mkBrew { inherit system brew-api; nixpkgs = nixpkgs-stable; }) (import ../../overlays/darwin/kanata.nix) (import ../../overlays/vesktop.nix) + (import ../../overlays/rclone.nix) # FIXME: Remove later ]; nur = nur; } @@ -74,7 +73,8 @@ in modules = [ inputs.spicetify-nix.nixosModules.default ./configuration.nix + ../../modules/darwin/kanata.nix #../../modules/darwin/dnscrypt.nix - ] ++ kanataModules; + ]; }; }