From 158dbbfd3b28633f27ec02c60ca0ebbe9cca026f Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Fri, 1 Mar 2024 01:21:06 +0800 Subject: [PATCH] flake: update lock file, switch to `nixpkgs-unstable` --- flake.lock | 62 +++++++++---------- flake.nix | 12 ++-- .../common/graphical/home/scripts/default.nix | 8 ++- overlays/sway/_1.8.nix | 13 ++-- 4 files changed, 54 insertions(+), 41 deletions(-) diff --git a/flake.lock b/flake.lock index 994fd0a..fe5d0bb 100755 --- a/flake.lock +++ b/flake.lock @@ -105,11 +105,11 @@ ] }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1709126324, + "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "d465f4819400de7c8d874d50b982301f28a84605", "type": "github" }, "original": { @@ -145,11 +145,11 @@ ] }, "locked": { - "lastModified": 1708988456, - "narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=", + "lastModified": 1709204054, + "narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=", "owner": "nix-community", "repo": "home-manager", - "rev": "1d085ea4444d26aa52297758b333b449b2aa6fca", + "rev": "2f3367769a93b226c467551315e9e270c3f78b15", "type": "github" }, "original": { @@ -241,11 +241,11 @@ ] }, "locked": { - "lastModified": 1709001452, - "narHash": "sha256-FnZ54wkil54hKvr1irdKic1TE27lHQI9dKQmOJRrtlU=", + "lastModified": 1709112925, + "narHash": "sha256-5y8Dhw1HYdc+BWv+qQjJUIwc+ByoudtoGaHEcrXYlXw=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "6c06334f0843c7300d1678726bb607ce526f6b36", + "rev": "283d59778e6b8c41cac4bdeac5b2512d6de51150", "type": "github" }, "original": { @@ -264,11 +264,11 @@ ] }, "locked": { - "lastModified": 1709045095, - "narHash": "sha256-6PeSdkt9Ey2k6yrRBpTFgS3RxTjyhRHZlR8hhy38xfQ=", + "lastModified": 1709168939, + "narHash": "sha256-btWt7NRsA8Hysgin5su77nIdmZZbxsKW5qqyj/bBlF0=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "75625623631c294604b48035db5d95fe8ff08ef3", + "rev": "22586cc4910284c9c7306f19dcd63ac0adbcbcc9", "type": "github" }, "original": { @@ -284,11 +284,11 @@ ] }, "locked": { - "lastModified": 1709069953, - "narHash": "sha256-eEddO7WxkU3PAt1LG5jXViT2Obue34+d5FhTObdbeIU=", + "lastModified": 1709156363, + "narHash": "sha256-syrzpHREwzhdlt88mL/gjNcbbHuYD470e0fjFyhZ0ho=", "owner": "jacekszymanski", "repo": "nixcasks", - "rev": "ebe5830f8bb66fa0e3ba186aca7de011b1cc17ea", + "rev": "012549dd04474182308b18991538840455ad62aa", "type": "github" }, "original": { @@ -299,11 +299,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1709110011, - "narHash": "sha256-vBekA+h/9sCI3Sh3ES7a9wnyMbC1OjmewlcQFVz8sgc=", + "lastModified": 1709147990, + "narHash": "sha256-vpXMWoaCtMYJ7lisJedCRhQG9BSsInEyZnnG5GfY9tQ=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "a597c4ad63e1ca2e3caec7a4e7c35688a77498c0", + "rev": "33a97b5814d36ddd65ad678ad07ce43b1a67f159", "type": "github" }, "original": { @@ -314,27 +314,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1708984720, - "narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=", + "lastModified": 1709200309, + "narHash": "sha256-lKdtMbhnBNU1lr978T+wEYet3sfIXXgyiDZNEgx8CV8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538", + "rev": "ebe6e807793e7c9cc59cf81225fdee1a03413811", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1708979614, - "narHash": "sha256-FWLWmYojIg6TeqxSnHkKpHu5SGnFP5um1uUjH+wRV6g=", + "lastModified": 1709128929, + "narHash": "sha256-GWrv9a+AgGhG4/eI/CyVVIIygia7cEy68Huv3P8oyaw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b7ee09cf5614b02d289cd86fcfa6f24d4e078c2a", + "rev": "c8e74c2f83fe12b4e5a8bd1abbc090575b0f7611", "type": "github" }, "original": { @@ -346,11 +346,11 @@ }, "nur": { "locked": { - "lastModified": 1709109148, - "narHash": "sha256-mTIc7qt1S4aBeDtcKMKHh781bghhkvIvHzI9VO+u4Jw=", + "lastModified": 1709225079, + "narHash": "sha256-2bmOKg/aIgmguPZz3OwjG5lCAGaLwM9ubBkXjcp7edU=", "owner": "nix-community", "repo": "NUR", - "rev": "01d877e55d2113ab72bb5fbb66dc9c53c80c1024", + "rev": "c52cf9478c981de340151638d76c3c2371eb9ebe", "type": "github" }, "original": { @@ -455,11 +455,11 @@ ] }, "locked": { - "lastModified": 1709086241, - "narHash": "sha256-3QHK5zu/5XOa+ghBeKzvt+/BLdEPjw/xDNLcpDfbkmg=", + "lastModified": 1709172595, + "narHash": "sha256-0oYeE5VkhnPA7YBl+0Utq2cYoHcfsEhSGwraCa27Vs8=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "5d56056fb905ff550ee61b6ebb6674d494f57a9e", + "rev": "72fa0217f76020ad3aeb2dd9dd72490905b23b6f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 3dab115..c24d522 100755 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,14 @@ description = "Guanran928's Flake"; inputs = { - # Flake inputs - ## Nixpkgs - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + # INFO: `nixos-unstable` and `nixpkgs-unstable` contains the same set of packages, + # the difference between those channels is their jobsets, + # `nixpkgs-unstable` contains less(?) jobs, and usually updates faster. + # + # REFERENCE: https://discourse.nixos.org/t/differences-between-nix-channels/13998/5 + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11"; - ## Flakes berberman = { url = "github:berberman/flakes"; inputs.nixpkgs.follows = "nixpkgs"; @@ -75,7 +77,7 @@ }; systems.url = "github:nix-systems/default"; - ### De-dupe + ### De-dupe flake dependencies crane = { url = "github:ipetkov/crane"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/nixos/profiles/common/graphical/home/scripts/default.nix b/nixos/profiles/common/graphical/home/scripts/default.nix index 711c76b..7c6f433 100644 --- a/nixos/profiles/common/graphical/home/scripts/default.nix +++ b/nixos/profiles/common/graphical/home/scripts/default.nix @@ -40,7 +40,13 @@ in { url = "https://raw.githubusercontent.com/nwg-piotr/nwg-shell/c29e8eb4658a2613fb221ead0b101c75f457bcaf/scripts/screenshot"; hash = "sha256-Z/fWloz8pLHsvPTPOeBxnbMsGDRTY3G3l/uePQ3ZxjU="; }; - replacements = ["--replace-warn" "DIR=\${SCREENSHOT_DIR:=$HOME/Screenshots}" "DIR=$HOME/Pictures/Screenshots"]; # i dont like using an environment variable + + # i dont like using an environment variable + substitutions = [ + "--replace-warn" + "DIR=\${SCREENSHOT_DIR:=$HOME/Screenshots}" + "DIR=$HOME/Pictures/Screenshots" + ]; }; }) ]; diff --git a/overlays/sway/_1.8.nix b/overlays/sway/_1.8.nix index ef48dbe..48465a6 100644 --- a/overlays/sway/_1.8.nix +++ b/overlays/sway/_1.8.nix @@ -9,11 +9,16 @@ # Tray D-Bus Menu # https://github.com/swaywm/sway/pull/6249 - (prev.runCommand "2f304ef0532a45d00b2ec2c7fc63adef0aec7607.patch" {} '' - cat ${prev.fetchpatch { + (prev.substitute { + src = prev.fetchpatch { url = "https://github.com/swaywm/sway/commit/2f304ef0532a45d00b2ec2c7fc63adef0aec7607.patch"; hash = "sha256-nd+Z6A7GE5Go7QxXOI+hiLWQiXegsQatcNfxEsXgamI="; - }} | sed "s/int surface_x, surface_y, surface_width, surface_height;/int surface_x, surface_y, surface_width, surface_height = 0;/g" > $out - '') + }; + substitutions = [ + "--replace-warn" + "int surface_x, surface_y, surface_width, surface_height;" + "int surface_x, surface_y, surface_width, surface_height = 0;" + ]; + }) ]; }