ctucx.git: nixfiles

ctucx' nixfiles

commit df37ed91839b99d81d40b07f3f8ee1b93e9a1597
parent f51d2fd4edaf7b5e982000f2556759bea2ff9ac8
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 19 Dec 2023 17:15:58 +0100

configurations/darwin: use nixpkgs-version of some mac apps!
8 files changed, 18 insertions(+), 25 deletions(-)
diff --git a/configurations/darwin/default.nix b/configurations/darwin/default.nix
@@ -38,6 +38,9 @@
     users.leah.home.packages      = with pkgs; [
       bgiparser
       asitop
+
+      utm
+      monitorcontrol
     ];
   };
 
diff --git a/configurations/darwin/dock.nix b/configurations/darwin/dock.nix
@@ -16,7 +16,7 @@
       --add /System/Applications/Photos.app \
       --add /Applications/Spotify.app \
       --add /System/Applications/Podcasts.app \
-      --add /Applications/iTerm.app \
+      --add ${pkgs.iterm2}/Applications/iTerm2.app \
       --add "/System/Applications/Utilities/Activity Monitor.app" \
       --add "/System/Applications/System Settings.app"
   '';
diff --git a/configurations/darwin/homebrew.nix b/configurations/darwin/homebrew.nix
@@ -43,12 +43,10 @@
       "yubico-yubikey-manager"
       "yubico-authenticator"
 
-      "utm"
       "wireshark"
 
       "hiddenbar"
       "keepingyouawake"
-      "monitorcontrol"
       "eqmac"
 
       "whatsapp"
diff --git a/configurations/darwin/programs/iTerm.nix b/configurations/darwin/programs/iTerm.nix
@@ -7,17 +7,13 @@
       # Disable iTerm's annoying promt when quitting it
       PromptOnQuit = false;
 
+      SUEnableAutomaticChecks = 0;
+
       # Use 'Minimal' Theme
       TabStyleWithAutomaticOption = 5;
     };
   };
 
-  homebrew = {
-    enable  = true;
-
-    casks   = [
-      "iterm2"
-    ];
-  };
+  home-manager.users.leah.home.packages = with pkgs; [ iterm2 ];
 
 }
diff --git a/configurations/darwin/programs/iina.nix b/configurations/darwin/programs/iina.nix
@@ -27,12 +27,9 @@
     };
   };
 
-  homebrew = {
-    enable  = true;
-
-    casks   = [
-      "iina"
-    ];
-  };
+  home-manager.users.leah.home.packages = with pkgs; [
+    iina
+    open-in-mpv
+  ];
 
 }
diff --git a/configurations/darwin/programs/rectangle.nix b/configurations/darwin/programs/rectangle.nix
@@ -9,12 +9,10 @@
     };
   };
 
-  homebrew = {
-    enable  = true;
+  home-manager.users.leah.home.packages = with pkgs; [ rectangle ];
 
-    casks   = [
-      "rectangle"
-    ];
-  };
+  system.activationScripts.userDefaults.text = ''
+    defaults write com.knollsoft.Rectangle maximize -dict keyCode 36 modifierFlags 786432
+  '';
 
 }
diff --git a/configurations/darwin/skhd.nix b/configurations/darwin/skhd.nix
@@ -7,13 +7,13 @@ let
 
     # Detects if iTerm2 is running
     if ! pgrep -f "iTerm" > /dev/null; then
-      open -a "/Applications/iTerm.app"
+      open -a "${pkgs.iterm2}/Applications/iTerm2.app"
     else
       # Create a new window
       if ! osascript -e 'tell application "iTerm2" to create window with default profile' > /dev/null; then
         # Get pids for any app with "iTerm" and kill
         for i in $(pgrep -f "iTerm"); do kill -15 "$i"; done
-        open  -a "$HOME/Applications/iTerm.app"
+        open  -a "${pkgs.iterm2}/Applications/iTerm2.app"
       fi
     fi
   '';
diff --git a/flake.nix b/flake.nix
@@ -9,6 +9,7 @@
         system = "aarch64-darwin";
         pkgs = import inputs.nixpkgsDarwin {
           inherit system;
+          config.allowUnfree = true;
           overlays = overlays ++ [(import ./pkgs/darwin)];
         };
         specialArgs = {