mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-28 11:43:51 -08:00
refactor: correctly build darwin
This commit is contained in:
parent
b1f250812d
commit
5a7a329829
5 changed files with 35 additions and 144 deletions
|
@ -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;
|
||||
|
|
|
@ -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" ]; })
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# 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; [
|
||||
|
@ -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
|
||||
|
|
18
modules/home-manager/linux/catppuccin.nix
Normal file
18
modules/home-manager/linux/catppuccin.nix
Normal file
|
@ -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";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue