From aba7fcbc1c649a05ad8ab3a8a1ad42ea69c29d27 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 12 May 2021 21:27:41 +0200 Subject: development: add some common tools --- usecases/desktop/development.nix | 56 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) (limited to 'usecases') diff --git a/usecases/desktop/development.nix b/usecases/desktop/development.nix index 022482d..e9c4ca2 100644 --- a/usecases/desktop/development.nix +++ b/usecases/desktop/development.nix @@ -15,11 +15,14 @@ let in { users.extraUsers.minijackson.packages = with pkgs; [ - rr - rtags - gcc clang clang-tools + elixir + gcc + gdb + man-pages + rr + rtags ]; vim = { @@ -36,4 +39,51 @@ in rust_analyzer_path = "'${rust-analyzer-unwrapped}/bin/rust-analyzer'"; }; }; + + programs.zsh.interactiveShellInit = '' + (( $+commands[rustc] )) && fpath+="$(rustc --print sysroot)/share/zsh/site-functions" + ''; + + documentation.dev.enable = true; + + boot.kernel.sysctl = { + # For RR + "kernel.perf_event_paranoid" = 1; + }; + + home-manager.users.minijackson = { config, ... }: + { + home.file.".clang-format".source = (pkgs.formats.yaml { }).generate + "clang-format.yml" + { + BasedOnStyle = "Mozilla"; + ColumnLimit = 100; + TabWidth = 4; + IndentWidth = 4; + UseTab = "ForIndentation"; + + AccessModifierOffset = -4; + AlwaysBreakAfterDefinitionReturnType = "None"; + AlwaysBreakAfterReturnType = "None"; + AlwaysBreakTemplateDeclarations = true; + BinPackArguments = false; + BinPackParameters = false; + BreakConstructorInitializers = "BeforeComma"; + Cpp11BracedListStyle = true; + DerivePointerAlignment = false; + NamespaceIndentation = "Inner"; + PenaltyBreakBeforeFirstCallParameter = 2; + PointerAlignment = "Left"; + Standard = "Latest"; + }; + + programs.direnv = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + }; + + }; + + services.lorri.enable = true; } -- cgit v1.2.3