initial commit

extraction-donnees-privees
Yves Dubromelle 9 years ago
commit ebac38eb13

11
.gitignore vendored

@ -0,0 +1,11 @@
# Vim :
## swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
## session
Session.vim
## temporary
.netrwhist
*~
## auto-generated tag files
tags

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./tools.nix
./localisation.nix
];
}

@ -0,0 +1,18 @@
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm) TERM=xterm-256color;;
screen) TERM=screen-256color;;
esac

@ -0,0 +1,27 @@
# Définition des couleurs du prompt
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
PS1_USER='\[$(tput setaf 27)\]'
PS1_HOST='\[$(tput setaf 37)\]'
PS1_ROOT='\[$(tput setaf 160)\]'
PS1_PATH='\[$(tput setaf 64)\]'
PS1_GIT='\[$(tput setaf 136)\]'
PS1_MISC='\[$(tput setaf 230)\]'
else
PS1_USER='\[$(tput setaf 4)\]'
PS1_HOST='\[$(tput setaf 6)\]'
PS1_ROOT='\[$(tput setaf 1)\]'
PS1_PATH='\[$(tput setaf 2)\]'
PS1_GIT='\[$(tput setaf 3)\]'
PS1_MISC='\[$(tput setaf 7)\]'
fi
BOLD='\[$(tput bold)\]'
RESET='\[$(tput sgr0)\]'
# Définition du prompt
if [ $UID = 0 ]; then
PS1_ID=$PS1_ROOT
else
PS1_ID=$PS1_USER'\u'$PS1_MISC@$PS1_HOST
fi
PS1=$RESET$BOLD$PS1_ID'\h '$PS1_PATH'\w'$PS1_GIT'$(__git_ps1)'"\n"$PS1_MISC'\$ '$RESET

@ -0,0 +1,16 @@
[color]
diff = auto
branch = auto
interactive = auto
pager = true
showbranch = auto
status = auto
[alias]
a = add -p
st = status
ci = commit
co = checkout
[push]
default = simple
[core]
editor = /usr/bin/env vim

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
# Select internationalisation properties.
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "fr";
defaultLocale = "fr_FR.UTF-8";
};
# Set your time zone.
time.timeZone = "Europe/Paris";
}

@ -0,0 +1,41 @@
{ config, pkgs, ... }:
{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment = {
systemPackages = with pkgs; [
bind # utilisé pour les utilitaires comme dig
byobu
git gitAndTools.tig
gnupg
htop
ncdu
nmap
mtr
p7zip
parted
python34Packages.glances
pwgen
tmux
tree
(import ./vim.nix)
wget
];
shellAliases = {
byobu = "byobu-tmux";
tree = "tree -C";
tree1 = "tree -d -L 1";
tree2 = "tree -d -L 2";
tree3 = "tree -d -L 3";
grep = "grep --color=auto";
vi = "vim";
};
etc.gitconfig.text = builtins.readFile ./gitconfig;
};
programs.bash = {
enableCompletion = true;
promptInit = builtins.readFile ./bash-prompt.sh;
interactiveShellInit = builtins.readFile ./bash-interactive-init.sh;
};
}

@ -0,0 +1,19 @@
with import <nixpkgs> {};
vim_configurable.customize {
# Specifies the vim binary name.
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
name = "vim";
vimrcConfig.customRC = builtins.readFile ./vimrc;
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
vimrcConfig.vam.pluginDictionaries = [
{ names = [
# Here you can place all your vim plugins
# They are installed managed by `vam` (a vim plugin manager)
#"vim-addon-nix"
"vim-nix"
"wombat256-vim"
]; }
];
}

33
vimrc

@ -0,0 +1,33 @@
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file
endif
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
" Tab specific option
set tabstop=4 "A tab is 8 spaces
set expandtab "Always uses spaces instead of tabs
set softtabstop=4 "Insert 4 spaces when tab is pressed
set shiftwidth=4 "An indent is 4 spaces
set shiftround "Round indent to nearest shiftwidth multiple
"""""" Réglages cosmétiques
set background=dark
set cc=80
set number
highlight ColorColumn ctermbg=8
"Détection de la profondeur des couleurs (8bits)
if &t_Co > 8
colorscheme wombat256mod
endif
Loading…
Cancel
Save