From c08b8b2ae02f59f60ca3f20b98137e94e033e0d8 Mon Sep 17 00:00:00 2001 From: Roman Lubij Date: Sun, 1 Mar 2026 09:12:10 +0100 Subject: [PATCH] Move clion desktop file to hm --- common/modules/default.nix | 1 - common/modules/desktop-files.nix | 30 ----------------- common/modules/home/default.nix | 3 ++ common/modules/home/desktop-files.nix | 46 +++++++++++++++++++++++++++ common/modules/home/zsh.nix | 2 ++ 5 files changed, 51 insertions(+), 31 deletions(-) delete mode 100644 common/modules/desktop-files.nix create mode 100644 common/modules/home/desktop-files.nix diff --git a/common/modules/default.nix b/common/modules/default.nix index cec6d20..b44e7a2 100644 --- a/common/modules/default.nix +++ b/common/modules/default.nix @@ -5,7 +5,6 @@ { imports = [ ./attic.nix - ./desktop-files.nix ./flatpak.nix ./gnome.nix ./packages.nix diff --git a/common/modules/desktop-files.nix b/common/modules/desktop-files.nix deleted file mode 100644 index 54cd994..0000000 --- a/common/modules/desktop-files.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - pkgs, - ... -}: - -{ - - environment.systemPackages = with pkgs; [ - (makeDesktopItem { - name = "clion-nix-shell"; - desktopName = "CLion (Nix Shell)"; - genericName = "C/C++ IDE from JetBrains"; - exec = "sh -c \"nix develop ~/.config/nix-shells/cpp -c clion %f\""; - icon = "clion"; - type = "Application"; - terminal = false; - categories = [ - "Development" - "IDE" - ]; - startupWMClass = "jetbrains-clion"; - mimeTypes = [ - "text/x-c++src" - "text/x-c++hdr" - "text/x-csrc" - "text/x-chdr" - ]; - }) - ]; -} diff --git a/common/modules/home/default.nix b/common/modules/home/default.nix index 108e444..2cdf9f5 100644 --- a/common/modules/home/default.nix +++ b/common/modules/home/default.nix @@ -5,9 +5,12 @@ { imports = [ ./dconf + ./desktop-files.nix ./starship.nix ./zsh.nix ]; + xdg.enable = true; + home.stateVersion = "25.05"; } diff --git a/common/modules/home/desktop-files.nix b/common/modules/home/desktop-files.nix new file mode 100644 index 0000000..0117c00 --- /dev/null +++ b/common/modules/home/desktop-files.nix @@ -0,0 +1,46 @@ +{ + config, + pkgs, + ... +}: + +{ + /* + xdg.desktopEntries = { + "clion" = { + name = "CLion (Nix Shell)"; + genericName = "C/C++ IDE from JetBrains"; + exec = "nix develop ${config.xdg.configHome}/nix-shells/cpp -c clion %f"; + icon = "clion"; + type = "Application"; + terminal = false; + categories = [ + "Development" + "IDE" + ]; + settings = { + StartupWMClass = "jetbrains-clion"; + }; + mimeType = [ + "text/x-c++src" + "text/x-c++hdr" + "text/x-csrc" + "text/x-chdr" + ]; + }; + }; + */ + + xdg.dataFile."applications/clion.desktop".text = '' + [Desktop Entry] + Type=Application + Name=CLion (Nix Shell) + GenericName=C/C++ IDE from JetBrains + Exec=sh -c "nix develop ${config.xdg.configHome}/nix-shells/cpp -c clion %f" + Icon=clion + Terminal=false + Categories=Development;IDE; + StartupWMClass=jetbrains-clion + MimeType=text/x-c++src;text/x-c++hdr;text/x-csrc;text/x-chdr; + ''; +} diff --git a/common/modules/home/zsh.nix b/common/modules/home/zsh.nix index f5117e6..5bdc237 100644 --- a/common/modules/home/zsh.nix +++ b/common/modules/home/zsh.nix @@ -1,4 +1,5 @@ { + config, ... }: @@ -8,6 +9,7 @@ enableCompletion = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; + dotDir = "${config.xdg.configHome}/zsh"; oh-my-zsh = { enable = true;