summaryrefslogtreecommitdiff
path: root/hm/conf
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-02-08 18:03:39 +0100
committeradikro <adikro@disroot.org>2026-02-08 18:03:39 +0100
commit2c8a4dd99efd61298bc18393e7fcbf6063db8671 (patch)
tree1efd5ac8f5bcf7b1611cec1beaa545e6a2c14160 /hm/conf
parenteb95abfc230dc239122f1e89e90cd9a998491a2f (diff)
...
Diffstat (limited to 'hm/conf')
-rw-r--r--hm/conf/conf.nix1
-rw-r--r--hm/conf/xdg-dirs.nix40
-rw-r--r--hm/conf/xdg-mime.nix49
3 files changed, 70 insertions, 20 deletions
diff --git a/hm/conf/conf.nix b/hm/conf/conf.nix
index 6c54d8a..57f9ba1 100644
--- a/hm/conf/conf.nix
+++ b/hm/conf/conf.nix
@@ -4,5 +4,6 @@
./clip.nix
./git.nix
./xdg-dirs.nix
+ ./xdg-mime.nix
];
}
diff --git a/hm/conf/xdg-dirs.nix b/hm/conf/xdg-dirs.nix
index d779dba..ee34bd0 100644
--- a/hm/conf/xdg-dirs.nix
+++ b/hm/conf/xdg-dirs.nix
@@ -19,9 +19,9 @@ in
download = "${config.home.homeDirectory}/dl";
documents = "${config.home.homeDirectory}/docs";
-
+
pictures = "${toString cfg.mediaPath}/pics";
- videos = "${toString cfg.mediaPath}/vids";
+ videos = "${toString cfg.mediaPath}/vids";
desktop = null;
music = null;
@@ -29,25 +29,25 @@ in
templates = null;
extraConfig = {
- XDG_PROJECTS_DIR = "${config.home.homeDirectory}/proj";
- XDG_GAMES_DIR = "${config.home.homeDirectory}/games";
- XDG_MEDIA_DIR = "${toString cfg.mediaPath}";
- XDG_SS_DIR = "${toString cfg.mediaPath}/pics/ss";
- XDG_CLIPS_DIR = "${toString cfg.mediaPath}/vids/clips";
- XDG_MOVIES_DIR = "${toString cfg.mediaPath}/movies";
- XDG_ANIME_DIR = "${toString cfg.mediaPath}/anime";
- XDG_ARCHIVE_DIR = "${toString cfg.mediaPath}/archive";
+ PROJECTS = "${config.home.homeDirectory}/proj";
+ GAMES = "${config.home.homeDirectory}/games";
+ MEDIA = "${toString cfg.mediaPath}";
+ SS = "${toString cfg.mediaPath}/pics/ss";
+ CLIPS = "${toString cfg.mediaPath}/vids/clips";
+ MOVIES = "${toString cfg.mediaPath}/movies";
+ ANIME = "${toString cfg.mediaPath}/anime";
+ ARCHIVE = "${toString cfg.mediaPath}/archive";
};
};
- home.sessionVariables = {
- XDG_PROJECTS_DIR = "${config.home.homeDirectory}/proj";
- XDG_GAMES_DIR = "${config.home.homeDirectory}/games";
- XDG_MEDIA_DIR = "${toString cfg.mediaPath}";
- XDG_SS_DIR = "${toString cfg.mediaPath}/pics/ss";
- XDG_CLIPS_DIR = "${toString cfg.mediaPath}/vids/clips";
- XDG_MOVIES_DIR = "${toString cfg.mediaPath}/movies";
- XDG_ANIME_DIR = "${toString cfg.mediaPath}/anime";
- XDG_ARCHIVE_DIR = "${toString cfg.mediaPath}/archive";
- };
+ home.sessionVariables = {
+ PROJECTS = "${config.home.homeDirectory}/proj";
+ GAMES = "${config.home.homeDirectory}/games";
+ MEDIA = "${toString cfg.mediaPath}";
+ SS = "${toString cfg.mediaPath}/pics/ss";
+ CLIPS = "${toString cfg.mediaPath}/vids/clips";
+ MOVIES = "${toString cfg.mediaPath}/movies";
+ ANIME = "${toString cfg.mediaPath}/anime";
+ ARCHIVE = "${toString cfg.mediaPath}/archive";
+ };
};
}
diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix
new file mode 100644
index 0000000..0f55c5d
--- /dev/null
+++ b/hm/conf/xdg-mime.nix
@@ -0,0 +1,49 @@
+{ config, lib, ... }:
+let
+ cfg = config.hm.conf.xdg-mime;
+in
+{
+ options.hm.conf.xdg-mime = {
+ enable = lib.mkEnableOption "sets the default applications";
+ };
+ config = lib.mkIf cfg.enable {
+ xdg.mimeApps = {
+ enable = true;
+ defaultApplications = {
+ "application/pdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/epub+zip" = [ "org.pwmt.zathura.desktop" ];
+
+ "image/png" = [ "nsxiv.desktop" ];
+ "image/jpeg" = [ "nsxiv.desktop" ];
+ "image/gif" = [ "nsxiv.desktop" ];
+ "image/webp" = [ "nsxiv.desktop" ];
+ "image/bmp" = [ "nsxiv.desktop" ];
+
+ "video/mp4" = [ "mpv.desktop" ];
+ "video/x-matroska" = [ "mpv.desktop" ];
+ "video/webm" = [ "mpv.desktop" ];
+ "video/quicktime" = [ "mpv.desktop" ];
+
+ "audio/mpeg" = [ "mpv.desktop" ];
+ "audio/flac" = [ "mpv.desktop" ];
+ "audio/wav" = [ "mpv.desktop" ];
+ "audio/ogg" = [ "mpv.desktop" ];
+
+ "text/html" = [ "firefox.desktop" ];
+ "x-scheme-handler/http" = [ "firefox.desktop" ];
+ "x-scheme-handler/https" = [ "firefox.desktop" ];
+ "inode/directory" = [ "thunar.desktop" ];
+ };
+ };
+ home.sessionVariables = {
+ EDITOR = "nvim";
+ VISUAL = "nvim";
+ BROWSER = "librewolf";
+ TERMINAL = "foot";
+ GPG_TTY = "$(tty)";
+ COLORTERM = "truecolor";
+ };
+ };
+}