mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
refactor powerline
This commit is contained in:
parent
de49dbffbe
commit
efcffa2bf6
1 changed files with 18 additions and 8 deletions
|
@ -1,4 +1,14 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
powerlineOpts = [
|
||||||
|
"-mode=flat"
|
||||||
|
"-colorize-hostname"
|
||||||
|
"-cwd-mode=dironly"
|
||||||
|
"-modules=user,host,cwd,nix-shell,git,jobs"
|
||||||
|
"-git-assume-unchanged-size 0"
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
pwgen
|
pwgen
|
||||||
|
@ -67,6 +77,12 @@
|
||||||
environment.variables.PLGO_HOSTNAMEFG = "0";
|
environment.variables.PLGO_HOSTNAMEFG = "0";
|
||||||
environment.variables.PLGO_HOSTNAMEBG = "114";
|
environment.variables.PLGO_HOSTNAMEBG = "114";
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
powerline-go = pkgs.callPackage ../pkgs/powerline-go-updated { };
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
programs.bash.interactiveShellInit = ''
|
programs.bash.interactiveShellInit = ''
|
||||||
stty -ixon
|
stty -ixon
|
||||||
alias p=python3
|
alias p=python3
|
||||||
|
@ -74,13 +90,7 @@
|
||||||
alias buildsys='nix build -f "<nixpkgs/nixos>" --no-link system'
|
alias buildsys='nix build -f "<nixpkgs/nixos>" --no-link system'
|
||||||
|
|
||||||
function _update_ps1() {
|
function _update_ps1() {
|
||||||
PS1="\n$(${pkgs.callPackage ../pkgs/powerline-go-updated { }}/bin/powerline-go \
|
PS1="\n$(${pkgs.powerline-go}/bin/powerline-go ${lib.concatStringsSep " " powerlineOpts})$ "
|
||||||
-mode=flat \
|
|
||||||
-colorize-hostname \
|
|
||||||
-cwd-mode=dironly \
|
|
||||||
-modules=user,host,cwd,nix-shell,git,jobs \
|
|
||||||
-git-assume-unchanged-size 0 \
|
|
||||||
)$ "
|
|
||||||
}
|
}
|
||||||
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue