configure zsh and fix mpd
This commit is contained in:
parent
fb92731190
commit
cd8efd23f3
5 changed files with 45 additions and 25 deletions
|
|
@ -41,8 +41,11 @@ in {
|
||||||
./programs/neovim/.
|
./programs/neovim/.
|
||||||
./programs/git.nix
|
./programs/git.nix
|
||||||
./programs/lf/.
|
./programs/lf/.
|
||||||
|
./programs/shell.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
roles.mpd.enable = true;
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
home.homeDirectory = "/home/${config.home.username}";
|
home.homeDirectory = "/home/${config.home.username}";
|
||||||
|
|
@ -68,17 +71,6 @@ in {
|
||||||
ansible
|
ansible
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.starship.enable = true;
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
dotDir = ".config/zsh";
|
|
||||||
history = {
|
|
||||||
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
|
||||||
};
|
|
||||||
defaultKeymap = "vicmd";
|
|
||||||
autocd = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.udiskie = {
|
services.udiskie = {
|
||||||
enable = true;
|
enable = true;
|
||||||
notify = true;
|
notify = true;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.roles.mpd;
|
cfg = config.roles.mpd;
|
||||||
|
terminal = config.programs.terminal;
|
||||||
|
termcmd = "${terminal}/bin/${terminal.pname}";
|
||||||
in {
|
in {
|
||||||
options.roles.mpd = {
|
options.roles.mpd = {
|
||||||
enable = mkEnableOption "setup mpd client";
|
enable = mkEnableOption "setup mpd client";
|
||||||
|
|
@ -48,6 +50,16 @@ in {
|
||||||
mpd.host = cfg.host;
|
mpd.host = cfg.host;
|
||||||
};
|
};
|
||||||
programs.waybar.settings.mainBar.mpd.server = cfg.host;
|
programs.waybar.settings.mainBar.mpd.server = cfg.host;
|
||||||
|
programs.scripts = [
|
||||||
|
{
|
||||||
|
name = "ncmpcpp";
|
||||||
|
text = ''
|
||||||
|
${termcmd} -e ${pkgs.ncmpcpp}/bin/ncmpcpp
|
||||||
|
'';
|
||||||
|
hotkeys = [{key = "M";}];
|
||||||
|
install = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
snapclient = {
|
snapclient = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
terminal = config.programs.terminal;
|
terminal = config.programs.terminal;
|
||||||
|
|
@ -141,18 +140,6 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
(lib.mkIf config.roles.mpd.enable {
|
|
||||||
name = "ncmpcpp";
|
|
||||||
text = ''
|
|
||||||
${termcmd} -e ncmpcpp
|
|
||||||
'';
|
|
||||||
hotkeys = [
|
|
||||||
{
|
|
||||||
key = "M";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
install = false;
|
|
||||||
})
|
|
||||||
{
|
{
|
||||||
name = "menu";
|
name = "menu";
|
||||||
text = ''
|
text = ''
|
||||||
|
|
|
||||||
29
home/programs/shell.nix
Normal file
29
home/programs/shell.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{pkgs, config, ...}: {
|
||||||
|
|
||||||
|
programs.starship.enable = true;
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
dotDir = ".config/zsh";
|
||||||
|
history = {
|
||||||
|
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
||||||
|
};
|
||||||
|
defaultKeymap = "vicmd";
|
||||||
|
autocd = true;
|
||||||
|
enableAutosuggestions = true;
|
||||||
|
completionInit = ''
|
||||||
|
autoload -U compinit && compinit
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
|
'';
|
||||||
|
historySubstringSearch = {
|
||||||
|
enable = true;
|
||||||
|
searchUpKey = "^[[5~";
|
||||||
|
searchDownKey = "^[[6~";
|
||||||
|
};
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
};
|
||||||
|
home.shellAliases = {
|
||||||
|
rm = "${pkgs.trash-cli}/bin/trash-put";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -132,7 +132,7 @@ user: {
|
||||||
VISUAL = "nvim";
|
VISUAL = "nvim";
|
||||||
TERMINAL = "foot";
|
TERMINAL = "foot";
|
||||||
};
|
};
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
environment.pathsToLink = ["/share/zsh"];
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue