Commit 860a8fb

HPCesia <me@hpcesia.com>
2025-10-03 15:24:57
refactor: migrate some desktop packages
1 parent 632c10f
home/base/gui/media.nix
@@ -1,12 +0,0 @@
-{pkgs, ...}:
-# processing audio/video
-{
-  home.packages = with pkgs; [
-    ffmpeg-full
-
-    # images
-    viu # Terminal image viewer with native support for iTerm and Kitty
-    imagemagick
-    graphviz
-  ];
-}
home/base/gui/misc.nix
@@ -1,16 +0,0 @@
-{
-  pkgs,
-  pkgs-stable,
-  ...
-}: {
-  home.packages = with pkgs; [
-    pkgs-stable.geogebra
-    readest # ebook reader
-    rnote
-    inkscape
-
-    wireshark # network analyzer
-
-    veracrypt
-  ];
-}
home/linux/gui/plasma/application.nix
@@ -1,9 +0,0 @@
-{pkgs, ...}: {
-  home.packages = with pkgs.kdePackages; [
-    kdenlive
-  ];
-
-  services.kdeconnect = {
-    enable = true;
-  };
-}
home/linux/gui/plasma/default.nix
@@ -1,5 +0,0 @@
-{
-  imports = [
-    ./application.nix
-  ];
-}
home/linux/gui/default.nix
@@ -1,3 +0,0 @@
-{mylib, ...}: {
-  imports = mylib.scanModules ./.;
-}
home/linux/gui/misc.nix
@@ -1,32 +0,0 @@
-{
-  pkgs,
-  pkgs-unstable,
-  lib,
-  ...
-}: let
-  inherit (lib.lists) concatLists;
-
-  chromiumCLA = concatLists [
-    ["--ozone-platform-hint=auto"]
-    ["--enable-wayland-ime"]
-    ["--wayland-text-input-version=3"]
-  ];
-
-  # Fix Chromium IME bug
-  cherrystudio = pkgs-unstable.cherry-studio.override {commandLineArgs = chromiumCLA;};
-  qq = pkgs.qq.override {commandLineArgs = chromiumCLA;};
-in {
-  home.packages = with pkgs; [
-    # Message
-    qq
-    wechat
-
-    # Misc
-    cherrystudio
-    obs-studio
-    gimp3
-    # pot # Disabled until pot update their tauri
-    libreoffice-qt6
-    blender
-  ];
-}
home/linux/gui.nix
@@ -6,6 +6,5 @@
     ../base/home.nix
 
     ./base
-    ./gui
   ];
 }
modules/desktop/apps/kdeconnect.nix
@@ -0,0 +1,8 @@
+{
+  flake.modules.homeManager.desktop = _: {
+    services.kdeconnect = {
+      enable = true;
+      indicator = false;
+    };
+  };
+}
modules/desktop/apps/packages.nix
@@ -0,0 +1,35 @@
+{lib, ...}: {
+  flake.modules.homeManager.desktop = {pkgs, ...}: let
+    chromiumCLA = lib.optionals pkgs.stdenv.hostPlatform.isLinux [
+      "--ozone-platform-hint=auto"
+      "--enable-wayland-ime"
+      "--wayland-text-input-version=3"
+    ];
+
+    # Fix Chromium IME bug
+    cherry-studio = pkgs.cherry-studio.override {commandLineArgs = chromiumCLA;};
+    qq = pkgs.qq.override {commandLineArgs = chromiumCLA;};
+  in {
+    home.packages =
+      (with pkgs; [
+        blender
+        ffmpeg-full
+        geogebra6
+        imagemagick
+        inkscape
+        qq
+        rnote
+        wechat
+        wireshark
+      ])
+      ++ (lib.optionals pkgs.stdenv.hostPlatform.isLinux (with pkgs; [
+        cherry-studio # No darwin package in Nixpkgs
+        gimp3
+        kdePackages.kdenlive
+        libreoffice-qt6
+        obs-studio
+        readest
+        veracrypt
+      ]));
+  };
+}