darwin rebuilding
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
{
|
||||
myConfig = {
|
||||
General = {
|
||||
terminal = {
|
||||
size = 18;
|
||||
font = "JetBrainsMono Nerd Font";
|
||||
shell = "fish"; # or zsh
|
||||
aliases = {};
|
||||
};
|
||||
};
|
||||
NixOS = {
|
||||
};
|
||||
Darwin = {
|
||||
username = "lsoriano";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
@@ -14,7 +15,10 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixovim = {
|
||||
url = "git+https://git.sakamoto.dev/kenji/nixovim.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
@@ -31,28 +35,26 @@
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
homeManagerModule = {
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
args = {inherit system pkgs;};
|
||||
|
||||
config = ./config.nix;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
"hakase" = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
config
|
||||
./hosts/nixos/my-nixos-desktop/configuration.nix
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.youruser = homeManagerModule;
|
||||
# home-manager.users.youruser = import ./home/youruser/home.nix;
|
||||
home-manager.users.youruser = import ./home/youruser/home.nix;
|
||||
}
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
inherit self pkgs;
|
||||
};
|
||||
specialArgs = args;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -60,11 +62,9 @@
|
||||
"kenji" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
homeManagerModule
|
||||
config
|
||||
./home/kenji/home.nix
|
||||
];
|
||||
|
||||
# specialArgs = { inherit self; };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -72,20 +72,10 @@
|
||||
"my-macbook-pro" = nix-darwin.lib.darwinSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./hosts/darwin/my-macbook-pro/configuration.nix
|
||||
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.youruser = homeManagerModule;
|
||||
# home-manager.users.youruser = import ./home/youruser/home.nix;
|
||||
}
|
||||
config
|
||||
./hosts/darwin/macbook-air/configuration.nix
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
inherit self pkgs;
|
||||
};
|
||||
specialArgs = args;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{}: {
|
||||
imports = [
|
||||
../../modules/home/terminal.nix
|
||||
];
|
||||
home.stateVersion = "25.11";
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
inputs,
|
||||
myConfig,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
home-manager.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
|
||||
users.users.${myConfig.Darwin.username} = {
|
||||
name = "${myConfig.Darwin.username}";
|
||||
home = "/Users/${myConfig.Darwin.username}";
|
||||
# shell = pkgs.${myConfig.general.terminal.Shell}; # no support for nix-darwin, but can be changed via chsh.
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit pkgs system;};
|
||||
users.${myConfig.Darwin.username} = import ../../../home/darwin/home.nix;
|
||||
};
|
||||
|
||||
system.stateVersion = 5;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{}: {
|
||||
programs = {
|
||||
kitty.enable = true;
|
||||
zsh.enable = true;
|
||||
starship.enable = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
../../pkgs/fish/home.nix
|
||||
../../pkgs/kitty/home.nix
|
||||
../../pkgs/fonts/home.nix
|
||||
../../pkgs/neovim/home.nix
|
||||
../../pkgs/starship/home.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
myConfig,
|
||||
...
|
||||
}: {
|
||||
programs.fish = {
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
fish_vi_key_bindings
|
||||
zoxide init fish | source
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
fonts = {
|
||||
fontconfig.enable = true;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
myConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.kitty = {
|
||||
themeFile = "kanagawa";
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
window_padding_width = 10;
|
||||
|
||||
font_size = myConfig.General.terminal.size;
|
||||
font_family = myConfig.General.terminal.font;
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
shell = "${pkgs.${myConfig.General.terminal.shell}}/bin/${myConfig.General.terminal.shell}";
|
||||
|
||||
# optimization
|
||||
input_delay = 0;
|
||||
repaint_delay = 2;
|
||||
sync_to_monitor = false;
|
||||
wayland_enable_ime = false;
|
||||
allow_remote_control = true;
|
||||
};
|
||||
# extraConfig = "include colors.conf";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nixovim.packages.${system}.fullNvim
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{lib, ...}: {
|
||||
programs.starship = {
|
||||
settings = {
|
||||
format = lib.concatStrings [
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$cmd_duration"
|
||||
"$line_break"
|
||||
"$python"
|
||||
"$character"
|
||||
];
|
||||
|
||||
directory = {
|
||||
style = "blue";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[→](purple)";
|
||||
error_symbol = "[→](red)";
|
||||
vimcmd_symbol = "[←](green)";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
format = "[$branch]($style)";
|
||||
style = "bright-black";
|
||||
};
|
||||
git_status = {
|
||||
format = "[(*$conflicted$untracked$modified$staged$renamed$deleted) $ahead_behind$stashed]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
untracked = "";
|
||||
modified = "";
|
||||
staged = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
format = "[$duration]($style) ";
|
||||
style = "yellow";
|
||||
};
|
||||
|
||||
python = {
|
||||
format = "[$virtualenv]($style) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
};
|
||||
};
|
||||
# home.file.".config/starship.toml" = {
|
||||
# source = builtins.toPath ./pure.toml;
|
||||
# };
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
pkgs,
|
||||
myConfig,
|
||||
...
|
||||
}: {
|
||||
programs.zsh = {
|
||||
enableCompletion = false;
|
||||
syntaxHighlighting.enable = false;
|
||||
# shellAliases = myConfig.general.Terminal.aliases;
|
||||
history.size = 10000;
|
||||
antidote = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"MichaelAquilina/zsh-autoswitch-virtualenv"
|
||||
"jeffreytse/zsh-vi-mode"
|
||||
"zdharma-continuum/fast-syntax-highlighting kind:defer"
|
||||
"zsh-users/zsh-autosuggestions kind:defer"
|
||||
"zsh-users/zsh-history-substring-search kind:defer"
|
||||
];
|
||||
};
|
||||
initContent = ''
|
||||
# zsh-autocomplete
|
||||
# bindkey -M menuselect '^M' .accept-line # run code when selected completion
|
||||
|
||||
autoload -Uz compinit
|
||||
if [ "$(date +'%j')" != "$(stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)" ]; then
|
||||
compinit
|
||||
else
|
||||
compinit -C
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user