From b1358187478ebc5886b15ca844dadac3baeedc0a Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 19 Dec 2022 18:01:40 +0100 Subject: [PATCH] formatting --- flake.lock | 6 +- hosts/thinkpad/hardware-configuration.nix | 9 +- users/rouven/modules/alacritty/default.nix | 4 +- users/rouven/modules/default.nix | 478 +++++++++++---------- users/rouven/modules/vifm/default.nix | 6 +- 5 files changed, 254 insertions(+), 249 deletions(-) diff --git a/flake.lock b/flake.lock index 0a14654..97fa35d 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1671335968, - "narHash": "sha256-V7mjlh7brp70elokmml6XzHinpTilkQJjiYIGjEmSGs=", + "lastModified": 1671459164, + "narHash": "sha256-RbkDnvLV7WjbiF4Dpiezrf8kXxwieQXAVtY8ciRQj6Q=", "owner": "nix-community", "repo": "home-manager", - "rev": "37713c6b04b963d41664e03576f73a18c9b0d224", + "rev": "e7eba9cc46547ae86642ad3c6a9a4fb22c07bc26", "type": "github" }, "original": { diff --git a/hosts/thinkpad/hardware-configuration.nix b/hosts/thinkpad/hardware-configuration.nix index b7e2c70..cd7eb2d 100755 --- a/hosts/thinkpad/hardware-configuration.nix +++ b/hosts/thinkpad/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; @@ -14,12 +15,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/8633a706-bf54-4d29-9fba-dbcffd723ab6"; + { + device = "/dev/disk/by-uuid/8633a706-bf54-4d29-9fba-dbcffd723ab6"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/3A2E-1AB6"; + { + device = "/dev/disk/by-uuid/3A2E-1AB6"; fsType = "vfat"; }; diff --git a/users/rouven/modules/alacritty/default.nix b/users/rouven/modules/alacritty/default.nix index 62595ec..57fc2b3 100644 --- a/users/rouven/modules/alacritty/default.nix +++ b/users/rouven/modules/alacritty/default.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: { - home.packages = with pkgs; [ alacritty ]; - home.file.".config/alacritty/alacritty.yml".source = ./alacritty.yml; + home.packages = with pkgs; [ alacritty ]; + home.file.".config/alacritty/alacritty.yml".source = ./alacritty.yml; } diff --git a/users/rouven/modules/default.nix b/users/rouven/modules/default.nix index 1d9cbd4..57a20db 100644 --- a/users/rouven/modules/default.nix +++ b/users/rouven/modules/default.nix @@ -1,281 +1,283 @@ { config, pkgs, ... }: { - imports = - [ - ./vifm - ./alacritty - ]; - home.username = "rouven"; - home.homeDirectory = "/home/rouven"; + imports = + [ + ./vifm + ./alacritty + ]; + home.username = "rouven"; + home.homeDirectory = "/home/rouven"; - home.packages = with pkgs; [ - # essentials - alacritty - networkmanagerapplet - pcmanfm - # vifm - xsel - lightlocker - vlc + home.packages = with pkgs; [ + # essentials + alacritty + networkmanagerapplet + pcmanfm + # vifm + xsel + lightlocker + vlc - # graphics - lxappearance - feh - flameshot - picom - okular - gimp + # graphics + lxappearance + feh + flameshot + picom + okular + gimp - # editing - fzf - powerline-fonts + # editing + fzf + powerline-fonts - # sound - pavucontrol + # sound + pavucontrol - # bluetooth - blueman + # bluetooth + blueman - # internet - thunderbird - discord - google-chrome - nextcloud-client - zoom-us + # internet + thunderbird + discord + google-chrome + nextcloud-client + zoom-us - # messaging - tdesktop - element-desktop - whatsapp-for-linux + # messaging + tdesktop + element-desktop + whatsapp-for-linux - # games - minecraft - superTuxKart - extremetuxracer - wine + # games + minecraft + superTuxKart + extremetuxracer + wine - # yubikey and password stuff - yubikey-manager - yubikey-manager-qt - yubioath-desktop - pass + # yubikey and password stuff + yubikey-manager + yubikey-manager-qt + yubioath-desktop + pass - # misc - fzf - neofetch - trash-cli - spotify - plover.dev - nixpkgs-fmt - virt-manager + # misc + fzf + neofetch + trash-cli + spotify + plover.dev + nixpkgs-fmt + virt-manager - # libs - libyubikey - libfido2 + # libs + libyubikey + libfido2 + ]; + + # programs.light.enable = true; # display brightness manager + # programs.kdeconnect.enable = true; + programs.git = { + enable = true; + userName = "Rouven Seifert"; + userEmail = "rouven@rfive.de"; + extraConfig = { + user.signingkey = "B95E8FE6B11C4D09"; + pull.rebase = false; + init.defaultBranch = "main"; + commit.gpgsign = true; + }; + + }; + + programs.zsh = { + enable = true; + shellAliases = { + rm = "trash"; + vifm = "vifm ."; + }; + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + + oh-my-zsh = { + enable = true; + # plugins = [ "zsh-autosuggestions" "fzf-tab" ]; + theme = "agnoster"; + }; + + plugins = [ + { + name = "zsh-autosuggestions"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autosuggestions"; + rev = "v0.7.0"; + sha256 = "KLUYpUu4DHRumQZ3w59m9aTW6TBKMCXl2UcKi4uMd7w="; + }; + } + { + name = "fzf-tab"; + src = pkgs.fetchFromGitHub { + owner = "Aloxaf"; + repo = "fzf-tab"; + rev = "14f66e4d3d0b366552c0412eb08ca9e0f7c797bd"; + sha256 = "YkfHPSuSKParz7JidR924CJSuXO6Rk0RZTlxPOBwLJk="; + }; + } ]; - # programs.light.enable = true; # display brightness manager - # programs.kdeconnect.enable = true; - programs.git = { - enable = true; - userName = "Rouven Seifert"; - userEmail = "rouven@rfive.de"; - extraConfig = { - user.signingkey = "B95E8FE6B11C4D09"; - pull.rebase = false; - init.defaultBranch = "main"; - commit.gpgsign = true; - }; - + localVariables = { + COMPLETION_WAITING_DOTS = "true"; + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#00bbbb,bold"; + # ZSH_AUTOSUGGEST_STRATEGY="(history completion)"; }; - programs.zsh = { - enable = true; - shellAliases = { - rm = "trash"; - vifm = "vifm ."; - }; - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - }; - - oh-my-zsh = { - enable = true; - # plugins = [ "zsh-autosuggestions" "fzf-tab" ]; - theme="agnoster"; - }; - - plugins = [ - { - name = "zsh-autosuggestions"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-autosuggestions"; - rev = "v0.7.0"; - sha256 = "KLUYpUu4DHRumQZ3w59m9aTW6TBKMCXl2UcKi4uMd7w="; - }; - } - { - name = "fzf-tab"; - src = pkgs.fetchFromGitHub { - owner = "Aloxaf"; - repo = "fzf-tab"; - rev = "14f66e4d3d0b366552c0412eb08ca9e0f7c797bd"; - sha256 = "YkfHPSuSKParz7JidR924CJSuXO6Rk0RZTlxPOBwLJk="; - }; - } - ]; - - localVariables = { - COMPLETION_WAITING_DOTS="true"; - ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#00bbbb,bold"; - # ZSH_AUTOSUGGEST_STRATEGY="(history completion)"; - }; - - initExtra = - '' - function c() { - cd - if [ $# -eq 0 ]; then - cd $(find -maxdepth 4 -not -path '*[cC]ache*' -not -path '*[tT]rash*' -type d | fzf --preview 'tree -C {}') - else - $1 $(find -maxdepth 5 -not -path '*[cC]ache*' -not -path '*[tT]rash*' | fzf --preview 'tree -C {}') - fi - } + initExtra = + '' + function c() { + cd + if [ $# -eq 0 ]; then + cd $(find -maxdepth 4 -not -path '*[cC]ache*' -not -path '*[tT]rash*' -type d | fzf --preview 'tree -C {}') + else + $1 $(find -maxdepth 5 -not -path '*[cC]ache*' -not -path '*[tT]rash*' | fzf --preview 'tree -C {}') + fi + } - function sn() { - nmcli connection up $(nmcli connection show | tail -n +2 | cut -d " " -f1 | fzf --preview 'nmcli connection show {}') - } + function sn() { + nmcli connection up $(nmcli connection show | tail -n +2 | cut -d " " -f1 | fzf --preview 'nmcli connection show {}') + } - prompt_dir() { - prompt_segment blue $CURRENT_FG '%c' - } + prompt_dir() { + prompt_segment blue $CURRENT_FG '%c' + } + ''; + }; + + programs.tmux = { + enable = true; + keyMode = "vi"; + terminal = "tmux-256color"; + clock24 = true; + extraConfig = + '' + set -g default-shell /etc/profiles/per-user/rouven/bin/zsh + bind P display-popup + ''; + plugins = with pkgs.tmuxPlugins; [ + { + plugin = dracula; + extraConfig = '' + set -g @dracula-show-fahrenheit false + set -g @dracula-plugins "weather time" + set -g @dracula-show-left-icon session + set -g @dracula-show-powerline true ''; - }; + } + ]; + }; - programs.tmux = { - enable = true; - keyMode = "vi"; - terminal = "tmux-256color"; - clock24 = true; - extraConfig = - '' - set -g default-shell /etc/profiles/per-user/rouven/bin/zsh - bind P display-popup - ''; - plugins = with pkgs.tmuxPlugins; [ - { - plugin = dracula; - extraConfig = '' - set -g @dracula-show-fahrenheit false - set -g @dracula-plugins "weather time" - set -g @dracula-show-left-icon session - set -g @dracula-show-powerline true - ''; - } - ]; - }; + programs.neovim = { + enable = true; + # defaultEditor = true; why the hell doesn't this work :( + # vimAlias = true; + plugins = with pkgs.vimPlugins; [ + nerdtree + nerdcommenter + fugitive-gitlab-vim + vim-repeat + vim-airline + fzf-vim + dracula-vim + vim-nix # this destroys my tab settings, ffs + ]; + extraConfig = + '' + " basic commands bound to uppercase key + command Q q + command W w + command Wq wq + command WQ wq - programs.neovim = { - enable = true; - # defaultEditor = true; why the hell doesn't this work :( - # vimAlias = true; - plugins = with pkgs.vimPlugins; [ - nerdtree - nerdcommenter - fugitive-gitlab-vim - vim-repeat vim-airline - fzf-vim dracula-vim - vim-nix # this destroys my tab settings, ffs - ]; - extraConfig = - '' - " basic commands bound to uppercase key - command Q q - command W w - command Wq wq - command WQ wq - - set shiftwidth=4 - set noexpandtab - set preserveindent - set number relativenumber - set tabstop=4 - set smartcase - set colorcolumn=120 - set nowrap - highlight ColorColumn ctermbg=darkgray + set shiftwidth=4 + set noexpandtab + set preserveindent + set number relativenumber + set tabstop=4 + set smartcase + set colorcolumn=120 + set nowrap + highlight ColorColumn ctermbg=darkgray - " beautify indents - :set list lcs=tab:\|\ + " beautify indents + :set list lcs=tab:\|\ - nnoremap ; : - nnoremap : ; - vnoremap ; : - vnoremap : ; + nnoremap ; : + nnoremap : ; + vnoremap ; : + vnoremap : ; - " set space as leader - nnoremap - let mapleader = " " + " set space as leader + nnoremap + let mapleader = " " - " air-line - let g:airline_powerline_fonts = 1 + " air-line + let g:airline_powerline_fonts = 1 - " NERDTree - nnoremap n :NERDTreeFocus :NERDTreeRefreshRoot - " NERDTree autostart" - autocmd VimEnter * NERDTree | wincmd p + " NERDTree + nnoremap n :NERDTreeFocus :NERDTreeRefreshRoot + " NERDTree autostart" + autocmd VimEnter * NERDTree | wincmd p - " Close the tab if NERDTree is the only window remaining in it. - autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif + " Close the tab if NERDTree is the only window remaining in it. + autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif - "remove ex-mode shortcut - nmap Q + "remove ex-mode shortcut + nmap Q - " trigger the fuzzy finder (fzf) - nnoremap f :Files - nnoremap g :GFiles - nnoremap b :Buffers - nnoremap r :Rg + " trigger the fuzzy finder (fzf) + nnoremap f :Files + nnoremap g :GFiles + nnoremap b :Buffers + nnoremap r :Rg - " keybinds for coc - nnoremap d :CocDiagnostics + " keybinds for coc + nnoremap d :CocDiagnostics - " quickfixlist binds - nnoremap :cnext - nnoremap :cprev + " quickfixlist binds + nnoremap :cnext + nnoremap :cprev - " locallist binds - nnoremap :lnext - nnoremap :lprev + " locallist binds + nnoremap :lnext + nnoremap :lprev - " split keybinds - nnoremap s :sp - nnoremap v :vs + " split keybinds + nnoremap s :sp + nnoremap v :vs - nnoremap h h - nnoremap j j - nnoremap k k - nnoremap l l + nnoremap h h + nnoremap j j + nnoremap k k + nnoremap l l - " coloring stuff - let g:dracula_colorterm = 0 - colorscheme dracula + " coloring stuff + let g:dracula_colorterm = 0 + colorscheme dracula - " better autocompletion menu colors - highlight Pmenu ctermbg=darkgray ctermfg=black - highlight PmenuSel ctermbg=gray ctermfg=black + " better autocompletion menu colors + highlight Pmenu ctermbg=darkgray ctermfg=black + highlight PmenuSel ctermbg=gray ctermfg=black - ''; - }; + ''; + }; - services.picom = { - enable = true; - }; + services.picom = { + enable = true; + }; - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; } diff --git a/users/rouven/modules/vifm/default.nix b/users/rouven/modules/vifm/default.nix index 2b3f97d..2f2a7bb 100644 --- a/users/rouven/modules/vifm/default.nix +++ b/users/rouven/modules/vifm/default.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: { - home.packages = with pkgs; [ vifm ]; - home.file.".config/vifm/vifmrc".source = ./vifmrc; - home.file.".config/vifm/colors/dracula.vifm".source = ./dracula.vifm; + home.packages = with pkgs; [ vifm ]; + home.file.".config/vifm/vifmrc".source = ./vifmrc; + home.file.".config/vifm/colors/dracula.vifm".source = ./dracula.vifm; }