Autoformatting of nix files

This commit is contained in:
Cyryl Płotnicki 2019-07-07 12:08:00 +01:00
parent 976b6b670d
commit db74835acf
12 changed files with 354 additions and 350 deletions

View file

@ -3,6 +3,8 @@ let g:bufferline_echo = 0
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#enabled = 1
au BufWrite * :Autoformat
" plugins: rust " plugins: rust
let g:rustfmt_autosave = 1 let g:rustfmt_autosave = 1

View file

@ -50,4 +50,3 @@ augroup END
" vimdiff " vimdiff
set diffopt+=iwhite set diffopt+=iwhite
set diffexpr="" set diffexpr=""

View file

@ -81,4 +81,4 @@
../gfx-intel.nix ../gfx-intel.nix
../virtualbox.nix ../virtualbox.nix
]; ];
} }

View file

@ -27,4 +27,4 @@
../gfx-intel.nix ../gfx-intel.nix
../virtualbox.nix ../virtualbox.nix
]; ];
} }

View file

@ -21,4 +21,4 @@
../common.nix ../common.nix
../gfx-intel.nix ../gfx-intel.nix
]; ];
} }

View file

@ -4,7 +4,7 @@ let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz; unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
etesync-dav = import ./packages/etesync-dav/default.nix; etesync-dav = import ./packages/etesync-dav/default.nix;
in in
{ {
imports = imports =
[ [
./vscode.nix ./vscode.nix
@ -106,5 +106,5 @@ in
nix.gc.automatic = true; nix.gc.automatic = true;
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
system.stateVersion = "19.03"; system.stateVersion = "19.03";
} }

View file

@ -3,7 +3,7 @@
let let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz; unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
in in
{ {
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
@ -28,43 +28,13 @@ in
]; ];
imports = [ imports = [
./programs/zsh.nix ./programs/zsh.nix
./programs/vim.nix
./programs/alacritty.nix ./programs/alacritty.nix
]; ];
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
vim = {
enable = true;
extraConfig = builtins.readFile ~/dev/dotfiles/.vimrc.nixos;
plugins = [
"vim-gitgutter"
"vim-toml"
"vim-autoformat"
"editorconfig-vim"
"tabular"
"vim-colors-solarized"
"fzf-vim"
"ctrlp-vim"
"vim-nix"
"vim-startify"
"ack-vim"
"vim-markdown"
"rust-vim"
"nerdtree"
"vim-dispatch"
"deoplete-nvim"
"deoplete-go"
"vim-fugitive"
"vim-sensible"
"vim-surround"
"vim-airline"
"vim-airline-themes"
"vim-dirdiff"
"nerdtree-git-plugin"
];
};
fzf.enable = true; fzf.enable = true;
tmux = { tmux = {
enable = true; enable = true;
@ -79,4 +49,4 @@ in
go.enable = true; go.enable = true;
bat.enable = true; bat.enable = true;
}; };
} }

33
nixos/programs/vim.nix Normal file
View file

@ -0,0 +1,33 @@
{ config, pkgs, ... }:
{
programs.vim = {
enable = true;
extraConfig = builtins.readFile ~/dev/dotfiles/.vimrc.nixos;
plugins = [
"vim-gitgutter"
"vim-toml"
"vim-autoformat"
"editorconfig-vim"
"tabular"
"vim-colors-solarized"
"fzf-vim"
"ctrlp-vim"
"vim-nix"
"vim-startify"
"ack-vim"
"vim-markdown"
"rust-vim"
"nerdtree"
"vim-dispatch"
"deoplete-nvim"
"deoplete-go"
"vim-fugitive"
"vim-sensible"
"vim-surround"
"vim-airline"
"vim-airline-themes"
"vim-dirdiff"
"nerdtree-git-plugin"
];
};
}

View file

@ -2,7 +2,7 @@
let let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz; unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
in in
{ {
nixpkgs.config = { nixpkgs.config = {
packageOverrides = pkgs: { packageOverrides = pkgs: {
unstable = import unstableTarball { unstable = import unstableTarball {
@ -17,4 +17,4 @@ in
openDefaultPorts = true; openDefaultPorts = true;
package = pkgs.unstable.syncthing; package = pkgs.unstable.syncthing;
}; };
} }

View file

@ -2,7 +2,7 @@
let let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz; unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
in in
{ {
nixpkgs.config = { nixpkgs.config = {
packageOverrides = pkgs: { packageOverrides = pkgs: {
unstable = import unstableTarball { unstable = import unstableTarball {
@ -15,4 +15,4 @@ in
enableExtensionPack = true; enableExtensionPack = true;
enableHardening = false; enableHardening = false;
}; };
} }

View file

@ -3,7 +3,7 @@
let let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz; unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
in in
{ {
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
@ -153,4 +153,4 @@ in
];}) ];})
]; ];
}; };
} }