refactor: move mime types to respective configs
This commit is contained in:
parent
f168742184
commit
d56f98b568
5 changed files with 29 additions and 23 deletions
|
@ -155,4 +155,11 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
"x-scheme-handler/about" = "firefox.desktop";
|
||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,8 +6,17 @@
|
|||
}: let
|
||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||
in {
|
||||
programs.mpv.enable = isLinux;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"video/mp4" = "mpv.desktop";
|
||||
"video/webm" = "mpv.desktop";
|
||||
};
|
||||
programs.zathura.enable = true;
|
||||
xdg.mimeApps.defaultApplications."application/pdf" = "zathura.desktop";
|
||||
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
settings."lyrics_directory" = "${config.xdg.dataHome}/ncmpcpp";
|
||||
bindings =
|
||||
lib.mapAttrsToList (key: command: {inherit key command;})
|
||||
{
|
||||
|
@ -28,10 +37,10 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
mpd.enable = isLinux;
|
||||
services = lib.mkIf isLinux {
|
||||
mpd.enable = true;
|
||||
mpd-discord-rpc = {
|
||||
enable = isLinux;
|
||||
enable = true;
|
||||
settings = {
|
||||
format = {
|
||||
state = "$artist";
|
||||
|
@ -42,6 +51,7 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
mpd-mpris.enable = true;
|
||||
};
|
||||
|
||||
launchd.agents.mpd = {
|
||||
|
@ -74,8 +84,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
#home.packages = lib.mkIf isLinux [pkgs.cider];
|
||||
|
||||
launchd.agents.discord-applemusic-rich-presence = {
|
||||
enable = true;
|
||||
config = {
|
|
@ -33,4 +33,5 @@ in {
|
|||
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/settings.json";
|
||||
};
|
||||
};
|
||||
xdg.mimeApps.defaultApplications."text/plain" = "code.desktop";
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ in {
|
|||
./apps/kubernetes.nix
|
||||
./apps/macos.nix
|
||||
./apps/mail.nix
|
||||
./apps/music.nix
|
||||
./apps/media.nix
|
||||
./apps/neovim.nix
|
||||
./apps/newsboat.nix
|
||||
./apps/rice.nix
|
||||
|
|
24
home/xdg.nix
24
home/xdg.nix
|
@ -10,6 +10,7 @@
|
|||
inherit (config.home) homeDirectory;
|
||||
in {
|
||||
home = rec {
|
||||
packages = [pkgs.sccache];
|
||||
sessionVariables = {
|
||||
AZURE_CONFIG_DIR = "${configHome}/azure";
|
||||
CARGO_HOME = "${dataHome}/cargo";
|
||||
|
@ -20,11 +21,15 @@ in {
|
|||
GEM_HOME = "${dataHome}/gem";
|
||||
GEM_SPEC_CACHE = "${cacheHome}/gem";
|
||||
GOPATH = "${dataHome}/go";
|
||||
NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
|
||||
NODE_REPL_HISTORY = "${dataHome}/node_repl_history";
|
||||
NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
|
||||
RUSTC_WRAPPER = "sccache";
|
||||
RUSTUP_HOME = "${dataHome}/rustup";
|
||||
W3M_DIR = "${dataHome}/w3m";
|
||||
WINEPREFIX = "${dataHome}/wine";
|
||||
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||
XCOMPOSECACHE = "${cacheHome}/X11/xcompose";
|
||||
XINITRC = "${configHome}/X11/xinitrc";
|
||||
};
|
||||
sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
|
@ -32,12 +37,7 @@ in {
|
|||
"${sessionVariables.GOPATH}/bin"
|
||||
"${sessionVariables.CARGO_HOME}/bin"
|
||||
];
|
||||
packages = [pkgs.sccache];
|
||||
};
|
||||
xdg.configFile."cargo/config".text = ''
|
||||
[build]
|
||||
rustc-wrapper = "sccache"
|
||||
'';
|
||||
|
||||
# NOTE: workaround for gpgme on Darwin, since GUI apps aren't aware of $GNUPGHOME
|
||||
programs.gpg.homedir =
|
||||
|
@ -53,17 +53,7 @@ in {
|
|||
dataHome = "${homeDirectory}/.local/share";
|
||||
mimeApps = {
|
||||
enable = isLinux;
|
||||
defaultApplications = {
|
||||
"inode/directory" = "thunar.desktop";
|
||||
"application/pdf" = "zathura.desktop";
|
||||
|
||||
"text/plain" = "code.desktop";
|
||||
"text/html" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
"x-scheme-handler/about" = "firefox.desktop";
|
||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||
};
|
||||
defaultApplications."inode/directory" = "thunar.desktop";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue