From 75fb468e6c87096297b867ccec0b0b1e8bdbac73 Mon Sep 17 00:00:00 2001 From: harukafractus <106440141+harukafractus@users.noreply.github.com> Date: Wed, 30 Oct 2024 01:10:56 +1030 Subject: [PATCH] fix darwin --- configs/darwin-configuration.nix | 2 + configs/home-manager.nix | 4 +- flake.lock | 122 +++++++++++++++++-- flake.nix | 4 +- nur-everything/overlays/mac-apps/default.nix | 6 + nur-everything/overlays/mac-apps/update.nix | 3 +- 6 files changed, 128 insertions(+), 13 deletions(-) diff --git a/configs/darwin-configuration.nix b/configs/darwin-configuration.nix index 52f4507..443bd5c 100755 --- a/configs/darwin-configuration.nix +++ b/configs/darwin-configuration.nix @@ -18,6 +18,8 @@ whisky lunarfyi sol + python3Full + libreoffice-bin #standardnotes ]; diff --git a/configs/home-manager.nix b/configs/home-manager.nix index c775bdd..effa420 100755 --- a/configs/home-manager.nix +++ b/configs/home-manager.nix @@ -1,5 +1,4 @@ { pkgs, config, lib, ... }: { - home = { username = "haruka"; homeDirectory = "/Users/haruka"; @@ -43,6 +42,8 @@ source-han-serif source-han-code-jp meslo-lgs-nf + fortune-kind + cowsay eza bat ]; @@ -60,6 +61,7 @@ source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme source ~/.p10k.zsh fi + fortune-kind | cowsay -f koala ''; shellAliases = { diff --git a/flake.lock b/flake.lock index 8bcfcba..a51ae7e 100755 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,54 @@ { "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": [ @@ -7,11 +56,11 @@ ] }, "locked": { - "lastModified": 1728791962, - "narHash": "sha256-nr5QiXwQcZmf6/auC1UpX8iAtINMtdi2mH+OkqJQVmU=", + "lastModified": 1729321331, + "narHash": "sha256-KVyQq+ez/oB30/WbdNgVD8g/bda34z8NiU187QKQb74=", "owner": "nix-community", "repo": "home-manager", - "rev": "64c6325b28ebd708653dd41d88f306023f296184", + "rev": "122f70545b29ccb922e655b08acfe05bfb44ec68", "type": "github" }, "original": { @@ -21,6 +70,27 @@ "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": [ @@ -28,11 +98,11 @@ ] }, "locked": { - "lastModified": 1728874775, - "narHash": "sha256-B2C15JAdewAMC29qvogmkck30uDKi7wu/qHX0BLHJVc=", + "lastModified": 1729382845, + "narHash": "sha256-REiWck1zIOnZIgGmmOWfwvkQw1f4UrBsxxOSKVSAG4w=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "ccf8cc56c9846ff2490244e05abe2ef737bf3df4", + "rev": "a001f44cfc47164839eb61c6b1e7f4288813f7e8", "type": "github" }, "original": { @@ -43,11 +113,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728492678, - "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", + "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=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", + "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", "type": "github" }, "original": { @@ -60,8 +146,24 @@ "root": { "inputs": { "home-manager": "home-manager", + "mac-app-util": "mac-app-util", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs" + "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" } } }, diff --git a/flake.nix b/flake.nix index 1926c59..7d84db4 100755 --- a/flake.nix +++ b/flake.nix @@ -7,12 +7,14 @@ 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, ... }@attrs: { + 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"; } ]; diff --git a/nur-everything/overlays/mac-apps/default.nix b/nur-everything/overlays/mac-apps/default.nix index bdfff79..ed22754 100755 --- a/nur-everything/overlays/mac-apps/default.nix +++ b/nur-everything/overlays/mac-apps/default.nix @@ -59,4 +59,10 @@ final: prev: { pname = "sol"; sourceRoot = "Sol.app"; }; + + telegram-desktop = final.extraApplications rec { + pname = "telegram-desktop"; + sourceRoot = "Telegram.app"; + nativeBuildInputs = [ prev.pkgs.undmg ]; + }; } diff --git a/nur-everything/overlays/mac-apps/update.nix b/nur-everything/overlays/mac-apps/update.nix index cffc156..250a8b4 100755 --- a/nur-everything/overlays/mac-apps/update.nix +++ b/nur-everything/overlays/mac-apps/update.nix @@ -47,7 +47,8 @@ pkgs.writeShellApplication { \"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") + \"sol\": $(get_github "ospfranco" "sol" ".zip"), + \"telegram-desktop\": $(get_github "telegramdesktop" "tdesktop" ".dmg") }" > src.json '';