From bb5c011d91ed00ac168c7e5f0b525feb29254cca Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 10:50:03 +0100 Subject: [PATCH 01/33] tv: cherry-pick vim from hotwip! --- tv/2configs/vim.nix | 96 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 tv/2configs/vim.nix diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix new file mode 100644 index 000000000..d1104931d --- /dev/null +++ b/tv/2configs/vim.nix @@ -0,0 +1,96 @@ +{ lib, pkgs, ... }: + +with lib; +let + out = { + environment.systemPackages = [ + vim' + ]; + + environment.variables.EDITOR = mkForce "vim"; + }; + + runtimepath = concatStringsSep "," [ + "$HOME/.vim" # TODO get rid if this and incorporate everything from wu:~tv/.vim + "${pkgs.vimPlugins.undotree}/share/vim-plugins/undotree" + #"${tv-vim}/share/vim" + ]; + + vim' = pkgs.writeScriptBin "vim" '' + #! /bin/sh + set -eu + mkdir -p "$HOME"/.vim/backup + mkdir -p "$HOME"/.vim/cache + mkdir -p "$HOME"/.vim/undo + exec ${pkgs.vim}/bin/vim -u ${vimrc} "$@" + ''; + + vimrc = pkgs.writeText "vimrc" '' + set nocompatible + + set autoindent + set backspace=indent,eol,start + set backup + set backupdir=$HOME/.vim/backup/ + set directory=$HOME/.vim/cache// + set hlsearch + set incsearch + set mouse=a + set pastetoggle= + set runtimepath=${runtimepath} + set shortmess+=I + set showcmd + set showmatch + set ttimeoutlen=0 + set undodir=$HOME/.vim/undo + set undofile + set undolevels=1000000 + set undoreload=1000000 + set viminfo='20,<1000,s100,h,n$HOME/.vim/cache/info + set visualbell + set wildignore+=*.o,*.class,*.hi,*.dyn_hi,*.dyn_o + set wildmenu + set wildmode=longest,full + + filetype plugin indent on + + "colorscheme industry # TODO + syntax on + + cmap w!! w!sudo tee % >/dev/null + + nmap q :buffer + nmap :buffer + + cnoremap + + noremap :q + + nnoremap [5^ :tabp + nnoremap [6^ :tabn + nnoremap [5@ :tabm -1 + nnoremap [6@ :tabm +1 + + nnoremap :tabp + nnoremap :tabn + inoremap :tabp + inoremap :tabn + + " + noremap Oa | noremap! Oa + noremap Ob | noremap! Ob + noremap Oc | noremap! Oc + noremap Od | noremap! Od + " <[C]S-{Up,Down,Right,Left> + noremap [a | noremap! [a + noremap [b | noremap! [b + noremap [c | noremap! [c + noremap [d | noremap! [d + vnoremap u + ''; + + # "7.4.335" -> "74" + #majmin = x: concatStrings (take 2 (splitString "." x)); +in +out +#https://github.com/mbbill/undotree From c0cfbb5fcfcf0da49bbfa67328ba0b426ad9f321 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 11:29:58 +0100 Subject: [PATCH 02/33] tv vim: import industry colors From: http://www.vim.org/scripts/script.php?script_id=4875 --- tv/2configs/vim.nix | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index d1104931d..9ff9beb45 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -16,6 +16,52 @@ let #"${tv-vim}/share/vim" ]; + vim-industry-colors = pkgs.writeTextFile rec { + name = "vim-industry-colors"; + destination = "/colors/${name}"; + text = '' + " Vim color file + " Maintainer: Shian Lee + " Last Change: 2014 Mar 6 (for vim 7.4) + " Remark: "industry" stands for 'industrial' color scheme. In industrial + " HMI (Human-Machine-Interface) programming, using a standard color + " scheme is mandatory in many cases (in traffic-lights for example): + " LIGHT_RED is 'Warning' + " LIGHT_YELLOW is 'Attention' + " LIGHT_GREEN is 'Normal' + " LIGHT_MAGENTA is 'Warning-Attention' (light RED-YELLOW) + " LIGHT_CYAN is 'Attention-Normal' (light YELLOW-GREEN). + " BLACK is Dark-High-Contrast Background for maximum safety. + " BLUE is Shade of BLACK (not supposed to get attention). + " + " Industrial color scheme is by nature clear, safe and productive. + " Yet, depends on the file type's syntax, it might appear incorrect. + + " Reset to dark background, then reset everything to defaults: + set background=dark + highlight clear + if exists("syntax_on") + syntax reset + endif + + let colors_name = "industry" + + " First set Normal to regular white on black text colors: + hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black + + " Syntax highlighting (other color-groups using default, see :help group-name): + hi Comment cterm=NONE ctermfg=DarkCyan gui=NONE guifg=#00aaaa + hi Constant cterm=NONE ctermfg=LightCyan gui=NONE guifg=#00ffff + hi Identifier cterm=NONE ctermfg=LightMagenta gui=NONE guifg=#ff00ff + hi Function cterm=NONE ctermfg=LightGreen gui=NONE guifg=#00ff00 + hi Statement cterm=NONE ctermfg=White gui=bold guifg=#ffffff + hi PreProc cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 + hi Type cterm=NONE ctermfg=LightGreen gui=bold guifg=#00ff00 + hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=#ff0000 + hi Delimiter cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 + ''; + }; + vim' = pkgs.writeScriptBin "vim" '' #! /bin/sh set -eu From 4cdd35a7ce88d32279c6b94c682ac6425248fc75 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 11:32:51 +0100 Subject: [PATCH 03/33] tv vim industry: retab & co. --- tv/2configs/vim.nix | 53 ++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 9ff9beb45..053fee81e 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -21,21 +21,23 @@ let destination = "/colors/${name}"; text = '' " Vim color file - " Maintainer: Shian Lee - " Last Change: 2014 Mar 6 (for vim 7.4) - " Remark: "industry" stands for 'industrial' color scheme. In industrial - " HMI (Human-Machine-Interface) programming, using a standard color - " scheme is mandatory in many cases (in traffic-lights for example): - " LIGHT_RED is 'Warning' - " LIGHT_YELLOW is 'Attention' - " LIGHT_GREEN is 'Normal' - " LIGHT_MAGENTA is 'Warning-Attention' (light RED-YELLOW) - " LIGHT_CYAN is 'Attention-Normal' (light YELLOW-GREEN). - " BLACK is Dark-High-Contrast Background for maximum safety. - " BLUE is Shade of BLACK (not supposed to get attention). + " Maintainer: Shian Lee + " Last Change: 2014 Mar 6 (for vim 7.4) + " Remark: "industry" stands for 'industrial' color scheme. In + " industrial HMI (Human-Machine-Interface) programming, + " using a standard color scheme is mandatory in many cases + " (in traffic-lights for example): " - " Industrial color scheme is by nature clear, safe and productive. - " Yet, depends on the file type's syntax, it might appear incorrect. + " LIGHT_RED is 'Warning' + " LIGHT_YELLOW is 'Attention' + " LIGHT_GREEN is 'Normal' + " LIGHT_MAGENTA is 'Warning-Attention' (light RED-YELLOW) + " LIGHT_CYAN is 'Attention-Normal' (light YELLOW-GREEN). + " BLACK is Dark-High-Contrast Background for maximum safety. + " BLUE is Shade of BLACK (not supposed to get attention). + " + " Industrial color scheme is by nature clear, safe and productive. + " Yet, depends on the file type's syntax, it might appear incorrect. " Reset to dark background, then reset everything to defaults: set background=dark @@ -47,18 +49,19 @@ let let colors_name = "industry" " First set Normal to regular white on black text colors: - hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black + hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black - " Syntax highlighting (other color-groups using default, see :help group-name): - hi Comment cterm=NONE ctermfg=DarkCyan gui=NONE guifg=#00aaaa - hi Constant cterm=NONE ctermfg=LightCyan gui=NONE guifg=#00ffff - hi Identifier cterm=NONE ctermfg=LightMagenta gui=NONE guifg=#ff00ff - hi Function cterm=NONE ctermfg=LightGreen gui=NONE guifg=#00ff00 - hi Statement cterm=NONE ctermfg=White gui=bold guifg=#ffffff - hi PreProc cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 - hi Type cterm=NONE ctermfg=LightGreen gui=bold guifg=#00ff00 - hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=#ff0000 - hi Delimiter cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 + " Syntax highlighting + " (other color-groups using default, see :help group-name): + hi Comment cterm=NONE ctermfg=DarkCyan gui=NONE guifg=#00aaaa + hi Constant cterm=NONE ctermfg=LightCyan gui=NONE guifg=#00ffff + hi Identifier cterm=NONE ctermfg=LightMagenta gui=NONE guifg=#ff00ff + hi Function cterm=NONE ctermfg=LightGreen gui=NONE guifg=#00ff00 + hi Statement cterm=NONE ctermfg=White gui=bold guifg=#ffffff + hi PreProc cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 + hi Type cterm=NONE ctermfg=LightGreen gui=bold guifg=#00ff00 + hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=#ff0000 + hi Delimiter cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 ''; }; From 658780d3649ae5d13bb9afafa810022b28a81e6a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:12:08 +0100 Subject: [PATCH 04/33] tv vim industry: hi Normal ctermfg=White --- tv/2configs/vim.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 053fee81e..9fb0759ff 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -48,8 +48,7 @@ let let colors_name = "industry" - " First set Normal to regular white on black text colors: - hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black + hi! Normal ctermfg=White " Syntax highlighting " (other color-groups using default, see :help group-name): From 7a9800289e64b25854b73d534f777ebcfb51ea04 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:13:07 +0100 Subject: [PATCH 05/33] tv vim: colorize nix --- tv/2configs/vim.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 9fb0759ff..ba0060b40 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -107,6 +107,25 @@ let cmap w!! w!sudo tee % >/dev/null + au BufRead,BufNewFile *.nix so ${pkgs.writeText "nix.vim" '' + setf nix + + " Ref + syn match INT /[0-9]\+/ + syn match PATH /[a-zA-Z0-9\.\_\-\+]*\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ + syn match HPATH /\~\(\/[a-zA-Z0-9\.\_\-\+]\+\)\+/ + syn match SPATH /<[a-zA-Z0-9\.\_\-\+]\+\(\/[a-zA-Z0-9\.\_\-\+]\+\)*>/ + syn match URI /[a-zA-Z][a-zA-Z0-9\+\-\.]*:[a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\']\+/ + hi link INT Constant + hi link PATH Constant + hi link HPATH Constant + hi link SPATH Constant + hi link URI Constant + + syn match String /"\([^"]\|\\\"\)*"/ + syn match Comment /\s#.*/ + ''} + nmap q :buffer nmap :buffer From 51f875a43666af5ee16ef04fd95142ac09a16754 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:16:15 +0100 Subject: [PATCH 06/33] tv vim: don't ru ~/vim --- tv/2configs/vim.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index ba0060b40..ab0fdc23f 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -11,9 +11,7 @@ let }; runtimepath = concatStringsSep "," [ - "$HOME/.vim" # TODO get rid if this and incorporate everything from wu:~tv/.vim "${pkgs.vimPlugins.undotree}/share/vim-plugins/undotree" - #"${tv-vim}/share/vim" ]; vim-industry-colors = pkgs.writeTextFile rec { From 72800459a51d2618f9ed850c1bf02d416cac2767 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:17:11 +0100 Subject: [PATCH 07/33] tv vim: use industry colors --- tv/2configs/vim.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index ab0fdc23f..ea2c4c955 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -11,6 +11,7 @@ let }; runtimepath = concatStringsSep "," [ + vim-industry-colors "${pkgs.vimPlugins.undotree}/share/vim-plugins/undotree" ]; @@ -100,7 +101,8 @@ let filetype plugin indent on - "colorscheme industry # TODO + set t_Co=256 + colorscheme industry syntax on cmap w!! w!sudo tee % >/dev/null From fac32d63571d322ee7b73bc06ab69b519e301706 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:20:17 +0100 Subject: [PATCH 08/33] tv vim: ru pkg.vim share --- tv/2configs/vim.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index ea2c4c955..758dd506b 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -12,6 +12,7 @@ let runtimepath = concatStringsSep "," [ vim-industry-colors + "${pkgs.vim}/share/vim/vim${majmin pkgs.vim.version}" "${pkgs.vimPlugins.undotree}/share/vim-plugins/undotree" ]; @@ -157,7 +158,7 @@ let ''; # "7.4.335" -> "74" - #majmin = x: concatStrings (take 2 (splitString "." x)); + majmin = x: concatStrings (take 2 (splitString "." x)); in out #https://github.com/mbbill/undotree From 542a78403fe92c7690e985d19195087c10b0252f Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:21:09 +0100 Subject: [PATCH 09/33] tv vim: so vimrc via VIMINIT --- tv/2configs/vim.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 758dd506b..62ed02f74 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -66,11 +66,12 @@ let vim' = pkgs.writeScriptBin "vim" '' #! /bin/sh - set -eu - mkdir -p "$HOME"/.vim/backup - mkdir -p "$HOME"/.vim/cache - mkdir -p "$HOME"/.vim/undo - exec ${pkgs.vim}/bin/vim -u ${vimrc} "$@" + set -efu + ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/backup + ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/cache + ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/undo + export VIMINIT; VIMINIT=':so ${vimrc}' + exec ${pkgs.vim}/bin/vim "$@" ''; vimrc = pkgs.writeText "vimrc" '' From 3c1e22076992df1f5fffa9c069af97cca4d54f66 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:21:35 +0100 Subject: [PATCH 10/33] tv vim: set noruler --- tv/2configs/vim.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 62ed02f74..6691350eb 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -85,6 +85,7 @@ let set hlsearch set incsearch set mouse=a + set noruler set pastetoggle= set runtimepath=${runtimepath} set shortmess+=I From c29f45dec1c41f6ab12a9b2c4f91e70a4bbc830c Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:22:15 +0100 Subject: [PATCH 11/33] tv vim: colorize tabs and trailing space --- tv/2configs/vim.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 6691350eb..2e49a0ca0 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -108,7 +108,10 @@ let colorscheme industry syntax on - cmap w!! w!sudo tee % >/dev/null + au Syntax * syn match Tabstop containedin=ALL /\t\+/ + \ | hi Tabstop ctermbg=16 + \ | syn match TrailingSpace containedin=ALL /\s\+$/ + \ | hi TrailingSpace ctermbg=88 au BufRead,BufNewFile *.nix so ${pkgs.writeText "nix.vim" '' setf nix From 2977f6d2910528bd7b3c78ae614aebff18dd4874 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:22:43 +0100 Subject: [PATCH 12/33] tv vim: no backup & co for /dev/shm/* --- tv/2configs/vim.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 2e49a0ca0..7eb2eb139 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -132,6 +132,8 @@ let syn match Comment /\s#.*/ ''} + au BufRead,BufNewFile /dev/shm/* set nobackup nowritebackup noswapfile + nmap q :buffer nmap :buffer From 9c36073e7b0081eaec37b0de232aeee2dcf5d8ab Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:28:16 +0100 Subject: [PATCH 13/33] tv base: import vim --- tv/1systems/xu.nix | 1 - tv/2configs/base.nix | 14 ++------------ tv/2configs/vim.nix | 7 +++++++ tv/4lib/default.nix | 3 --- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/tv/1systems/xu.nix b/tv/1systems/xu.nix index 82f5abf73..b858444af 100644 --- a/tv/1systems/xu.nix +++ b/tv/1systems/xu.nix @@ -110,7 +110,6 @@ with lib; #minicom #mtools #ncmpc - #neovim #nethogs #nix-prefetch-scripts #cvs bug #openssl diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix index 0a8dbdcc2..41159690d 100644 --- a/tv/2configs/base.nix +++ b/tv/2configs/base.nix @@ -3,17 +3,13 @@ with builtins; with lib; -let - # "7.4.335" -> "74" - majmin = x: concatStrings (take 2 (splitString "." x)); -in - { krebs.enable = true; networking.hostName = config.krebs.build.host.name; imports = [ + ./vim.nix { # stockholm dependencies environment.systemPackages = with pkgs; [ @@ -107,10 +103,8 @@ in lAtr = "ls -lAtr"; # alias ll='ls -l' ls = "ls -h --color=auto --group-directories-first"; - # alias vim='vim -p' - # alias vi='vim' - # alias view='vim -R' dmesg = "dmesg -L --reltime"; + view = "vim -R"; }; programs.bash = { @@ -153,10 +147,6 @@ in } { - nixpkgs.config.packageOverrides = pkgs: { - nano = pkgs.vim; - }; - services.cron.enable = false; services.nscd.enable = false; services.ntp.enable = false; diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 7eb2eb139..74eee0a3b 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -7,6 +7,13 @@ let vim' ]; + # Nano really is just a stupid name for Vim. + # Note: passing just pkgs.vim to cvs to not rebuild it all the time + nixpkgs.config.packageOverrides = pkgs: { + cvs = pkgs.cvs.override { nano = pkgs.vim; }; + nano = vim'; + }; + environment.variables.EDITOR = mkForce "vim"; }; diff --git a/tv/4lib/default.nix b/tv/4lib/default.nix index 7e6b2ab17..c099eb733 100644 --- a/tv/4lib/default.nix +++ b/tv/4lib/default.nix @@ -6,9 +6,6 @@ lib // rec { inherit lib pkgs; }; - # "7.4.335" -> "74" - majmin = with lib; x : concatStrings (take 2 (splitString "." x)); - # TODO deprecate shell-escape for lass shell-escape = lib.shell.escape; } From 4d43b92b22972e663f72e2b48f5f0892aff4334a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:48:38 +0100 Subject: [PATCH 14/33] tv vim: use upstream industry colors + mods --- tv/2configs/vim.nix | 55 +++------------------------------------------ 1 file changed, 3 insertions(+), 52 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 74eee0a3b..f17443871 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -17,60 +17,10 @@ let environment.variables.EDITOR = mkForce "vim"; }; - runtimepath = concatStringsSep "," [ - vim-industry-colors - "${pkgs.vim}/share/vim/vim${majmin pkgs.vim.version}" + extra-runtimepath = concatStringsSep "," [ "${pkgs.vimPlugins.undotree}/share/vim-plugins/undotree" ]; - vim-industry-colors = pkgs.writeTextFile rec { - name = "vim-industry-colors"; - destination = "/colors/${name}"; - text = '' - " Vim color file - " Maintainer: Shian Lee - " Last Change: 2014 Mar 6 (for vim 7.4) - " Remark: "industry" stands for 'industrial' color scheme. In - " industrial HMI (Human-Machine-Interface) programming, - " using a standard color scheme is mandatory in many cases - " (in traffic-lights for example): - " - " LIGHT_RED is 'Warning' - " LIGHT_YELLOW is 'Attention' - " LIGHT_GREEN is 'Normal' - " LIGHT_MAGENTA is 'Warning-Attention' (light RED-YELLOW) - " LIGHT_CYAN is 'Attention-Normal' (light YELLOW-GREEN). - " BLACK is Dark-High-Contrast Background for maximum safety. - " BLUE is Shade of BLACK (not supposed to get attention). - " - " Industrial color scheme is by nature clear, safe and productive. - " Yet, depends on the file type's syntax, it might appear incorrect. - - " Reset to dark background, then reset everything to defaults: - set background=dark - highlight clear - if exists("syntax_on") - syntax reset - endif - - let colors_name = "industry" - - hi! Normal ctermfg=White - - " Syntax highlighting - " (other color-groups using default, see :help group-name): - hi Comment cterm=NONE ctermfg=DarkCyan gui=NONE guifg=#00aaaa - hi Constant cterm=NONE ctermfg=LightCyan gui=NONE guifg=#00ffff - hi Identifier cterm=NONE ctermfg=LightMagenta gui=NONE guifg=#ff00ff - hi Function cterm=NONE ctermfg=LightGreen gui=NONE guifg=#00ff00 - hi Statement cterm=NONE ctermfg=White gui=bold guifg=#ffffff - hi PreProc cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 - hi Type cterm=NONE ctermfg=LightGreen gui=bold guifg=#00ff00 - hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=#ff0000 - hi Delimiter cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 - ''; - }; - vim' = pkgs.writeScriptBin "vim" '' #! /bin/sh set -efu @@ -94,7 +44,7 @@ let set mouse=a set noruler set pastetoggle= - set runtimepath=${runtimepath} + set runtimepath=${extra-runtimepath},$VIMRUNTIME set shortmess+=I set showcmd set showmatch @@ -119,6 +69,7 @@ let \ | hi Tabstop ctermbg=16 \ | syn match TrailingSpace containedin=ALL /\s\+$/ \ | hi TrailingSpace ctermbg=88 + \ | hi Normal ctermfg=White au BufRead,BufNewFile *.nix so ${pkgs.writeText "nix.vim" '' setf nix From 6412cdf137a7b1993473937988648517a06629a9 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 13:59:53 +0100 Subject: [PATCH 15/33] tv vim: decouple vimrc from ENV --- tv/2configs/vim.nix | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index f17443871..b9ee725b8 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -4,33 +4,24 @@ with lib; let out = { environment.systemPackages = [ - vim' + pkgs.vim ]; # Nano really is just a stupid name for Vim. - # Note: passing just pkgs.vim to cvs to not rebuild it all the time nixpkgs.config.packageOverrides = pkgs: { - cvs = pkgs.cvs.override { nano = pkgs.vim; }; - nano = vim'; + nano = pkgs.vim; }; + environment.etc.vimrc.source = vimrc; + environment.variables.EDITOR = mkForce "vim"; + environment.variables.VIMINIT = ":so /etc/vimrc"; }; extra-runtimepath = concatStringsSep "," [ "${pkgs.vimPlugins.undotree}/share/vim-plugins/undotree" ]; - vim' = pkgs.writeScriptBin "vim" '' - #! /bin/sh - set -efu - ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/backup - ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/cache - ${pkgs.coreutils}/bin/mkdir -p "$HOME"/.vim/undo - export VIMINIT; VIMINIT=':so ${vimrc}' - exec ${pkgs.vim}/bin/vim "$@" - ''; - vimrc = pkgs.writeText "vimrc" '' set nocompatible From 33b7521bca9354d219c575ec1ff0a271707bb78b Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 14:06:58 +0100 Subject: [PATCH 16/33] tv: what's majmin? --- tv/2configs/vim.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index b9ee725b8..8c6c9fb45 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -112,9 +112,5 @@ let noremap [d | noremap! [d vnoremap u ''; - - # "7.4.335" -> "74" - majmin = x: concatStrings (take 2 (splitString "." x)); in out -#https://github.com/mbbill/undotree From 7dc05de06ab689e79149d6f02c4f06a5d6c9a384 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 14:13:10 +0100 Subject: [PATCH 17/33] xu nixpkgs: e57024f -> c44a593 --- tv/1systems/xu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/1systems/xu.nix b/tv/1systems/xu.nix index b858444af..e2cc2c06a 100644 --- a/tv/1systems/xu.nix +++ b/tv/1systems/xu.nix @@ -11,7 +11,7 @@ with lib; krebs.build.source = { git.nixpkgs = { url = https://github.com/NixOS/nixpkgs; - rev = "e57024f821c94caf5684964474073649b8b6356b"; + rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; }; dir.secrets = { host = config.krebs.hosts.wu; From 383732b49365b8db281776cb7a711664a5bcc0b4 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 14:14:16 +0100 Subject: [PATCH 18/33] wu nixpkgs: e916273 -> c44a593 --- tv/1systems/wu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 65389b662..85fba1d8a 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -11,7 +11,7 @@ with lib; krebs.build.source = { git.nixpkgs = { url = https://github.com/NixOS/nixpkgs; - rev = "e916273209560b302ab231606babf5ce1c481f08"; + rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; }; dir.secrets = { host = config.krebs.hosts.wu; From 5d258e9b5b2c12403a20ff51be59dc39e3f6c2b4 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 14:15:36 +0100 Subject: [PATCH 19/33] cd nixpkgs: 4z3/03130ec -> NixOS/c44a593 --- tv/1systems/cd.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 69f1300be..1122e6a19 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -10,8 +10,8 @@ with lib; krebs.build.source = { git.nixpkgs = { - url = https://github.com/4z3/nixpkgs; - rev = "03130ec91356cd250b80f144022ee2f4d665ca36"; # 1357692 + url = https://github.com/NixOS/nixpkgs; + rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; }; dir.secrets = { host = config.krebs.hosts.wu; From 6755476c0a6e77d289c38bbd0e9053ae84f40e67 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 14:27:24 +0100 Subject: [PATCH 20/33] rmdir nixpkgs: 68bd8e4 -> c44a593 --- tv/1systems/rmdir.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/1systems/rmdir.nix b/tv/1systems/rmdir.nix index f77268b53..e24ef64fc 100644 --- a/tv/1systems/rmdir.nix +++ b/tv/1systems/rmdir.nix @@ -24,7 +24,7 @@ in krebs.build.source = { git.nixpkgs = { url = https://github.com/NixOS/nixpkgs; - rev = "68bd8e4a9dc247726ae89cc8739574261718e328"; + rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; }; dir.secrets = { host = config.krebs.hosts.wu; From c7a27fc0003a80f8de12e7c7ee9feaed9aa83158 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 14:27:51 +0100 Subject: [PATCH 21/33] mkdir nixpkgs: e57024f -> c44a593 --- tv/1systems/mkdir.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/1systems/mkdir.nix b/tv/1systems/mkdir.nix index 305ea7269..e8e354197 100644 --- a/tv/1systems/mkdir.nix +++ b/tv/1systems/mkdir.nix @@ -24,7 +24,7 @@ in krebs.build.source = { git.nixpkgs = { url = https://github.com/NixOS/nixpkgs; - rev = "e57024f821c94caf5684964474073649b8b6356b"; + rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; }; dir.secrets = { host = config.krebs.hosts.wu; From d2ac2e0d0080e1b76d1d6249ab52231b72ae8ea9 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2015 14:31:16 +0100 Subject: [PATCH 22/33] nomic nixpkgs: 4z3/03130ec -> NixOS/c44a593 --- tv/1systems/nomic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tv/1systems/nomic.nix b/tv/1systems/nomic.nix index 61f833d41..df45b8177 100644 --- a/tv/1systems/nomic.nix +++ b/tv/1systems/nomic.nix @@ -10,8 +10,8 @@ with lib; krebs.build.source = { git.nixpkgs = { - url = https://github.com/4z3/nixpkgs; - rev = "03130ec91356cd250b80f144022ee2f4d665ca36"; # 1357692 + url = https://github.com/NixOS/nixpkgs; + rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; }; dir.secrets = { host = config.krebs.hosts.wu; From bfad3f16b16c9d132f9af7a48ede69b3ddb6bedc Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2015 10:28:56 +0100 Subject: [PATCH 23/33] krebs nix-install: softcode using target-path --- krebs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/default.nix b/krebs/default.nix index 31a7f7d04..175b02050 100644 --- a/krebs/default.nix +++ b/krebs/default.nix @@ -178,7 +178,7 @@ let out = { nix-path = lib.concatStringsSep ":" - (lib.mapAttrsToList (name: _: "${name}=/root/${name}") + (lib.mapAttrsToList (name: src: "${name}=${src.target-path}") (config.krebs.build.source.dir // config.krebs.build.source.git)); in '' From ed86c7f44e16cd70693ca78ecdcc620fc8c66495 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2015 10:17:30 +0100 Subject: [PATCH 24/33] wu: {/root => /var/src}/{nixpkgs,stockholm} --- tv/1systems/wu.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 85fba1d8a..b12e7df93 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -12,6 +12,7 @@ with lib; git.nixpkgs = { url = https://github.com/NixOS/nixpkgs; rev = "c44a593aa43bba6a0708f6f36065a514a5110613"; + target-path = "/var/src/nixpkgs"; }; dir.secrets = { host = config.krebs.hosts.wu; @@ -20,6 +21,7 @@ with lib; dir.stockholm = { host = config.krebs.hosts.wu; path = "/home/tv/stockholm"; + target-path = "/var/src/stockholm"; }; }; From 62e7c137187eed2abc39b78fe7d8ddfc7606aae5 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2015 13:48:40 +0100 Subject: [PATCH 25/33] krebs.init: talk about ssh.privkey.path --- krebs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/default.nix b/krebs/default.nix index 175b02050..bfd6175d9 100644 --- a/krebs/default.nix +++ b/krebs/default.nix @@ -84,6 +84,7 @@ let out = { cat<; ssh.pubkey = $(echo $pubkey | jq -R .); EOF ''; From 9b985720ea761aea900f18249b179dbd0345c83f Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2015 13:51:03 +0100 Subject: [PATCH 26/33] nomic: fix ssh.{priv,pub}key --- krebs/3modules/tv/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index 4c295dffe..302d1a92c 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -158,7 +158,8 @@ with lib; }; }; secure = true; - ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILn7C3LxAs9kUynENdRNgQs4qjrhNDfXzlHTpVJt6e09"; + ssh.privkey.path = ; + ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILMPMh3nHxVcPqM+LrkK7eYxNJY1ShBXOTg1vlSR45wx"; }; ok = { nets = { From 1ddbdddc696316986b07376a7fc5e33aaf228e89 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 5 Nov 2015 00:31:14 +0100 Subject: [PATCH 27/33] tv vim: set et ts=2 sts=2 sw=2 --- tv/2configs/vim.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 8c6c9fb45..14f086e5c 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -50,6 +50,8 @@ let set wildmenu set wildmode=longest,full + set et ts=2 sts=2 sw=2 + filetype plugin indent on set t_Co=256 From 4050b21d16f9b7d0de9515526cac9a7b65993fef Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 5 Nov 2015 12:27:50 +0100 Subject: [PATCH 28/33] k 5 translate-shell: init at 0.9.0.9 --- krebs/5pkgs/translate-shell/default.nix | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 krebs/5pkgs/translate-shell/default.nix diff --git a/krebs/5pkgs/translate-shell/default.nix b/krebs/5pkgs/translate-shell/default.nix new file mode 100644 index 000000000..00ab226e5 --- /dev/null +++ b/krebs/5pkgs/translate-shell/default.nix @@ -0,0 +1,43 @@ +{stdenv, fetchurl,pkgs,... }: +let + s = + rec { + baseName="translate-shell"; + version="0.9.0.9"; + name="${baseName}-${version}"; + url=https://github.com/soimort/translate-shell/archive/v0.9.0.9.tar.gz; + sha256="1269j4yr9dr1d8c5kmysbzfplbgdg8apqnzs5w57d29sd7gz2i34"; + }; + searchpath = with pkgs; stdenv.lib.makeSearchPath "bin" [ + fribidi + gawk + bash + curl + less + ]; + buildInputs = [ + pkgs.makeWrapper + ]; +in +stdenv.mkDerivation { + inherit (s) name version; + inherit buildInputs; + src = fetchurl { + inherit (s) url sha256; + }; + # TODO: maybe mplayer + installPhase = '' + mkdir -p $out/bin + make PREFIX=$out install + wrapProgram $out/bin/trans --suffix PATH : "${searchpath}" + ''; + + meta = { + inherit (s) version; + description = ''translate using google api''; + license = stdenv.lib.licenses.free; + maintainers = [stdenv.lib.maintainers.makefu]; + platforms = stdenv.lib.platforms.linux ; + }; +} + From 699822f572162e4ddcc0fa7f5690142cba1c8c5d Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 5 Nov 2015 12:28:25 +0100 Subject: [PATCH 29/33] m 1 wry: use new import layout for CAC from tv --- makefu/1systems/wry.nix | 7 +++++-- makefu/2configs/headless.nix | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/makefu/1systems/wry.nix b/makefu/1systems/wry.nix index c90b84451..90710c857 100644 --- a/makefu/1systems/wry.nix +++ b/makefu/1systems/wry.nix @@ -8,7 +8,8 @@ let in { imports = [ # TODO: copy this config or move to krebs - ../../tv/2configs/CAC-CentOS-7-64bit.nix + ../../tv/2configs/hw/CAC.nix + ../../tv/2configs/fs/CAC-CentOS-7-64bit.nix ../2configs/base.nix ../2configs/unstable-sources.nix ../2configs/headless.nix @@ -23,6 +24,8 @@ in { # other nginx ../2configs/nginx/euer.wiki.nix + ../2configs/nginx/euer.blog.nix + # collectd ../2configs/collectd/collectd-base.nix ]; @@ -71,5 +74,5 @@ in { nameservers = [ "8.8.8.8" ]; }; - + environment.systemPackages = [ pkgs.translate-shell ]; } diff --git a/makefu/2configs/headless.nix b/makefu/2configs/headless.nix index 33847c5e1..772ca3771 100644 --- a/makefu/2configs/headless.nix +++ b/makefu/2configs/headless.nix @@ -1,4 +1,4 @@ -_: +{lib,... }: { - sound.enable = false; + sound.enable = lib.mkForce false; } From f02a96efb22d10b529483a7e14301cd46b58a40d Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 5 Nov 2015 12:31:09 +0100 Subject: [PATCH 30/33] m 2 nginx/euer*: prepare folders if they do not exist --- makefu/2configs/nginx/euer.blog.nix | 34 +++++++++++++++++++++++++---- makefu/2configs/nginx/euer.wiki.nix | 13 ++++++----- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/makefu/2configs/nginx/euer.blog.nix b/makefu/2configs/nginx/euer.blog.nix index e97050ec4..c6724c617 100644 --- a/makefu/2configs/nginx/euer.blog.nix +++ b/makefu/2configs/nginx/euer.blog.nix @@ -5,14 +5,40 @@ let sec = toString ; ssl_cert = "${sec}/wildcard.krebsco.de.crt"; ssl_key = "${sec}/wildcard.krebsco.de.key"; - hostname = krebs.build.host.name; + hostname = config.krebs.build.host.name; + user = config.services.nginx.user; + group = config.services.nginx.group; + external-ip = head config.krebs.build.host.nets.internet.addrs4; + internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; + base-dir = "/var/www/blog.euer"; in { + # Prepare Blog directory + systemd.services.prepare-euer-blog = { + wantedBy = [ "local-fs.target" ]; + before = [ "nginx.service" ]; + serviceConfig = { + # do nothing if the base dir already exists + ExecStart = pkgs.writeScript "prepare-euer-blog-service" '' + #!/bin/sh + if ! test -d "${base-dir}" ;then + mkdir -p "${base-dir}" + chown ${user}:${group} "${base-dir}" + chmod 700 "${base-dir}" + fi + ''; + Type = "oneshot"; + RemainAfterExit = "yes"; + TimeoutSec = "0"; + }; + }; + krebs.nginx = { enable = mkDefault true; servers = { euer-blog = { - listen = [ "80" "443 ssl" ]; - server-names = [ "euer.krebsco.de" "euer.blog.krebsco.de" "blog.${hostname}" ]; + listen = [ "${external-ip}:80" "${external-ip}:443 ssl" + "${internal-ip}:80" "${internal-ip}:443 ssl" ]; + server-names = [ "euer.krebsco.de" "blog.euer.krebsco.de" "blog.${hostname}" ]; extraConfig = '' gzip on; gzip_buffers 4 32k; @@ -22,7 +48,7 @@ in { default_type text/plain; ''; locations = singleton (nameValuePair "/" '' - root /var/www/euer.blog/; + root ${base-dir}; ''); }; }; diff --git a/makefu/2configs/nginx/euer.wiki.nix b/makefu/2configs/nginx/euer.wiki.nix index fbcfe2047..2b5fa6ead 100644 --- a/makefu/2configs/nginx/euer.wiki.nix +++ b/makefu/2configs/nginx/euer.wiki.nix @@ -51,18 +51,21 @@ in { serviceConfig = { ExecStart = pkgs.writeScript "prepare-tw-service" '' #!/bin/sh - mkdir -p "${wiki-dir}" "${backup-dir}" + if ! test -d "${base-dir}" ;then + mkdir -p "${wiki-dir}" "${backup-dir}" - # write the base configuration - cat > "${base-cfg}" < "${base-cfg}" < Date: Thu, 5 Nov 2015 12:31:54 +0100 Subject: [PATCH 31/33] k 3 makefu: wry handles blog and wiki --- krebs/3modules/makefu/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index 2d33b9275..194676265 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -164,6 +164,7 @@ with lib; dc = "makefu"; #dc = "cac"; extraZones = { "krebsco.de" = '' + euer IN A ${head nets.internet.addrs4} wiki.euer IN A ${head nets.internet.addrs4} wry IN A ${head nets.internet.addrs4} io IN NS wry.krebsco.de. @@ -191,6 +192,9 @@ with lib; "paste.retiolum" "wry.retiolum" "wiki.makefu.retiolum" + "wiki.wry.retiolum" + "blog.makefu.retiolum" + "blog.wry.retiolum" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -216,7 +220,6 @@ with lib; extraZones = { "krebsco.de" = '' - euer IN A ${head nets.internet.addrs4} share.euer IN A ${head nets.internet.addrs4} gum IN A ${head nets.internet.addrs4} ''; From 77e36a7a196e378881150b01c370c35625f08946 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 5 Nov 2015 16:13:10 +0100 Subject: [PATCH 32/33] krebs 5 krebspaste: initial commit --- krebs/5pkgs/bepasty-client-cli/default.nix | 22 ++++++++++++++++++++++ krebs/5pkgs/krebspaste/default.nix | 9 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 krebs/5pkgs/bepasty-client-cli/default.nix create mode 100644 krebs/5pkgs/krebspaste/default.nix diff --git a/krebs/5pkgs/bepasty-client-cli/default.nix b/krebs/5pkgs/bepasty-client-cli/default.nix new file mode 100644 index 000000000..990f99af6 --- /dev/null +++ b/krebs/5pkgs/bepasty-client-cli/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, pythonPackages, fetchurl, ... }: + +with pythonPackages; buildPythonPackage rec { + name = "bepasty-client-cli-${version}"; + version = "0.3.0"; + propagatedBuildInputs = [ + python_magic + click + requests2 + ]; + + src = fetchurl { + url = "https://pypi.python.org/packages/source/b/bepasty-client-cli/bepasty-client-cli-${version}.tar.gz"; + sha256 = "002kcplyfnmr5pn2ywdfilss0rmbm8wcdzz8hzp03ksy2zr4sdbw"; + }; + + meta = { + homepage = https://github.com/bepasty/bepasty-client-cli; + description = "CLI client for bepasty-server"; + license = lib.licenses.bsd2; + }; +} diff --git a/krebs/5pkgs/krebspaste/default.nix b/krebs/5pkgs/krebspaste/default.nix new file mode 100644 index 000000000..13920ad08 --- /dev/null +++ b/krebs/5pkgs/krebspaste/default.nix @@ -0,0 +1,9 @@ +{ writeScriptBin, pkgs }: + +# TODO: add krebs CA to toolchain, remove --insecure +# TODO: use `wrapProgram --add-flags` instead? + +writeScriptBin "krebspaste" '' + #! /bin/sh + exec ${pkgs.bepasty-client-cli}/bin/bepasty-cli --insecure --url http://paste.retiolum "$@" +'' From 12597b1febb0bc47cf98529a12e5fc6af1d8f5a4 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 5 Nov 2015 16:21:09 +0100 Subject: [PATCH 33/33] k 5 krebspaste: resolve TODO, retiolum is always secure --- krebs/5pkgs/krebspaste/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/krebs/5pkgs/krebspaste/default.nix b/krebs/5pkgs/krebspaste/default.nix index 13920ad08..fb318af83 100644 --- a/krebs/5pkgs/krebspaste/default.nix +++ b/krebs/5pkgs/krebspaste/default.nix @@ -1,9 +1,7 @@ { writeScriptBin, pkgs }: -# TODO: add krebs CA to toolchain, remove --insecure # TODO: use `wrapProgram --add-flags` instead? - writeScriptBin "krebspaste" '' #! /bin/sh - exec ${pkgs.bepasty-client-cli}/bin/bepasty-cli --insecure --url http://paste.retiolum "$@" + exec ${pkgs.bepasty-client-cli}/bin/bepasty-cli --url http://paste.retiolum "$@" ''