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
|
}: let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||||
in {
|
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 = {
|
programs.ncmpcpp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings."lyrics_directory" = "${config.xdg.dataHome}/ncmpcpp";
|
||||||
bindings =
|
bindings =
|
||||||
lib.mapAttrsToList (key: command: {inherit key command;})
|
lib.mapAttrsToList (key: command: {inherit key command;})
|
||||||
{
|
{
|
||||||
|
@ -28,10 +37,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = lib.mkIf isLinux {
|
||||||
mpd.enable = isLinux;
|
mpd.enable = true;
|
||||||
mpd-discord-rpc = {
|
mpd-discord-rpc = {
|
||||||
enable = isLinux;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
format = {
|
format = {
|
||||||
state = "$artist";
|
state = "$artist";
|
||||||
|
@ -42,6 +51,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
mpd-mpris.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
launchd.agents.mpd = {
|
launchd.agents.mpd = {
|
||||||
|
@ -74,8 +84,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#home.packages = lib.mkIf isLinux [pkgs.cider];
|
|
||||||
|
|
||||||
launchd.agents.discord-applemusic-rich-presence = {
|
launchd.agents.discord-applemusic-rich-presence = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
|
@ -33,4 +33,5 @@ in {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/settings.json";
|
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/kubernetes.nix
|
||||||
./apps/macos.nix
|
./apps/macos.nix
|
||||||
./apps/mail.nix
|
./apps/mail.nix
|
||||||
./apps/music.nix
|
./apps/media.nix
|
||||||
./apps/neovim.nix
|
./apps/neovim.nix
|
||||||
./apps/newsboat.nix
|
./apps/newsboat.nix
|
||||||
./apps/rice.nix
|
./apps/rice.nix
|
||||||
|
|
24
home/xdg.nix
24
home/xdg.nix
|
@ -10,6 +10,7 @@
|
||||||
inherit (config.home) homeDirectory;
|
inherit (config.home) homeDirectory;
|
||||||
in {
|
in {
|
||||||
home = rec {
|
home = rec {
|
||||||
|
packages = [pkgs.sccache];
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
AZURE_CONFIG_DIR = "${configHome}/azure";
|
AZURE_CONFIG_DIR = "${configHome}/azure";
|
||||||
CARGO_HOME = "${dataHome}/cargo";
|
CARGO_HOME = "${dataHome}/cargo";
|
||||||
|
@ -20,11 +21,15 @@ in {
|
||||||
GEM_HOME = "${dataHome}/gem";
|
GEM_HOME = "${dataHome}/gem";
|
||||||
GEM_SPEC_CACHE = "${cacheHome}/gem";
|
GEM_SPEC_CACHE = "${cacheHome}/gem";
|
||||||
GOPATH = "${dataHome}/go";
|
GOPATH = "${dataHome}/go";
|
||||||
NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
|
|
||||||
NODE_REPL_HISTORY = "${dataHome}/node_repl_history";
|
NODE_REPL_HISTORY = "${dataHome}/node_repl_history";
|
||||||
|
NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
|
||||||
|
RUSTC_WRAPPER = "sccache";
|
||||||
RUSTUP_HOME = "${dataHome}/rustup";
|
RUSTUP_HOME = "${dataHome}/rustup";
|
||||||
|
W3M_DIR = "${dataHome}/w3m";
|
||||||
WINEPREFIX = "${dataHome}/wine";
|
WINEPREFIX = "${dataHome}/wine";
|
||||||
|
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||||
XCOMPOSECACHE = "${cacheHome}/X11/xcompose";
|
XCOMPOSECACHE = "${cacheHome}/X11/xcompose";
|
||||||
|
XINITRC = "${configHome}/X11/xinitrc";
|
||||||
};
|
};
|
||||||
sessionPath = [
|
sessionPath = [
|
||||||
"$HOME/.local/bin"
|
"$HOME/.local/bin"
|
||||||
|
@ -32,12 +37,7 @@ in {
|
||||||
"${sessionVariables.GOPATH}/bin"
|
"${sessionVariables.GOPATH}/bin"
|
||||||
"${sessionVariables.CARGO_HOME}/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
|
# NOTE: workaround for gpgme on Darwin, since GUI apps aren't aware of $GNUPGHOME
|
||||||
programs.gpg.homedir =
|
programs.gpg.homedir =
|
||||||
|
@ -53,17 +53,7 @@ in {
|
||||||
dataHome = "${homeDirectory}/.local/share";
|
dataHome = "${homeDirectory}/.local/share";
|
||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = isLinux;
|
enable = isLinux;
|
||||||
defaultApplications = {
|
defaultApplications."inode/directory" = "thunar.desktop";
|
||||||
"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";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue