mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Configure zsh
This commit is contained in:
parent
c9b3277d95
commit
349e926e32
6 changed files with 60 additions and 25 deletions
|
|
@ -8,7 +8,6 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
# System
|
# System
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
mods.user.name = "muon";
|
mods.user.name = "muon";
|
||||||
networking.hostName = cfg.user.name;
|
networking.hostName = cfg.user.name;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
|
networking.interfaces.enp0s31f6.mtu = 1200;
|
||||||
# networking.interfaces.tun0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.tun0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.vboxnet0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.vboxnet0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ let cfg = osConfig.mods; in {
|
||||||
programs.qutebrowser.enable = true;
|
programs.qutebrowser.enable = true;
|
||||||
mods.social.enable = true;
|
mods.social.enable = true;
|
||||||
mods.i3.enable = true;
|
mods.i3.enable = true;
|
||||||
|
mods.terminal.zsh.enable = true;
|
||||||
mods.terminal.emulator.enable = true;
|
mods.terminal.emulator.enable = true;
|
||||||
mods.terminal.development.enable = true;
|
mods.terminal.development.enable = true;
|
||||||
mods.terminal.tools.enable = true;
|
mods.terminal.tools.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,20 @@
|
||||||
{ pkgs, lib, config, osConfig, ... }: {
|
{ pkgs, lib, config, ... }:
|
||||||
programs.zsh = {
|
let
|
||||||
|
cfg = config.mods.terminal;
|
||||||
|
|
||||||
|
aliases = {
|
||||||
|
la = "ls -lah";
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.mods.terminal = {
|
||||||
|
zsh.enable = lib.mkEnableOption "enables zsh";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
programs.starship.enable = true;
|
||||||
|
|
||||||
|
programs.zsh = lib.mkIf cfg.zsh.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
|
|
@ -14,13 +29,15 @@
|
||||||
path = "${config.xdg.dataHome}/zsh/history";
|
path = "${config.xdg.dataHome}/zsh/history";
|
||||||
};
|
};
|
||||||
|
|
||||||
zplug = {
|
shellAliases = aliases;
|
||||||
enable = true;
|
|
||||||
plugins = [
|
plugins = with pkgs; [
|
||||||
{ name = "jeffreytse/zsh-vi-mode"; }
|
{
|
||||||
|
name = "zsh-vi-mode";
|
||||||
|
src = zsh-vi-mode;
|
||||||
|
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.starship.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,24 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }:
|
||||||
options.mods.terminal.tools.enable = lib.mkEnableOption "enables cli tools";
|
let
|
||||||
|
cfg = config.mods.terminal;
|
||||||
|
in with lib; {
|
||||||
|
options.mods.terminal.tools.enable = mkEnableOption "enables cli tools";
|
||||||
|
|
||||||
config = lib.mkIf config.mods.terminal.tools.enable {
|
config = mkIf cfg.tools.enable {
|
||||||
programs.zellij.enable = true;
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.dircolors = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# libraries
|
# libraries
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||||
flake = "/home/${config.mods.user.name}/.config/home";
|
flake = "/home/${config.mods.user.name}/.config/home";
|
||||||
};
|
};
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org"
|
"https://cache.nixos.org"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue