mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-22 01:03:00 +00:00
rebuild on darwin
This commit is contained in:
parent
6f3f19ee86
commit
85b644c512
10 changed files with 156 additions and 78 deletions
31
nixcfgs/users/js0ny/programs/duti.nix
Normal file
31
nixcfgs/users/js0ny/programs/duti.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
gvim = "com.neovide.neovide";
|
||||
iina = "com.colliderli.iina";
|
||||
# firefox = "org.nixos.firefox";
|
||||
keka = "com.aone.keka";
|
||||
|
||||
defaultApps = {
|
||||
"${gvim}" = ["md" "json" "js" "txt" "xml"];
|
||||
"${iina}" = ["mp4" "mkv"];
|
||||
# "${firefox}" = ["html"];
|
||||
"${keka}" = ["7z" "zip" "rar" "tar"];
|
||||
};
|
||||
|
||||
duti = "${pkgs.duti}/bin/duti";
|
||||
mkDutiCommands = app: extensions:
|
||||
map (ext: "${duti} -s ${app} ${ext} all") extensions;
|
||||
in {
|
||||
home.packages = [pkgs.duti];
|
||||
|
||||
home.activation.setOSXDefaultApps = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
${
|
||||
lib.concatStringsSep "\n" (
|
||||
lib.flatten (lib.mapAttrsToList mkDutiCommands defaultApps)
|
||||
)
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue