about summary refs log tree commit diff
path: root/home/xdg
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-08 08:30:17 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-08 08:30:17 -0700
commit2aa3e62136109c5c4762e951525d68aff3e1ac5a (patch)
tree0f508cad82717ac70c7da5fd402c9555ce9166d1 /home/xdg
parenthome: fix for yt-dlp configuration (diff)
downloadworld-2aa3e62136109c5c4762e951525d68aff3e1ac5a.tar.gz
home: add more configurations for home-manager
Diffstat (limited to 'home/xdg')
-rw-r--r--home/xdg/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/home/xdg/default.nix b/home/xdg/default.nix
new file mode 100644
index 0000000..a4f0c53
--- /dev/null
+++ b/home/xdg/default.nix
@@ -0,0 +1,44 @@
+{ config, lib, pkgs, ... }:
+let cfg = config.my.home.xdg;
+in {
+  options.my.home.xdg = with lib; {
+    enable = mkEnableOption "XDG configuration";
+  };
+
+  config = lib.mkIf cfg.enable {
+    xdg = {
+      enable = true;
+      # File types
+      mime.enable = true;
+      # File associatons
+      mimeApps = { enable = true; };
+      # User directories
+      userDirs = {
+        enable = true;
+        createDirectories = true;
+        desktop = "${config.home.homeDirectory}/documents";
+        documents = "${config.home.homeDirectory}/documents";
+        download = "${config.home.homeDirectory}/downloads";
+        music = "${config.home.homeDirectory}/media/music";
+        pictures = "${config.home.homeDirectory}/media/pictures";
+        publicShare = "${config.home.homeDirectory}/documents/public";
+        templates = "${config.home.homeDirectory}/documents/templates";
+        videos = "${config.home.homeDirectory}/media/videos";
+      };
+    };
+
+    # xdg.portal = {
+    #   enable = true;
+    #   gtkUsePortal = true;
+    #   extraPortals =
+    #     [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
+    # };
+
+    # I want a tidier home
+    home.sessionVariables = with config.xdg; {
+      DOCKER_CONFIG = "${configHome}/docker";
+      LESSHISTFILE = "${dataHome}/less/history";
+      LESSKEY = "${configHome}/less/lesskey";
+    };
+  };
+}