From b246589229e7c485b9a87dc2d710bf8b30f456e0 Mon Sep 17 00:00:00 2001 From: harukafractus <106440141+harukafractus@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:05:45 +1030 Subject: [PATCH] update --- README.md | 5 +- .../{darwin-configuration.nix => darwin.nix} | 30 ++--- configs/{home-manager.nix => home.nix} | 51 ++++---- flake.lock | 122 ++---------------- flake.nix | 42 ++++-- nur-everything/ci.nix | 44 ++++--- nur-everything/flake.nix | 12 +- nur-everything/lib/default.nix | 3 +- nur-everything/overlay.nix | 12 +- nur-everything/overlays/mac-apps/default.nix | 54 ++++---- nur-everything/overlays/mac-apps/src.json | 54 ++++---- nur-everything/overlays/mac-apps/update.nix | 96 +++++++------- 12 files changed, 227 insertions(+), 298 deletions(-) rename configs/{darwin-configuration.nix => darwin.nix} (80%) rename configs/{home-manager.nix => home.nix} (71%) mode change 100755 => 100644 flake.lock diff --git a/README.md b/README.md index 87afec0..339c06f 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,7 @@ NUR: [![Build and populate cache](https://github.com/harukafractus/nix/actions/w ### Darwin -> nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake .#[device_name] \ No newline at end of file +> nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake .#[device_name] + +### Standalone Home Manager +> nix run home-manager/master -- switch --flake [dir] \ No newline at end of file diff --git a/configs/darwin-configuration.nix b/configs/darwin.nix similarity index 80% rename from configs/darwin-configuration.nix rename to configs/darwin.nix index 443bd5c..113eae2 100755 --- a/configs/darwin-configuration.nix +++ b/configs/darwin.nix @@ -1,6 +1,7 @@ -{ pkgs, home-manager, ... }: +{ mac-hostname, username }: +{ pkgs, home-manager, ... }: { + networking.hostName = mac-hostname; -{ nixpkgs.overlays = [ (import ../nur-everything/overlays/mac-apps) ]; # List packages installed in system profile. To search by name, run: @@ -20,7 +21,7 @@ sol python3Full libreoffice-bin - #standardnotes + imagemagick ]; # Enable trackpad tap to click @@ -35,9 +36,7 @@ system.defaults.CustomUserPreferences = { # Enable Debug Menu - NSGlobalDomain = { - _NS_4445425547 = true; - }; + NSGlobalDomain = { _NS_4445425547 = true; }; # Disable .DS_Store Writing "com.apple.desktopservices" = { @@ -52,16 +51,13 @@ FXEnableExtensionChangeWarning = false; # Changing file extension warning }; # Show battery percentage - "com.apple.controlcenter.plist" = { - BatteryShowPercentage = true; - }; + "com.apple.controlcenter.plist" = { BatteryShowPercentage = true; }; }; - - # Define user `haruka` - users.users.haruka = { - name = "haruka"; - home = "/Users/haruka"; + # Define user + users.users.${username} = { + name = username; + home = "/Users/${username}"; }; # Configure zsh as an interactive shell. @@ -70,9 +66,7 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - users.haruka = import ( - ./home-manager.nix - ); + users.${username} = import (./home.nix { inherit username; }); }; # Enable flakes and optimise store during every build @@ -86,5 +80,5 @@ # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; - nix.package = pkgs.nix; + nix.package = pkgs.nix; } diff --git a/configs/home-manager.nix b/configs/home.nix similarity index 71% rename from configs/home-manager.nix rename to configs/home.nix index effa420..75b23e3 100755 --- a/configs/home-manager.nix +++ b/configs/home.nix @@ -1,11 +1,13 @@ +{ username }: { pkgs, config, lib, ... }: { home = { - username = "haruka"; - homeDirectory = "/Users/haruka"; + username = username; + homeDirectory = if pkgs.stdenv.isDarwin then + "/Users/${username}" + else + "/home/${username}"; stateVersion = "24.11"; - shellAliases = { - gc = "sudo nix-collect-garbage -d"; - }; + shellAliases = { gc = "sudo nix-collect-garbage -d; nix-collect-garbage -d"; }; }; home.file.".nanorc" = { @@ -16,20 +18,14 @@ programs.git = { enable = true; extraConfig = { - init = { - defaultBranch = "main"; - }; + init = { defaultBranch = "main"; }; user = { email = "106440141+harukafractus@users.noreply.github.com"; name = "harukafractus"; signingkey = "~/.ssh/id_rsa.pub"; }; - gpg = { - format = "ssh"; - }; - commit = { - gpgSign = true; - }; + gpg = { format = "ssh"; }; + commit = { gpgSign = true; }; }; }; @@ -40,7 +36,7 @@ source-han-sans source-han-mono source-han-serif - source-han-code-jp + source-han-code-jp meslo-lgs-nf fortune-kind cowsay @@ -71,8 +67,6 @@ }; }; - - dconf.settings = if pkgs.stdenv.isLinux then { "org/gnome/desktop/peripherals/touchpad" = { "natural-scroll" = false; @@ -84,15 +78,23 @@ show-battery-percentage = true; }; - "org/gnome/nautilus/preferences" = { default-folder-viewer="list-view"; }; - "org/gnome/nautilus/list-view" = { default-zoom-level="small"; }; + "org/gnome/nautilus/preferences" = { default-folder-viewer = "list-view"; }; + "org/gnome/nautilus/list-view" = { default-zoom-level = "small"; }; - "org/gnome/settings-daemon/peripherals/touchscreen" = { orientation-lock=true; }; + "org/gnome/settings-daemon/peripherals/touchscreen" = { + orientation-lock = true; + }; "org/gnome/desktop/datetime" = { automatic-timezone = true; }; "org/gnome/system/location" = { enabled = true; }; - "org/gnome/mutter" = { edge-tiling = true; }; + "org/gnome/mutter" = { + edge-tiling = true; + experimental-features = [ "scale-monitor-framebuffer" ]; + }; - "org/gnome/desktop/app-folders" = { folder-children = ["LibreOffice" "Utilities" ]; }; + "org/gnome/desktop/app-folders" = { + folder-children = [ "LibreOffice" "Utilities" ]; + }; + "org/gnome/desktop/app-folders/folders/LibreOffice" = { name = "LibreOffice"; apps = [ @@ -113,6 +115,7 @@ ]; }; - "org/gnome/shell" = { app-picker-layout = []; }; - } else {}; + "org/gnome/shell" = { app-picker-layout = [ ]; }; + } else + { }; } diff --git a/flake.lock b/flake.lock old mode 100755 new mode 100644 index a51ae7e..ddfd666 --- a/flake.lock +++ b/flake.lock @@ -1,54 +1,5 @@ { "nodes": { - "cl-nix-lite": { - "locked": { - "lastModified": 1717972076, - "narHash": "sha256-hnZEsDInTcsVSL5LBGDAZegAxVLBus/wiJh+sNM15zU=", - "owner": "hraban", - "repo": "cl-nix-lite", - "rev": "cc920bfb0a6402d3871f470c98d65266126973e4", - "type": "github" - }, - "original": { - "owner": "hraban", - "repo": "cl-nix-lite", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1697816753, - "narHash": "sha256-40to80AEIyKCQI0xMKCeF5ePoIKTYgjVVCZeu4CnTxM=", - "owner": "hraban", - "repo": "flake-compat", - "rev": "6025bade1336a36014639bc3f67eacc853dab78f", - "type": "github" - }, - "original": { - "owner": "hraban", - "ref": "fixed-output", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -56,11 +7,11 @@ ] }, "locked": { - "lastModified": 1729321331, - "narHash": "sha256-KVyQq+ez/oB30/WbdNgVD8g/bda34z8NiU187QKQb74=", + "lastModified": 1734944412, + "narHash": "sha256-36QfCAl8V6nMIRUCgiC79VriJPUXXkHuR8zQA1vAtSU=", "owner": "nix-community", "repo": "home-manager", - "rev": "122f70545b29ccb922e655b08acfe05bfb44ec68", + "rev": "8264bfe3a064d704c57df91e34b795b6ac7bad9e", "type": "github" }, "original": { @@ -70,27 +21,6 @@ "type": "github" } }, - "mac-app-util": { - "inputs": { - "cl-nix-lite": "cl-nix-lite", - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1727470707, - "narHash": "sha256-BqkwZ2mvzn+COdfIuzllSzWmiaBwQktt4sw9slfwM70=", - "owner": "hraban", - "repo": "mac-app-util", - "rev": "9c6bbe2a6a7ec647d03f64f0fadb874284f59eac", - "type": "github" - }, - "original": { - "owner": "hraban", - "repo": "mac-app-util", - "type": "github" - } - }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -98,11 +28,11 @@ ] }, "locked": { - "lastModified": 1729382845, - "narHash": "sha256-REiWck1zIOnZIgGmmOWfwvkQw1f4UrBsxxOSKVSAG4w=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "a001f44cfc47164839eb61c6b1e7f4288813f7e8", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -113,27 +43,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717868076, - "narHash": "sha256-c83Y9t815Wa34khrux81j8K8ET94ESmCuwORSKm2bQY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1729256560, - "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", + "lastModified": 1734649271, + "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", + "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", "type": "github" }, "original": { @@ -146,24 +60,8 @@ "root": { "inputs": { "home-manager": "home-manager", - "mac-app-util": "mac-app-util", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_2" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 7d84db4..1742581 100755 --- a/flake.nix +++ b/flake.nix @@ -7,17 +7,39 @@ nix-darwin.url = "github:LnL7/nix-darwin"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; - mac-app-util.url = "github:hraban/mac-app-util"; }; - outputs = { self, nixpkgs, home-manager, mac-app-util, ... }@attrs: { - darwinConfigurations."ka-macbook" = attrs.nix-darwin.lib.darwinSystem { - modules = [ - home-manager.darwinModules.home-manager - mac-app-util.darwinModules.default - ./configs/darwin-configuration.nix - { networking.hostName = "ka-macbook"; } - ]; + outputs = { self, nixpkgs, home-manager, ... }@attrs: + let + username = "haruka"; + mac-hostname = "kayiu-m1mac"; + in { + homeConfigurations.${username} = + home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages."aarch64-linux"; + modules = [ + (import ./configs/home.nix { inherit username; }) + { + targets.genericLinux.enable = true; + home.packages = with nixpkgs.legacyPackages."aarch64-linux"; [ + librewolf + vscodium + qbittorrent + telegram-desktop + imagemagick + ]; + } + ]; + }; + + darwinConfigurations.${mac-hostname} = attrs.nix-darwin.lib.darwinSystem { + modules = [ + home-manager.darwinModules.home-manager + (import ./configs/darwin.nix { + inherit mac-hostname; + inherit username; + }) + ]; + }; }; - }; } diff --git a/nur-everything/ci.nix b/nur-everything/ci.nix index f84dd96..6fa92f4 100755 --- a/nur-everything/ci.nix +++ b/nur-everything/ci.nix @@ -15,39 +15,45 @@ with builtins; let isReserved = n: n == "lib" || n == "overlays" || n == "modules"; isDerivation = p: isAttrs p && p ? type && p.type == "derivation"; - isBuildable = p: let - licenseFromMeta = p.meta.license or []; - licenseList = if builtins.isList licenseFromMeta then licenseFromMeta else [licenseFromMeta]; - in !(p.meta.broken or false) && builtins.all (license: license.free or true) licenseList; + isBuildable = p: + let + licenseFromMeta = p.meta.license or [ ]; + licenseList = if builtins.isList licenseFromMeta then + licenseFromMeta + else + [ licenseFromMeta ]; + in !(p.meta.broken or false) + && builtins.all (license: license.free or true) licenseList; isCacheable = p: !(p.preferLocalBuild or false); - shouldRecurseForDerivations = p: isAttrs p && p.recurseForDerivations or false; + shouldRecurseForDerivations = p: + isAttrs p && p.recurseForDerivations or false; - nameValuePair = n: v: { name = n; value = v; }; + nameValuePair = n: v: { + name = n; + value = v; + }; concatMap = builtins.concatMap or (f: xs: concatLists (map f xs)); flattenPkgs = s: let f = p: - if shouldRecurseForDerivations p then flattenPkgs p - else if isDerivation p then [ p ] - else [ ]; - in - concatMap f (attrValues s); + if shouldRecurseForDerivations p then + flattenPkgs p + else if isDerivation p then + [ p ] + else + [ ]; + in concatMap f (attrValues s); outputsOf = p: map (o: p.${o}) p.outputs; nurAttrs = import ./default.nix { inherit pkgs; }; - nurPkgs = - flattenPkgs - (listToAttrs - (map (n: nameValuePair n nurAttrs.${n}) - (filter (n: !isReserved n) - (attrNames nurAttrs)))); + nurPkgs = flattenPkgs (listToAttrs (map (n: nameValuePair n nurAttrs.${n}) + (filter (n: !isReserved n) (attrNames nurAttrs)))); -in -rec { +in rec { buildPkgs = filter isBuildable nurPkgs; cachePkgs = filter isCacheable buildPkgs; diff --git a/nur-everything/flake.nix b/nur-everything/flake.nix index 81a143f..375e71a 100755 --- a/nur-everything/flake.nix +++ b/nur-everything/flake.nix @@ -12,11 +12,11 @@ "armv7l-linux" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); - in - { - legacyPackages = forAllSystems (system: import ./default.nix { - pkgs = import nixpkgs { inherit system; }; - }); - packages = forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system}); + in { + legacyPackages = forAllSystems (system: + import ./default.nix { pkgs = import nixpkgs { inherit system; }; }); + packages = forAllSystems (system: + nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) + self.legacyPackages.${system}); }; } diff --git a/nur-everything/lib/default.nix b/nur-everything/lib/default.nix index a7fab1d..1d25545 100755 --- a/nur-everything/lib/default.nix +++ b/nur-everything/lib/default.nix @@ -1,6 +1,7 @@ { pkgs }: -with pkgs.lib; { +with pkgs.lib; +{ # Add your library functions here # # hexint = x: hexvals.${toLower x}; diff --git a/nur-everything/overlay.nix b/nur-everything/overlay.nix index bff7396..541864a 100755 --- a/nur-everything/overlay.nix +++ b/nur-everything/overlay.nix @@ -5,11 +5,11 @@ self: super: let isReserved = n: n == "lib" || n == "overlays" || n == "modules"; - nameValuePair = n: v: { name = n; value = v; }; + nameValuePair = n: v: { + name = n; + value = v; + }; nurAttrs = import ./default.nix { pkgs = super; }; -in -builtins.listToAttrs - (map (n: nameValuePair n nurAttrs.${n}) - (builtins.filter (n: !isReserved n) - (builtins.attrNames nurAttrs))) +in builtins.listToAttrs (map (n: nameValuePair n nurAttrs.${n}) + (builtins.filter (n: !isReserved n) (builtins.attrNames nurAttrs))) diff --git a/nur-everything/overlays/mac-apps/default.nix b/nur-everything/overlays/mac-apps/default.nix index ed22754..e98323d 100755 --- a/nur-everything/overlays/mac-apps/default.nix +++ b/nur-everything/overlays/mac-apps/default.nix @@ -1,32 +1,28 @@ final: prev: { - extraApplications = { - pname, - upstream-name ? pname, - sourceRoot, - nativeBuildInputs ? [ prev.pkgs._7zz prev.pkgs.unzip ], - installFin ? "", - upstream ? builtins.fromJSON (builtins.readFile ./src.json), - ... - }: with prev; stdenvNoCC.mkDerivation (finalAttrs: { - inherit pname; - version = upstream."${upstream-name}".version; + extraApplications = { pname, upstream-name ? pname, sourceRoot + , nativeBuildInputs ? [ prev.pkgs._7zz prev.pkgs.unzip ], installFin ? "" + , upstream ? builtins.fromJSON (builtins.readFile ./src.json), ... }: + with prev; + stdenvNoCC.mkDerivation (finalAttrs: { + inherit pname; + version = upstream."${upstream-name}".version; - src = fetchurl { - url = upstream."${upstream-name}".url; - sha256 = upstream."${upstream-name}".sha256; - }; + src = fetchurl { + url = upstream."${upstream-name}".url; + sha256 = upstream."${upstream-name}".sha256; + }; - inherit nativeBuildInputs; - inherit sourceRoot; + inherit nativeBuildInputs; + inherit sourceRoot; - installPhase = '' - mkdir -p $out/{bin,Applications/${sourceRoot}} - cp -R . "$out/Applications/${sourceRoot}" - ${installFin} - ''; + installPhase = '' + mkdir -p $out/{bin,Applications/${sourceRoot}} + cp -R . "$out/Applications/${sourceRoot}" + ${installFin} + ''; - passthru.updateScript = nix-update-script { }; - }); + passthru.updateScript = nix-update-script { }; + }); # librewolf = final.extraApplications rec { @@ -36,7 +32,10 @@ final: prev: { installFin = '' ln -s "$out/Applications/LibreWolf.app/Contents/MacOS/librewolf" "$out/bin/librewolf" ''; - upstream-name = if prev.pkgs.system == "x86_64-darwin" then "librewolf-x64" else "librewolf-arm64"; + upstream-name = if prev.pkgs.system == "x86_64-darwin" then + "librewolf-x64" + else + "librewolf-arm64"; }; whisky = final.extraApplications rec { @@ -47,7 +46,10 @@ final: prev: { standardnotes = final.extraApplications rec { pname = "standardnotes"; sourceRoot = "Standard Notes.app"; - upstream-name = if prev.pkgs.system == "x86_64-darwin" then "standardnotes-x64" else "standardnotes-arm64"; + upstream-name = if prev.pkgs.system == "x86_64-darwin" then + "standardnotes-x64" + else + "standardnotes-arm64"; }; lunarfyi = final.extraApplications rec { diff --git a/nur-everything/overlays/mac-apps/src.json b/nur-everything/overlays/mac-apps/src.json index 130b916..13789fc 100644 --- a/nur-everything/overlays/mac-apps/src.json +++ b/nur-everything/overlays/mac-apps/src.json @@ -1,48 +1,48 @@ { "standardnotes-x64": { - "version": "desktop@3.195.12", - "url": "https://github.com/standardnotes/app/releases/download/%40standardnotes/desktop%403.195.12/standard-notes-3.195.12-mac-x64.dmg", - "sha256": "f97b321ecd0a0dfad45cf58d4adb233bb786db9986d6f7f97fe36a0335e6179c" + "version": "desktop@3.195.14", + "url": "https://github.com/standardnotes/app/releases/download/%40standardnotes/desktop%403.195.14/standard-notes-3.195.14-mac-x64.dmg", + "sha256": "ea00934b13fc8a3d512491d5444ba8c1b2d234cfaaec9166ba17e208327444e2" }, "standardnotes-arm64": { - "version": "desktop@3.195.12", - "url": "https://github.com/standardnotes/app/releases/download/%40standardnotes/desktop%403.195.12/standard-notes-3.195.12-mac-arm64.dmg", - "sha256": "4767c4e937639783f2d495a3291ebfc43256d52074345f67e31d063a079aed54" + "version": "desktop@3.195.14", + "url": "https://github.com/standardnotes/app/releases/download/%40standardnotes/desktop%403.195.14/standard-notes-3.195.14-mac-arm64.dmg", + "sha256": "a3bca1e618673428a8663724d371929566bc39d68d9e67df09e724cc8ab052e4" }, "whisky": { - "version": "v2.3.3", - "url": "https://github.com/Whisky-App/Whisky/releases/download/v2.3.3/Whisky.zip", - "sha256": "385ed9ec848c1b057291b8bdf801cf6bf7e3eed9bdf3ac1a5a44b9c82fdc4034" + "version": "v2.3.4", + "url": "https://github.com/Whisky-App/Whisky/releases/download/v2.3.4/Whisky.zip", + "sha256": "0012b3dd685da12705b026d70baf6719050bc0414125b5b08aa3bc0958678ed6" }, "librewolf-x64": { - "version": "131.0.3-1", - "url": "https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/131.0.3-1/librewolf-131.0.3-1-macos-x86_64-package.dmg", - "sha256": "e7c3a679bf303b76da436a32e82b846a86f5062e59150e60bae29136e1032090" + "version": "133.0.3-1", + "url": "https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/133.0.3-1/librewolf-133.0.3-1-macos-x86_64-package.dmg", + "sha256": "2a0e9325e366146a79cf579c90ec4ea68d057648564c796f2945282ed08fb212" }, "librewolf-arm64": { - "version": "131.0.3-1", - "url": "https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/131.0.3-1/librewolf-131.0.3-1-macos-arm64-package.dmg", - "sha256": "bfbb2cd4e2bd092b1b43ddf6d767edb4db9ceb5eada1aac4022d007c396b1f00" + "version": "133.0.3-1", + "url": "https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/133.0.3-1/librewolf-133.0.3-1-macos-arm64-package.dmg", + "sha256": "e0ba3376b5620ddd7cba223aeb2909e12b144e1e16bd93b992893aa5c453d487" }, "floorp": { - "version": "v11.20.0", - "url": "https://github.com/Floorp-Projects/Floorp/releases/download/v11.20.0/floorp-macOS-universal.dmg", - "sha256": "bb3e81ba2c1733e1c90d6d9bd30aadf8ce015fe12709bdcb3bee1a6e38b2075d" + "version": "v11.21.0", + "url": "https://github.com/Floorp-Projects/Floorp/releases/download/v11.21.0/floorp-macOS-universal.dmg", + "sha256": "9bf3c5b162fb0f4f07a67b8729a9ea7e4171ff8bb9b57e580986da2d7f31b819" }, "lunarfyi": { - "version": "v6.8.2", - "url": "https://github.com/alin23/Lunar/releases/download/v6.8.2/Lunar-6.8.2.dmg", - "sha256": "03c08bb5beac934bf617cb2b6937e2c9dfe542f948aea5c40b9f746e20f486e1" + "version": "v6.8.5", + "url": "https://github.com/alin23/Lunar/releases/download/v6.8.5/Lunar-6.8.5.dmg", + "sha256": "359e7c0a95e54f3cf85c5e7c405018d015ea22f9dd6e986e3fd0646ec6463923" }, "sol": { - "version": "2.1.114", - "url": "https://github.com/ospfranco/sol/releases/download/2.1.114/2.1.114.zip", - "sha256": "292ce48801480675ea70df07835339500846a8e08ee745c286d4d0f9c3f6e0df" + "version": "2.1.132", + "url": "https://github.com/ospfranco/sol/releases/download/2.1.132/2.1.132.zip", + "sha256": "1090b399bf1b5f9bc6b7f30ac555600b8c855d424a64806088a9eaa007e21613" }, "telegram-desktop": { - "version": "v5.6.4", - "url": "https://github.com/telegramdesktop/tdesktop/releases/download/v5.6.4/tsetup.5.6.4.beta.dmg", - "sha256": "b99f66e13d8affe82fe5d3a9986dd604d5c2da50efb2cb6d67d0cf21ae437d66" + "version": "v5.9.0", + "url": "https://github.com/telegramdesktop/tdesktop/releases/download/v5.9.0/tsetup.5.9.0.dmg", + "sha256": "714ca2567e4a6726f7e6743e606a138ed5728d692ca9d7b2e59e38609229f855" } } diff --git a/nur-everything/overlays/mac-apps/update.nix b/nur-everything/overlays/mac-apps/update.nix index 250a8b4..b800aae 100755 --- a/nur-everything/overlays/mac-apps/update.nix +++ b/nur-everything/overlays/mac-apps/update.nix @@ -1,4 +1,4 @@ -{ pkgs ? import {} }: +{ pkgs ? import { } }: pkgs.writeShellApplication { name = "update-mac-apps"; @@ -6,50 +6,50 @@ pkgs.writeShellApplication { runtimeInputs = with pkgs; [ curl sd gawk ]; text = '' - function urldecode() { : "''${*//+/ }"; echo -e "''${_//%/\\x}"; } - - function get_github(){ - repo_owner=$1 - repo_name=$2 - match_case=''${3:-'.dmg'} - - dl_url=$(curl "https://api.github.com/repos/$repo_owner/$repo_name/releases" | sd "\"" "\n" | grep -E "https.*\\$match_case$" | head -n 1) - ver=$(urldecode "$(echo "$dl_url" | sd '/' '\n' | tail -2 | head -1)") - sha256=$(curl -sL "$dl_url" | sha256sum | awk '{print $1}') - - echo "{ - \"version\": \"$ver\", - \"url\": \"$dl_url\", - \"sha256\": \"$sha256\" - }" - } - - function get_gitlab(){ - namespace=$1 - match_case=''${2:-'.dmg'} - - dl_url=$(curl "https://gitlab.com/api/v4/projects/$namespace/releases" | sd "\"" "\n" | grep -E "https.*\\$match_case$" | head -n 1) - ver=$(urldecode "$(echo "$dl_url" | sd '/' '\n' | tail -2 | head -1)") - sha256=$(curl -sL "$dl_url" | sha256sum | awk '{print $1}') - - echo "{ - \"version\": \"$ver\", - \"url\": \"$dl_url\", - \"sha256\": \"$sha256\" - }" - } - - echo "{ - \"standardnotes-x64\": $(get_github "standardnotes" "app" "x64.dmg"), - \"standardnotes-arm64\": $(get_github "standardnotes" "app" "arm64.dmg"), - \"whisky\": $(get_github "Whisky-App" "whisky" "hisky.zip"), - \"librewolf-x64\": $(get_gitlab "librewolf-community%2Fbrowser%2Fbsys6" "x86_64-package.dmg"), - \"librewolf-arm64\": $(get_gitlab "librewolf-community%2Fbrowser%2Fbsys6" "arm64-package.dmg"), - \"floorp\": $(get_github "Floorp-Projects" "Floorp" "floorp-macOS-universal.dmg"), - \"lunarfyi\": $(get_github "alin23" "Lunar" ".dmg"), - \"sol\": $(get_github "ospfranco" "sol" ".zip"), - \"telegram-desktop\": $(get_github "telegramdesktop" "tdesktop" ".dmg") - - }" > src.json -''; -} \ No newline at end of file + function urldecode() { : "''${*//+/ }"; echo -e "''${_//%/\\x}"; } + + function get_github(){ + repo_owner=$1 + repo_name=$2 + match_case=''${3:-'.dmg'} + + dl_url=$(curl "https://api.github.com/repos/$repo_owner/$repo_name/releases" | sd "\"" "\n" | grep -E "https.*\\$match_case$" | head -n 1) + ver=$(urldecode "$(echo "$dl_url" | sd '/' '\n' | tail -2 | head -1)") + sha256=$(curl -sL "$dl_url" | sha256sum | awk '{print $1}') + + echo "{ + \"version\": \"$ver\", + \"url\": \"$dl_url\", + \"sha256\": \"$sha256\" + }" + } + + function get_gitlab(){ + namespace=$1 + match_case=''${2:-'.dmg'} + + dl_url=$(curl "https://gitlab.com/api/v4/projects/$namespace/releases" | sd "\"" "\n" | grep -E "https.*\\$match_case$" | head -n 1) + ver=$(urldecode "$(echo "$dl_url" | sd '/' '\n' | tail -2 | head -1)") + sha256=$(curl -sL "$dl_url" | sha256sum | awk '{print $1}') + + echo "{ + \"version\": \"$ver\", + \"url\": \"$dl_url\", + \"sha256\": \"$sha256\" + }" + } + + echo "{ + \"standardnotes-x64\": $(get_github "standardnotes" "app" "x64.dmg"), + \"standardnotes-arm64\": $(get_github "standardnotes" "app" "arm64.dmg"), + \"whisky\": $(get_github "Whisky-App" "whisky" "hisky.zip"), + \"librewolf-x64\": $(get_gitlab "librewolf-community%2Fbrowser%2Fbsys6" "x86_64-package.dmg"), + \"librewolf-arm64\": $(get_gitlab "librewolf-community%2Fbrowser%2Fbsys6" "arm64-package.dmg"), + \"floorp\": $(get_github "Floorp-Projects" "Floorp" "floorp-macOS-universal.dmg"), + \"lunarfyi\": $(get_github "alin23" "Lunar" ".dmg"), + \"sol\": $(get_github "ospfranco" "sol" ".zip"), + \"telegram-desktop\": $(get_github "telegramdesktop" "tdesktop" ".dmg") + + }" > src.json + ''; +}