Reorganize common configuration
This commit is contained in:
parent
b0435707e4
commit
84dfefcb45
18 changed files with 81 additions and 128 deletions
11
common/home-manager/default.nix
Normal file
11
common/home-manager/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [ ./development.nix ./zsh.nix ];
|
||||
home = {
|
||||
username = "avery";
|
||||
homeDirectory = "/home/avery";
|
||||
stateVersion = "24.05";
|
||||
packages = with pkgs; [ rclone xdg-utils ];
|
||||
sessionVariables = { EDITOR = "nvim"; };
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
}
|
|
@ -1,18 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [ ./nixvim ];
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
android-studio
|
||||
android-tools
|
||||
git-credential-manager
|
||||
gnupg
|
||||
pass
|
||||
dotnet-sdk_8
|
||||
unityhub
|
||||
mitmproxy
|
||||
xh
|
||||
];
|
||||
};
|
||||
home = { packages = with pkgs; [ git-credential-manager gnupg pass ]; };
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
|
@ -24,7 +12,7 @@
|
|||
"https://git.rcia.dev".provider = "generic";
|
||||
};
|
||||
init.defaultBranch = "main";
|
||||
merge.tool = "nvim -d";
|
||||
merge.tool = "nvimdiff";
|
||||
};
|
||||
signing = {
|
||||
key = "B684FD451B692E04";
|
45
common/home-manager/zsh.nix
Normal file
45
common/home-manager/zsh.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ config, lib, ... }: {
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
initContent = let
|
||||
earlyInit = lib.mkBefore ''
|
||||
setopt AUTO_PUSHD
|
||||
setopt SHARE_HISTORY
|
||||
setopt MENUCOMPLETE
|
||||
autoload -U history-search-end
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
bindkey "^[OA" history-beginning-search-backward-end
|
||||
bindkey "^[OB" history-beginning-search-forward-end
|
||||
bindkey "^r" history-incremental-search-backward
|
||||
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST
|
||||
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*:descriptions' format '%B%d%b'
|
||||
zstyle ':completion:*:messages' format '%d'
|
||||
zstyle ':completion:*:warnings' format 'No matches for: %d'
|
||||
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
|
||||
zstyle ':completion:*' group-name \'\'
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
||||
'';
|
||||
postInit = lib.mkAfter ''
|
||||
if [ -x "$(command -v fastfetch)" ]; then
|
||||
fastfetch
|
||||
fi
|
||||
'';
|
||||
in lib.mkMerge [ earlyInit postInit ];
|
||||
history.path = "${config.xdg.dataHome}/zhistory";
|
||||
syntaxHighlighting.enable = true;
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home = {
|
||||
username = "avery";
|
||||
homeDirectory = "/home/avery";
|
||||
stateVersion = "24.05";
|
||||
packages = with pkgs; [ python3 rclone xdg-utils ];
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
DOTNET_ROOT = "${pkgs.dotnet-sdk_8}";
|
||||
};
|
||||
sessionPath = [ "$HOME/.dotnet/tools" ];
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ config, lib, ... }: {
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
initContent = lib.mkBefore ''
|
||||
setopt AUTO_PUSHD
|
||||
setopt SHARE_HISTORY
|
||||
setopt MENUCOMPLETE
|
||||
autoload -U history-search-end
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
bindkey "^[OA" history-beginning-search-backward-end
|
||||
bindkey "^[OB" history-beginning-search-forward-end
|
||||
bindkey "^r" history-incremental-search-backward
|
||||
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST
|
||||
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*:descriptions' format '%B%d%b'
|
||||
zstyle ':completion:*:messages' format '%d'
|
||||
zstyle ':completion:*:warnings' format 'No matches for: %d'
|
||||
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
|
||||
zstyle ':completion:*' group-name \'\'
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
||||
|
||||
fastfetch
|
||||
'';
|
||||
history.path = "${config.xdg.dataHome}/zhistory";
|
||||
syntaxHighlighting.enable = true;
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
13
flake.nix
13
flake.nix
|
@ -61,8 +61,7 @@
|
|||
inputs.ags.homeManagerModules.default
|
||||
inputs.autofirma-nix.homeManagerModules.default
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./common/home.nix
|
||||
./common/zsh.nix
|
||||
./common/home-manager
|
||||
./hosts/totsugeki/home-manager
|
||||
];
|
||||
};
|
||||
|
@ -86,9 +85,7 @@
|
|||
users.avery = {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./common/home.nix
|
||||
./common/zsh.nix
|
||||
./hosts/totsugeki/home-manager/development/nixvim
|
||||
./common/home-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -99,8 +96,8 @@
|
|||
mizuki = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
inputs.nixos-wsl.nixosModules.default
|
||||
./hosts/mizuki/nixos.nix
|
||||
inputs.nixos-wsl.nixosModules.default
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
|
@ -110,9 +107,7 @@
|
|||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./hosts/mizuki/home.nix
|
||||
./common/zsh.nix
|
||||
./hosts/totsugeki/home-manager/development/nixvim
|
||||
./hosts/mizuki/development.nix
|
||||
./common/home-manager
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,50 +1 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ xh gnupg git-credential-manager pass wslu ];
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
merge.tool = "nvim -d";
|
||||
credential = {
|
||||
credentialStore = "gpg";
|
||||
helper = "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
"https://git.rcia.dev".provider = "generic";
|
||||
};
|
||||
};
|
||||
signing = {
|
||||
key = "B684FD451B692E04";
|
||||
signByDefault = true;
|
||||
};
|
||||
userEmail = "aveeryy@protonmail.com";
|
||||
userName = "Avery";
|
||||
};
|
||||
lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
gui.theme = {
|
||||
activeBorderColor = [ "#89b4fa" "bold" ];
|
||||
inactiveBorderColor = [ "#a6adc8" ];
|
||||
optionsTextColor = [ "#89b4fa" ];
|
||||
selectedLineBgColor = [ "#313244" ];
|
||||
selectedRangeBgColor = [ "#313244" ];
|
||||
cherryPickedCommitBgColor = [ "#45475a" ];
|
||||
cherryPickedCommitFgColor = [ "#89b4fa" ];
|
||||
unstagedChangesColor = [ "#f38ba8" ];
|
||||
defaultFgColor = [ "#cdd6f4" ];
|
||||
searchingActiveBorderColor = [ "#f9e2af" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
gpg-agent = {
|
||||
defaultCacheTtl = 3600;
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableZshIntegration = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
{ pkgs, ... }: { home.packages = with pkgs; [ python3 xh wslu ]; }
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
{ ... }: { imports = [ ./desktop ./development ./scripts ./autofirma.nix ]; }
|
||||
{ ... }: {
|
||||
imports = [ ./desktop ./development.nix ./scripts ./autofirma.nix ];
|
||||
}
|
||||
|
|
15
hosts/totsugeki/home-manager/development.nix
Normal file
15
hosts/totsugeki/home-manager/development.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }: {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
android-studio
|
||||
android-tools
|
||||
dotnet-sdk_8
|
||||
mitmproxy
|
||||
python3
|
||||
unityhub
|
||||
xh
|
||||
];
|
||||
sessionVariables = { DOTNET_ROOT = "${pkgs.dotnet-sdk_8}"; };
|
||||
sessionPath = [ "$HOME/.dotnet/tools" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue