diff --git a/flake.nix b/flake.nix index 0a92d8d..66fadd1 100755 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,7 @@ ./modules/home-manager/linux/desktop.nix ./modules/home-manager/linux/programs.nix ./modules/home-manager/common/core.nix + ./modules/home-manager/common/catppuccin.nix inputs.catppuccin.homeManagerModules.catppuccin ]; }; @@ -78,7 +79,7 @@ darwinConfigurations."Youwens-MacBook-Pro" = nix-darwin.lib.darwinSystem { specialArgs = { inherit inputs; }; modules = [ - ./modules/common/fonts.nix + ./modules/darwin/darwin-configuration.nix home-manager.darwinModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/modules/darwin/darwin-configuration.nix b/modules/darwin/darwin-configuration.nix index 0f0901e..4f87456 100644 --- a/modules/darwin/darwin-configuration.nix +++ b/modules/darwin/darwin-configuration.nix @@ -1,6 +1,6 @@ -{ config, pkgs, self, ... }: { +{ config, pkgs, ... }: { # Expose the package set, including overlays, for convenience. - darwinPackages = self.darwinConfigurations."Youwens-MacBook-Pro".pkgs; + # darwinPackages = config.self.darwinConfigurations."Youwens-MacBook-Pro".pkgs; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget @@ -39,4 +39,14 @@ }; security.pam.enableSudoTouchIdAuth = true; + + fonts = { + packages = with pkgs; [ + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + (nerdfonts.override { fonts = [ "CascadiaCode" ]; }) + (google-fonts.override { fonts = [ "Lora" ]; }) + ]; + }; } diff --git a/modules/home-manager/common/core.nix b/modules/home-manager/common/core.nix index 85336fe..07dae28 100644 --- a/modules/home-manager/common/core.nix +++ b/modules/home-manager/common/core.nix @@ -12,10 +12,9 @@ programs.fzf = { enable = true; - catppuccin.enable = true; }; - programs.git = { + programs.git = pkgs.lib.mkDefault { enable = true; userName = "Youwen Wu"; userEmail = "youwenw@gmail.com"; @@ -29,8 +28,6 @@ programs.lazygit = { enable = true; - catppuccin.enable = true; - catppuccin.flavor = "macchiato"; settings = { git.paging = { colorArg = "always"; @@ -40,10 +37,6 @@ }; programs.bat.enable = true; - programs.bat.catppuccin = { - enable = true; - flavor = "macchiato"; - }; programs.ripgrep.enable = true; @@ -74,8 +67,6 @@ programs.fish = { enable = true; - catppuccin.enable = true; - catppuccin.flavor = "mocha"; shellAliases = { rebuild = "sudo nixos-rebuild switch"; ls = "eza -l --icons=auto"; diff --git a/modules/home-manager/darwin/darwin-home.nix b/modules/home-manager/darwin/darwin-home.nix index a41bfb5..d2246db 100644 --- a/modules/home-manager/darwin/darwin-home.nix +++ b/modules/home-manager/darwin/darwin-home.nix @@ -19,8 +19,8 @@ # xxx # ''; - home.file.".config/neofetch/config.conf".source = ./config/neofetch.conf; - + home.file.".config/neofetch/config.conf".source = ../../../config/neofetch.conf; + # Packages that should be installed to the user profile. home.packages = with pkgs; [ neofetch @@ -46,8 +46,6 @@ rust-analyzer ]; - programs.fzf = { enable = true; }; - programs.git = { enable = true; userName = "Youwen Wu"; @@ -60,20 +58,6 @@ }; }; - programs.lazygit = { - enable = true; - settings = { - git.paging = { - colorArg = "always"; - pager = "delta --dark --paging=never"; - }; - }; - }; - - programs.bat.enable = true; - - programs.ripgrep.enable = true; - programs.kitty = { enable = true; theme = "Tokyo Night"; @@ -88,23 +72,6 @@ }; }; - programs.readline = { - enable = true; - extraConfig = "set editing-mode vi"; - }; - - programs.zoxide = { - enable = true; - # enableZshIntegration = true; - enableFishIntegration = true; - enableNushellIntegration = true; - }; - - programs.gh = { - enable = true; - extensions = [ pkgs.github-copilot-cli ]; - }; - programs.oh-my-posh = { enable = true; enableZshIntegration = true; @@ -112,105 +79,9 @@ enableBashIntegration = true; useTheme = "gruvbox"; }; - - programs.fish = { - enable = true; - shellAliases = { - rebuild = "sudo nixos-rebuild switch"; - ls = "eza -l --icons=auto"; - }; - functions = { - update-nixos = { - description = - "Update the system flake and attempt to build and switch to the new configuration."; - body = '' - cd /etc/nixos - nix flake update - sudo nixos-rebuild switch - ''; - }; - }; - interactiveShellInit = '' - fish_vi_key_bindings - set -g fish_greeting - ''; - plugins = [ - { - name = "autopair"; - src = pkgs.fetchFromGitHub { - owner = "jorgebucaran"; - repo = "autopair.fish"; - rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2"; - hash = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A="; - }; - } - { - name = "fzf"; - src = pkgs.fetchFromGitHub { - owner = "PatrickF1"; - repo = "fzf.fish"; - rev = "8920367cf85eee5218cc25a11e209d46e2591e7a"; - hash = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM="; - }; - } - { - name = "sponge"; - src = pkgs.fetchFromGitHub { - owner = "meaningful-ooo"; - repo = "sponge"; - rev = "384299545104d5256648cee9d8b117aaa9a6d7be"; - hash = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w="; - }; - } - { - name = "done"; - src = pkgs.fetchFromGitHub { - owner = "franciscolourenco"; - repo = "done"; - rev = "eb32ade85c0f2c68cbfcff3036756bbf27a4f366"; - hash = "sha256-DMIRKRAVOn7YEnuAtz4hIxrU93ULxNoQhW6juxCoh4o="; - }; - } - ]; - }; - - programs.nushell = { - enable = true; - configFile.text = '' - $env.config = { - edit_mode: vi, - show_banner: false - } - ''; - }; - - programs.fd.enable = true; - - programs.btop = { - enable = true; - settings = { - color_theme = "tokyo-night"; - vim_keys = true; - theme_background = false; - }; - }; - - programs.eza = { - enable = true; - enableFishIntegration = true; - enableBashIntegration = true; - }; - programs.bash.enable = true; programs.zsh.enable = true; - programs.neovim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - }; - # This value determines the home Manager release that your # configuration is compatible with. This helps avoid breakage # when a new home Manager release introduces backwards diff --git a/modules/home-manager/linux/catppuccin.nix b/modules/home-manager/linux/catppuccin.nix new file mode 100644 index 0000000..4e08a2f --- /dev/null +++ b/modules/home-manager/linux/catppuccin.nix @@ -0,0 +1,18 @@ +{ + programs.fzf.catppuccin = { + enable = true; + flavor = "macchiato"; + }; + programs.lazygit.catppuccin = { + enable = true; + flavor = "macchiato"; + }; + programs.bat.catppuccin = { + enable = true; + flavor = "macchiato"; + }; + programs.fish.catppuccin = { + enable = true; + flavor = "mocha"; + }; +}