Skip to content

Commit a30ac67

Browse files
committed
Format nix code
1 parent dba1a39 commit a30ac67

File tree

4 files changed

+131
-108
lines changed

4 files changed

+131
-108
lines changed

tmux/default.nix

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
{ lib, pkgs, config, ... }:
1+
{
2+
lib,
3+
pkgs,
4+
config,
5+
...
6+
}:
27

38
with lib;
49

5-
let cfg = config.lc-shell.tmux;
6-
in {
10+
let
11+
cfg = config.lc-shell.tmux;
12+
in
13+
{
714
options.lc-shell.tmux = {
815
enable = mkEnableOption "tmux configuration";
916
};

tmux/tmux.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ set -s copy-command "xclip -i -selection clipboard"
4444
# Status bar
4545
set-option -g status on # turn the status bar on
4646
set-option -gq status-utf8 on # set utf-8 for the status bar
47-
set-option -g status-interval 5 # set update frequencey (default 15 seconds)
47+
set-option -g status-interval 5 # set update frequency (default 15 seconds)
4848
set-option -g status-justify centre # center window list for clarity
4949
set-option -g status-position bottom # position the status bar at bottom of screen
5050

vim/default.nix

+105-96
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,118 @@
1-
{ lib, pkgs, config, ... }:
1+
{
2+
lib,
3+
pkgs,
4+
config,
5+
...
6+
}:
27

38
with lib;
49

5-
let cfg = config.lc-shell.vim;
6-
in {
10+
let
11+
cfg = config.lc-shell.vim;
12+
in
13+
{
714
options.lc-shell.vim = {
815
enable = mkEnableOption "vim configuration";
916
};
1017

1118
config = mkIf cfg.enable {
12-
programs.neovim = let
13-
pastemode-vim = pkgs.vimUtils.buildVimPlugin {
14-
name = "pastemode-vim";
15-
src = pkgs.fetchFromGitHub {
16-
owner = "lightcode";
17-
repo = "PasteMode.vim";
18-
rev = "1046b1efc0a85ee18a0f8cdbcb3d14a1743c1a1b";
19-
sha256 = "0bp4rwhj08mjafcpn0f27im21gvndaa5yqfv9apar0lzqk3wwgnv";
19+
programs.neovim =
20+
let
21+
pastemode-vim = pkgs.vimUtils.buildVimPlugin {
22+
name = "pastemode-vim";
23+
src = pkgs.fetchFromGitHub {
24+
owner = "lightcode";
25+
repo = "PasteMode.vim";
26+
rev = "1046b1efc0a85ee18a0f8cdbcb3d14a1743c1a1b";
27+
sha256 = "0bp4rwhj08mjafcpn0f27im21gvndaa5yqfv9apar0lzqk3wwgnv";
28+
};
29+
meta.homepage = "https://github.com/lightcode/PasteMode.vim";
2030
};
21-
meta.homepage = "https://github.com/lightcode/PasteMode.vim";
22-
};
23-
in {
24-
enable = true;
25-
plugins = with pkgs.vimPlugins; [
26-
gruvbox
27-
pastemode-vim
28-
supertab
29-
vim-airline-themes
30-
vim-cue
31-
vim-gitgutter
32-
vim-graphql
33-
vim-nix
31+
in
32+
{
33+
enable = true;
34+
plugins = with pkgs.vimPlugins; [
35+
gruvbox
36+
pastemode-vim
37+
supertab
38+
vim-airline-themes
39+
vim-cue
40+
vim-gitgutter
41+
vim-graphql
42+
vim-nix
3443

35-
{
36-
plugin = ale;
37-
config = ''
38-
let g:ale_fixers = {
39-
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
40-
\ 'nix': ['nixfmt'],
41-
\ 'python': ['ruff_format'],
42-
\ 'typescript': ['prettier'],
43-
\}
44-
let g:ale_sh_shellcheck_options = '-x'
45-
let g:ale_sh_shellcheck_change_directory = 0
46-
'';
47-
}
48-
{
49-
plugin = vim-terraform;
50-
config = ''
51-
let g:terraform_fmt_on_save = 1
52-
'';
53-
}
54-
{
55-
plugin = vim-markdown;
56-
config = ''
57-
let g:vim_markdown_folding_disabled = 1
58-
'';
59-
}
60-
{
61-
plugin = vim-go;
62-
config = ''
63-
if executable('goimports')
64-
let g:go_fmt_command = 'goimports'
65-
endif
66-
'';
67-
}
68-
{
69-
plugin = vim-pencil;
70-
config = ''
71-
let g:pencil#autoformat = 0
72-
let g:pencil#conceallevel = 0
73-
let g:pencil#wrapModeDefault = 'soft'
74-
'';
75-
}
76-
{
77-
plugin = ctrlp-vim;
78-
config = ''
79-
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:12,results:12'
80-
let g:ctrlp_custom_ignore = {
81-
\ 'dir': '\v[\/](\.(git|hg|svn))$',
82-
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$' }
83-
if executable('ag')
84-
set grepprg=ag\ --nogroup\ --nocolor
85-
let g:ctrlp_user_command = 'ag %s -l --hidden --ignore .git --nocolor -g ""'
86-
endif
87-
'';
88-
}
89-
{
90-
plugin = vim-airline;
91-
config = ''
92-
set noshowmode
44+
{
45+
plugin = ale;
46+
config = ''
47+
let g:ale_fixers = {
48+
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
49+
\ 'nix': ['nixfmt'],
50+
\ 'python': ['ruff_format'],
51+
\ 'typescript': ['prettier'],
52+
\}
53+
let g:ale_sh_shellcheck_options = '-x'
54+
let g:ale_sh_shellcheck_change_directory = 0
55+
'';
56+
}
57+
{
58+
plugin = vim-terraform;
59+
config = ''
60+
let g:terraform_fmt_on_save = 1
61+
'';
62+
}
63+
{
64+
plugin = vim-markdown;
65+
config = ''
66+
let g:vim_markdown_folding_disabled = 1
67+
'';
68+
}
69+
{
70+
plugin = vim-go;
71+
config = ''
72+
if executable('goimports')
73+
let g:go_fmt_command = 'goimports'
74+
endif
75+
'';
76+
}
77+
{
78+
plugin = vim-pencil;
79+
config = ''
80+
let g:pencil#autoformat = 0
81+
let g:pencil#conceallevel = 0
82+
let g:pencil#wrapModeDefault = 'soft'
83+
'';
84+
}
85+
{
86+
plugin = ctrlp-vim;
87+
config = ''
88+
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:12,results:12'
89+
let g:ctrlp_custom_ignore = {
90+
\ 'dir': '\v[\/](\.(git|hg|svn))$',
91+
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$' }
92+
if executable('ag')
93+
set grepprg=ag\ --nogroup\ --nocolor
94+
let g:ctrlp_user_command = 'ag %s -l --hidden --ignore .git --nocolor -g ""'
95+
endif
96+
'';
97+
}
98+
{
99+
plugin = vim-airline;
100+
config = ''
101+
set noshowmode
93102
94-
let g:airline_theme = 'bubblegum'
95-
let g:airline_skip_empty_sections = 1
96-
let g:airline_extensions = ['tabline', 'ctrlp', 'ale']
97-
let g:airline#extensions#tabline#enabled = 1
98-
let g:airline#extensions#tabline#left_sep = ""
99-
let g:airline#extensions#tabline#left_alt_sep = ""
100-
let g:airline#extensions#tabline#right_sep = ""
101-
let g:airline#extensions#tabline#right_alt_sep = ""
102-
let g:airline#extensions#tabline#formatter = 'default'
103-
'';
104-
}
105-
];
106-
extraConfig = builtins.readFile ./vimrc;
107-
};
103+
let g:airline_theme = 'bubblegum'
104+
let g:airline_skip_empty_sections = 1
105+
let g:airline_extensions = ['tabline', 'ctrlp', 'ale']
106+
let g:airline#extensions#tabline#enabled = 1
107+
let g:airline#extensions#tabline#left_sep = ""
108+
let g:airline#extensions#tabline#left_alt_sep = ""
109+
let g:airline#extensions#tabline#right_sep = ""
110+
let g:airline#extensions#tabline#right_alt_sep = ""
111+
let g:airline#extensions#tabline#formatter = 'default'
112+
'';
113+
}
114+
];
115+
extraConfig = builtins.readFile ./vimrc;
116+
};
108117
};
109118
}

zsh/default.nix

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
{ lib, pkgs, config, ... }:
1+
{
2+
lib,
3+
pkgs,
4+
config,
5+
...
6+
}:
27

38
with lib;
49

5-
let cfg = config.lc-shell.zsh;
6-
in {
10+
let
11+
cfg = config.lc-shell.zsh;
12+
in
13+
{
714
options.lc-shell.zsh = {
815
enable = mkEnableOption "zsh configuration";
916
};
@@ -43,11 +50,11 @@ in {
4350
};
4451
envExtra = builtins.readFile ./files/zshenv;
4552
profileExtra = ''
46-
# Make sure that zshenv is loaded and anything won't be
47-
# override by the /etc/zprofile provided by the distro.
48-
if [[ -f "''${HOME}/.zshenv" ]]; then
49-
source "''${HOME}/.zshenv"
50-
fi
53+
# Make sure that zshenv is loaded and anything won't be
54+
# override by the /etc/zprofile provided by the distro.
55+
if [[ -f "''${HOME}/.zshenv" ]]; then
56+
source "''${HOME}/.zshenv"
57+
fi
5158
'';
5259
plugins = [
5360
{

0 commit comments

Comments
 (0)