From a71fa5adac5700eec644e17188798f164bd5f871 Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Mon, 28 Sep 2020 00:47:04 +1000 Subject: [PATCH] updated --- common.nix | 87 ++++++++++++++++++++++++++--------------------- configuration.nix | 26 ++++++++------ nvim.nix | 50 ++++++++++++++------------- 3 files changed, 89 insertions(+), 74 deletions(-) diff --git a/common.nix b/common.nix index 5c76b561..53b28157 100644 --- a/common.nix +++ b/common.nix @@ -3,7 +3,7 @@ { imports = [ ./nvim.nix -# ./unstable.nix +# ./unstable.nix ]; @@ -17,83 +17,92 @@ mtr file lsof - atool + atool inotify-tools - strace + strace zip unzip rsync tmux pwgen - glow + glow gitAndTools.gitFull - #neovim defined in ./nvim.nix - #rofi + #neovim defined in ./nvim.nix + wofi firefox fractal - pinentry_gnome + pinentry_gnome pass gcc less mpv zathura + #qmk_firmware python3 - gdb - vcv-rack - #xdotool - #neofetch - #calibre + gdb + vcv-rack + #xdotool + #neofetch + #calibre #openvpn - gimp - xxd + gimp + xxd tilix + kitty taskwarrior gnupg - openjdk + openjdk glslviewer - filezilla + filezilla signal-desktop - wire-desktop + wire-desktop tdesktop feedreader syncthing - #kdeconnect - #ssb-patchwork + dijo + #kdeconnect + #ssb-patchwork gnome3.gnome-tweaks - gnome3.pomodoro + gnome3.pomodoro gnomeExtensions.gsconnect gnomeExtensions.taskwhisperer - #gnome3.networkmanager-openvpn + #gnome3.networkmanager-openvpn #python3Packages.youtube-dl appimage-run - home-manager + home-manager libreoffice fontconfig hugo - nodejs - #processing - #nextcloud-client - zsh-powerlevel10k - powerline-fonts - supercollider - haskellPackages.tidal - #(let neuronSrc = builtins.fetchTarball https://github.com/srid/neuron/archive/master.tar.gz; - #in import neuronSrc) + nodejs + #processing + #nextcloud-client + zsh-powerlevel10k + powerline-fonts + supercollider + haskellPackages.tidal + # vim-zettel + pandoc + ag ]; programs.bash.enableCompletion = true; - # needed for vcv-rack - nixpkgs.config.allowUnfree = true; + # needed for vcv-rack + nixpkgs.config.allowUnfree = true; system.copySystemConfiguration = true; - services.syncthing.enable = true; - services.syncthing.user = "anish"; + services.syncthing = { + enable = true; + openDefaultPorts = true; + systemService = true; + user = "anish"; + dataDir = "/home/anish/usr/syncthing"; + }; - #zsh powerlevel10k - programs.zsh.enable = true; - programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - users.users.anish.shell = pkgs.zsh; + #zsh powerlevel10k + programs.zsh.enable = true; + programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + users.users.anish.shell = pkgs.zsh; #android programs.adb.enable = true; diff --git a/configuration.nix b/configuration.nix index c430b114..de14efb9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -11,7 +11,7 @@ ./common.nix ./box.nix ]; - + # Use the GRUB 2 boot loader. boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.efiSysMountPoint = "/boot/efi"; @@ -21,18 +21,22 @@ version = 2; efiSupport = true; enableCryptodisk = true; - extraInitrd = /boot/initrd.keys.gz; }; - boot.initrd.luks.devices = [ - { - name = "root"; - device = "/dev/disk/by-uuid/f37f3222-47d7-42d8-b400-363320a31853"; # UUID for /dev/nvme01np2 - preLVM = true; - keyFile = "/keyfile0.bin"; - allowDiscards = true; - } - ]; + boot.initrd.secrets = { + "/keyfile0.bin" = /etc/secrets/initrd/keyfile0.bin; + "/keyfile1.bin" = /etc/secrets/initrd/keyfile1.bin; + }; + + boot.initrd.luks.devices = { + "root" = { + #name = "root"; + device = "/dev/disk/by-uuid/f37f3222-47d7-42d8-b400-363320a31853"; # UUID for /dev/nvme01np2 + preLVM = true; + allowDiscards = true; + keyFile = "/keyfile0.bin"; + }; + }; # Data mount fileSystems."/data" = { diff --git a/nvim.nix b/nvim.nix index c076a748..34aa7666 100644 --- a/nvim.nix +++ b/nvim.nix @@ -2,8 +2,13 @@ #nvim - { environment.variables.EDITOR = "nvim"; - environment.systemPackages = with pkgs; [ + { + environment.variables.EDITOR = "nvim"; + environment.shellAliases = { + k = "vim -c :VimwikiIndex"; + kz = "vim -c :VimwikiIndex -c :ZettelNew"; + }; + environment.systemPackages = with pkgs; [ ( neovim.override { vimAlias = true; configure = { @@ -12,15 +17,13 @@ vim-nix fzf-vim vim-elixir - # vim-processing - # scvim emmet-vim nerdtree goyo-vim vim-sneak lightline-vim csv-vim - vimwiki + vimwiki coc-nvim coc-json coc-python @@ -31,7 +34,12 @@ ayu-vim rainbow_parentheses-vim vim-surround - #neuron-vim + vim-fugitive + # testing + #vim-processing + #vim-tidal + taskwiki + vim-zettel ]; }; customRC = '' @@ -56,6 +64,11 @@ let mapleader = "\" + " lightline colorscheme + let g:lightline = { + \ 'colorscheme': 'seoul256', + \ } + " moving splits with vim movements. :tnoremap h :tnoremap j @@ -65,10 +78,10 @@ :inoremap j :inoremap k :inoremap l - :nnoremap h - :nnoremap j - :nnoremap k - :nnoremap l + :nnoremap h + :nnoremap j + :nnoremap k + :nnoremap l :nnoremap "=strftime("%Y-%m-%d %H:%M:") :inoremap =strftime("%Y-%m-%d %H:%M:") @@ -80,30 +93,19 @@ let g:rainbow_active = 0 autocmd BufReadPost,BufNewFile c,py,nix RainbowParenthesesToggleAll - " call plug#begin('~/.vim/plugged') - " call plug#end() - - " fzf notational vim - " let g:nv_search_paths = ['~/vimwiki', '~/usr/devlog'] - " let g:nv_default_extension = '.wiki' - " keyboard commands map t :NERDTreeToggle map s :w map q :wq - map z :NV map r :RainbowParenthesesToggleAll + map zs :ZettelSearch + map zo :ZettelOpen + map zn :ZettelNew - " lightline colorscheme - let g:lightline = { - \ 'colorscheme': 'seoul256', - \ } " NERDTree " open on directory autocmd StdinReadPre * let s:std_in=1 - autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif - " coc "