mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
nix-darwin: home for darwin
This commit is contained in:
parent
f68ac5a89a
commit
3e0fa1770e
11 changed files with 353 additions and 291 deletions
|
|
@ -157,6 +157,8 @@
|
|||
extraSpecialArgs = specialArgs;
|
||||
modules = [
|
||||
./users/js0ny/zen.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
betterfox-nix.modules.homeManager.betterfox
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,14 +30,7 @@
|
|||
"wireshark-app"
|
||||
"clash-verge-rev"
|
||||
|
||||
# Editor
|
||||
"visual-studio-code"
|
||||
|
||||
# Browsers
|
||||
"firefox"
|
||||
|
||||
# Terminal Emulator
|
||||
"ghostty"
|
||||
"kitty"
|
||||
|
||||
# Fonts
|
||||
|
|
@ -54,7 +47,7 @@
|
|||
"alt-tab" # Turn cmd-tab to windows behaviour
|
||||
"karabiner-elements" # Keymapping
|
||||
"localsend"
|
||||
"squirrel" # Input Method
|
||||
"squirrel-app" # Input Method
|
||||
"rustdesk" # Remote Desktop
|
||||
"iina" # MPV Frontend
|
||||
# TODO: I think karabiner is the superset
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{pkgs, ...}: {
|
||||
system.defaults.dock = {
|
||||
appswitcher-all-displays = true;
|
||||
autohide = true;
|
||||
|
|
@ -8,10 +8,9 @@
|
|||
mineffect = "suck";
|
||||
minimize-to-application = true;
|
||||
persistent-apps = [
|
||||
{app = "/Applications/Vivaldi.app";}
|
||||
{app = "/Applications/kitty.app";}
|
||||
{app = "${pkgs.firefox}/Applications/Firefox.app";}
|
||||
{app = "${pkgs.ghostty-bin}/Applications/Ghostty.app";}
|
||||
{app = "/Applications/Obsidian.app";}
|
||||
{app = "Applications/Visual Studio Code.app";}
|
||||
# { app = "/Applications/LibreWolf.app"; }
|
||||
# { spacer = { small = false; }; }
|
||||
# { spacer = { small = true; }; }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
# Use: https://github.com/TemariVirus/fcitx-ini2nix
|
||||
i18n.inputMethod = {
|
||||
i18n.inputMethod =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then {enable = false;}
|
||||
else {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5 = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
{lib, ...}: {
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
profileDir =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then "Library/Application Support/Firefox/Profiles"
|
||||
else ".mozilla/firefox";
|
||||
in {
|
||||
# Overwrite search.json.mozlz4
|
||||
home.file.".mozilla/firefox/default/search.json.mozlz4".force = lib.mkForce true;
|
||||
home.file."${profileDir}/default/search.json.mozlz4".force = lib.mkForce true;
|
||||
programs.firefox.profiles.default.search.engines = {
|
||||
alternativeto = {
|
||||
name = "AlternativeTo";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,21 @@
|
|||
{config, ...}: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
package =
|
||||
if pkgs.stdenv.isLinux
|
||||
then pkgs.ghostty
|
||||
else pkgs.ghostty-bin;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
systemd.enable = true;
|
||||
systemd.enable =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then false
|
||||
else true;
|
||||
# Not ready
|
||||
settings = {
|
||||
command = "${config.currentUser.defaultShell}";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# Only use this method in NixOS or non-FHS environment
|
||||
{pkgs, ...}: let
|
||||
imageTag = "ghcr.io/pdfmathtranslate/pdfmathtranslate-next";
|
||||
# version = "2.6.4";
|
||||
13
nixcfgs/users/js0ny/programs/pdf2zh/uv.nix
Normal file
13
nixcfgs/users/js0ny/programs/pdf2zh/uv.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = [pkgs.uv];
|
||||
home.activation.uvInstallPdf2Zh = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
if [ ! -f $HOME/.local/bin/pdf2zh ]; then
|
||||
uv tool install pdf2zh
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
|
@ -2,7 +2,10 @@
|
|||
catppuccin.zed.enable = false;
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
package = pkgs.zed-editor-fhs;
|
||||
package =
|
||||
if pkgs.stdenv.isLinux
|
||||
then pkgs.zed-editor-fhs
|
||||
else pkgs.zed-editor;
|
||||
extensions = [
|
||||
"catppuccin"
|
||||
"material-icon-theme"
|
||||
|
|
|
|||
|
|
@ -1,22 +1,50 @@
|
|||
{...}: {
|
||||
{lib, ...}: {
|
||||
imports = [
|
||||
./default.nix
|
||||
|
||||
# Packages
|
||||
./packages/cli.nix
|
||||
./packages/catppuccin.nix
|
||||
|
||||
# Shell
|
||||
./programs/shell/bash.nix
|
||||
./programs/shell/zsh.nix
|
||||
./programs/shell/fish.nix
|
||||
./programs/shell/direnv.nix
|
||||
|
||||
# IME
|
||||
# Programs
|
||||
./programs/firefox
|
||||
./programs/zed-editor.nix
|
||||
./programs/rime.nix
|
||||
./programs/nvim.nix
|
||||
./programs/fzf.nix
|
||||
./programs/sdcv.nix
|
||||
./programs/fzf.nix
|
||||
./programs/nvim.nix
|
||||
./programs/pdf2zh/uv.nix
|
||||
./programs/yazi.nix
|
||||
./programs/edit-clipboard.nix
|
||||
./programs/neovide.nix
|
||||
./programs/ghostty.nix
|
||||
|
||||
../../modules/home/dev/nix.nix
|
||||
../../modules/home/programs/eza.nix
|
||||
../../modules/home/programs/lsd.nix
|
||||
../../modules/home/programs/starship.nix
|
||||
../../modules/home/programs/zoxide.nix
|
||||
|
||||
../../modules/home/dev/nix.nix
|
||||
];
|
||||
|
||||
home.sessionPath = ["/opt/homebrew/bin"];
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/Users/js0ny/.dotfiles/nixcfgs";
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep 5 --keep-since 3d";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.desktopEntries = lib.mkForce {};
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
./programs/nvim.nix
|
||||
./programs/ollama.nix
|
||||
./programs/sops.nix
|
||||
./programs/pdf2zh.nix
|
||||
./programs/pdf2zh/container.nix
|
||||
./programs/gwenview.nix
|
||||
./programs/yazi.nix
|
||||
./programs/dolphin.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue