1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
This commit is contained in:
Kierán Meinhardt
2019-02-13 14:34:02 +01:00
parent 0581dbb77a
commit aadd7c5f46
2 changed files with 69 additions and 1 deletions

View File

@@ -1,13 +1,69 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.shellAliases = { environment.shellAliases = {
ns = "nix-shell --command zsh"; ns = "nix-shell --command fish";
":r" = ''echo "You stupid!"''; ":r" = ''echo "You stupid!"'';
nixi = ''nix repl "<nixpkgs>"''; nixi = ''nix repl "<nixpkgs>"'';
}; };
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin"; environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin";
programs.fish = {
enable = true;
interactiveShellInit = ''
function take
mkdir $argv
and cd $argv[-1]
end
'';
promptInit = ''
function fish_right_prompt --description 'Write out the right prompt'
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_hide_untrackedfiles 1
set -g __fish_git_prompt_color_branch magenta
set -g __fish_git_prompt_showupstream "informative"
set -g __fish_git_prompt_char_upstream_ahead ""
set -g __fish_git_prompt_char_upstream_behind ""
set -g __fish_git_prompt_char_upstream_prefix ""
set -g __fish_git_prompt_char_stagedstate ""
set -g __fish_git_prompt_char_dirtystate ""
set -g __fish_git_prompt_char_untrackedfiles ""
set -g __fish_git_prompt_char_conflictedstate ""
set -g __fish_git_prompt_char_cleanstate ""
set -g __fish_git_prompt_color_dirtystate blue
set -g __fish_git_prompt_color_stagedstate yellow
set -g __fish_git_prompt_color_invalidstate red
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
set -g __fish_git_prompt_color_cleanstate green
echo -n -s (__fish_git_prompt)
end
function fish_prompt --description 'Write out the prompt'
set color_cwd blue
set -l suffix
set -l color_suffix
switch "$USER"
case root toor
set suffix '#'
case '*'
set suffix '>'
if test $IN_NIX_SHELL
set suffix 'λ'
end
end
if test $status -eq 0
set color_suffix green
else
set color_suffix red
end
echo -n -s (set_color --bold $color_cwd) (prompt_pwd) (set_color normal) " " (set_color --bold $color_suffix) "$suffix " (set_color normal)
end
'';
};
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;

12
packages/onedrive.nix Normal file
View File

@@ -0,0 +1,12 @@
{ stdenv, dmd, curl, sqlite, fetchFromGitHub }:
stdenv.mkDerivation {
name = "onedrive";
version = "v1.1.3";
src = fetchFromGitHub {
owner = "skilion";
repo = "onedrive";
rev = "945251f7f2e95ae85001efb6eab85d6176bac75e";
sha256 = "16iajb61b09gdqly85h6h7ap385ihk0az3mimkj277yc08rv68d0";
};
buildInputs = [ dmd curl sqlite ];
}