From 039585b0a975226579a14b1817a2cea4462f450d Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Thu, 13 Mar 2025 00:33:06 +0530 Subject: [PATCH] feat: isMac -> isDarwin --- darwin/kuro/homebrew.nix | 1 + flake.nix | 4 ++-- home/default.nix | 6 +++--- home/programs/default.nix | 2 +- home/programs/fish.nix | 7 ++++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/darwin/kuro/homebrew.nix b/darwin/kuro/homebrew.nix index 3d3963f..d6a225d 100644 --- a/darwin/kuro/homebrew.nix +++ b/darwin/kuro/homebrew.nix @@ -5,6 +5,7 @@ ]; casks = [ "firefox" + "vlc" "librewolf" "raycast" "kunkun" # Soon diff --git a/flake.nix b/flake.nix index dffb767..04c4c05 100644 --- a/flake.nix +++ b/flake.nix @@ -232,7 +232,7 @@ if (builtins.hasAttr "isNix" device) then device.isNix else false; - isMac = !isNull (builtins.match ".*-darwin" device.system); + isDarwin = !isNull (builtins.match ".*-darwin" device.system); hasGui = if (builtins.hasAttr "hasGui" device) then device.hasGui @@ -251,7 +251,7 @@ nixos_devices = builtins.filter (x: x.isNix) devices; linux_devices = builtins.filter (x: x.isLinux) devices; - darwin_devices = builtins.filter (x: x.isMac) devices; + darwin_devices = builtins.filter (x: x.isDarwin) devices; overlays = import ./overlays.nix { inherit inputs; diff --git a/home/default.nix b/home/default.nix index e76f043..c9cc7d5 100644 --- a/home/default.nix +++ b/home/default.nix @@ -18,7 +18,7 @@ ++ lib.optionals device.isLinux [./linux] ++ lib.optionals device.hasGui [./gui-programs]; - # ++ lib.optionals.device.isMac [./macos]; + # ++ lib.optionals.device.isDarwin [./macos]; xdg.enable = true; xdg.userDirs = { @@ -35,7 +35,7 @@ home = { username = device.user; homeDirectory = - if device.isMac + if device.isDarwin then lib.mkForce "/Users/${device.user}" else lib.mkForce "/home/${device.user}"; @@ -66,7 +66,7 @@ SHELL = "${pkgs.bash}/bin/bash"; CARGO_TARGET_DIR = "${config.xdg.cacheHome}/cargo/target"; BROWSER = - if device.isMac + if device.isDarwin then "open" else "xdg-open"; }; diff --git a/home/programs/default.nix b/home/programs/default.nix index 001d6c8..3f68801 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -92,5 +92,5 @@ usbutils ddcbacklight ] - ++ lib.optionals device.isMac []; + ++ lib.optionals device.isDarwin []; } diff --git a/home/programs/fish.nix b/home/programs/fish.nix index 7eee589..a7a44b2 100644 --- a/home/programs/fish.nix +++ b/home/programs/fish.nix @@ -36,9 +36,10 @@ ${pkgs.pfetch-rs}/bin/pfetch ${lib.optionalString (device.isLinux && !device.isNix) "source /etc/profile.d/nix-daemon.fish"} ${lib.optionalString (device.isNix && device.hasGui) - '' if not set -q HYPRLAND_INSTANCE_SIGNATURE - set -x HYPRLAND_INSTANCE_SIGNATURE (hyprctl instances | head -1 | cut -d ' ' -f2 | tr -d :) - end + '' + if not set -q HYPRLAND_INSTANCE_SIGNATURE + set -x HYPRLAND_INSTANCE_SIGNATURE (hyprctl instances | head -1 | cut -d ' ' -f2 | tr -d :) + end ''} ''; }; -- 2.51.2