about summary refs log tree commit diff
path: root/modules/nixos/common/xdg.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
commite6ed60548397627bf10f561f9438201dbba0a36e (patch)
treef9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/nixos/common/xdg.nix
parent2024-04-18 (diff)
2024-04-21
Diffstat (limited to '')
-rw-r--r--modules/nixos/common/xdg.nix41
1 files changed, 0 insertions, 41 deletions
diff --git a/modules/nixos/common/xdg.nix b/modules/nixos/common/xdg.nix
deleted file mode 100644
index 1fe167e..0000000
--- a/modules/nixos/common/xdg.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{
-  config,
-  lib,
-  this,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.common.xdg;
-in
-{
-  options.nixfiles.modules.common.xdg.defaultApplications = mkOption {
-    description = "Default applications.";
-    type = with types; attrsOf (listOf str);
-    default = { };
-  };
-
-  config = {
-    xdg.portal = mkIf this.isHeadful { enable = true; };
-
-    hm.xdg = mkMerge [
-      (with cfg; {
-        enable = true;
-
-        inherit cacheHome;
-        inherit configHome;
-        inherit dataHome;
-        inherit stateHome;
-        inherit userDirs;
-      })
-      (mkIf this.isHeadful {
-        mimeApps = {
-          enable = true;
-          defaultApplications = mkMerge (
-            mapAttrsToList (n: v: genAttrs v (_: [ "${n}.desktop" ])) cfg.defaultApplications
-          );
-        };
-      })
-    ];
-  };
-}

Consider giving Nix/NixOS a try! <3