Commit 3cdb6cd
Changed files (4)
modules/desktop/apps/flatpak.nix
@@ -0,0 +1,23 @@
+{inputs, ...}: {
+ flake-file.inputs.flatpaks.url = "github:in-a-dil-emma/declarative-flatpak/latest";
+
+ flake.modules.nixos.desktop = _: {
+ services.flatpak.enable = true;
+ };
+
+ flake.modules.homeManager.desktop = _: {
+ imports = [inputs.flatpaks.homeModules.default];
+
+ services.flatpak = {
+ remotes = {
+ flathub = "https://flathub.org/repo/flathub.flatpakrepo";
+ };
+ packages = [
+ "flathub:app/com.qq.QQ//stable"
+ "flathub:app/com.tencent.WeChat//stable"
+ "flathub:app/com.tencent.wemeet//stable"
+ "flathub:app/cn.wps.wps_365//stable"
+ ];
+ };
+ };
+}
modules/desktop/apps/packages.nix
@@ -19,22 +19,6 @@
# Fix Chromium IME bug
cherry-studio = pkgs.cherry-studio.override {commandLineArgs = chromiumCLA;};
- qq = pkgs.qq.override {commandLineArgs = chromiumCLA;};
-
- wechat = pkgs.wechat.overrideAttrs (oldAttrs: {
- buildInputs = (oldAttrs.buildInputs or []) ++ [pkgs.makeWrapper];
- # Fix desktop entry because $out/bin/wechat is a syslink
- postFixup =
- (oldAttrs.postFixup or "")
- + ''
- sed -i "s|^Exec=.*|Exec=env \
- GTK_IM_MODULE=fcitx \
- QT_IM_MODULE=fcitx \
- XMODIFIERS=@im=fcitx \
- $out/bin/wechat %F|" \
- $out/share/applications/wechat.desktop
- '';
- });
wpsoffice-cn = pkgs.wpsoffice-cn.overrideAttrs (oldAttrs: {
buildInputs = (oldAttrs.buildInputs or []) ++ [pkgs.makeWrapper];
@@ -60,8 +44,6 @@
geogebra6
imagemagick
inkscape
- qq
- wechat
wireshark
])
++ (lib.optionals pkgs.stdenv.hostPlatform.isLinux (with pkgs; [
@@ -73,8 +55,6 @@
nautilus
obs-studio
veracrypt
- wpsoffice-cn
- wemeet
]));
xdg.mimeApps.defaultApplications = {
flake.lock
@@ -488,6 +488,22 @@
"type": "github"
}
},
+ "flatpaks": {
+ "locked": {
+ "lastModified": 1769601081,
+ "narHash": "sha256-J0n+J/qfU3xTf5iaMcQrEK4dA5GSYQcw8XJuhZsM1Pc=",
+ "owner": "in-a-dil-emma",
+ "repo": "declarative-flatpak",
+ "rev": "aba8c5ca67444cf4bcd0b02df284de1c93533a19",
+ "type": "github"
+ },
+ "original": {
+ "owner": "in-a-dil-emma",
+ "ref": "latest",
+ "repo": "declarative-flatpak",
+ "type": "github"
+ }
+ },
"fromYaml": {
"flake": false,
"locked": {
@@ -1147,6 +1163,7 @@
"distro-grub-themes": "distro-grub-themes",
"flake-file": "flake-file",
"flake-parts": "flake-parts",
+ "flatpaks": "flatpaks",
"home-manager": "home-manager",
"import-tree": "import-tree",
"niri-unstable": "niri-unstable",
flake.nix
@@ -18,6 +18,7 @@
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs-lib";
};
+ flatpaks.url = "github:in-a-dil-emma/declarative-flatpak/latest";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";