From 02f04e68e383819c2867cc98ca5e92d33f0d0cf0 Mon Sep 17 00:00:00 2001 From: Roman Godmaire Date: Sat, 30 Mar 2024 11:30:00 -0400 Subject: [PATCH] nix: devenv! --- doom/init.el | 2 +- home-manager/home.nix | 75 +++++++++++++++++++++---------------------- 2 files changed, 37 insertions(+), 40 deletions(-) diff --git a/doom/init.el b/doom/init.el index dcbc9a8..fc8da49 100644 --- a/doom/init.el +++ b/doom/init.el @@ -88,7 +88,7 @@ ;;ansible ;;biblio ; Writes a PhD for you (citation needed) debugger ; FIXME stepping through code, to help you add bugs - ;;direnv + direnv docker ;;editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs diff --git a/home-manager/home.nix b/home-manager/home.nix index d79cd9f..cf30cc4 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -18,55 +18,19 @@ # The home.packages option allows you to install Nix packages into your # environment. home.packages = with pkgs; [ + devenv + direnv + ripgrep fd sd bat just tokei - mprocs mermaid-cli yazi jq - turso-cli - flyctl - - # Elixir - elixir - elixir-ls - gleam - - # Golang - go - gopls - delve - gore - gotests - gotools - - # Haskell - ghc - haskell-language-server - stack - - # Node - nodejs - nodePackages.pnpm - nodePackages.typescript - nodePackages.typescript-language-server - nodePackages.svelte-language-server - - # Python - pdm - pipenv - pyright - ruff - - # Rust - rustup - cargo-tarpaulin - # Shell shellcheck shfmt @@ -151,6 +115,8 @@ loginShellInit = '' set -x XDG_DATA_DIRS $HOME/.nix-profile/share:$XDG_DATA_DIRS + set -x DIRENV_LOG_FORMAT + set -x SSH_AUTH_SOCK /run/user/1000/keyring/ssh ''; interactiveShellInit = '' @@ -203,4 +169,35 @@ # Services services.syncthing.enable = true; + + # Borgmatic + services.borgmatic = { + enable = true; + frequency = "*-*-* 08:00:00"; + }; + + programs.borgmatic = { + enable = true; + + backups = { + diana = { + location = { + sourceDirectories = [ "/var/home/digyx" ]; + repositories = [ "ssh://tztl5fp2@tztl5fp2.repo.borgbase.com/./repo" ]; + }; + + retention = { + keepDaily = 7; + keepWeekly = 4; + keepMonthly = 12; + }; + + storage = { + encryptionPasscommand = "${pkgs.pass}/bin/pass borg-key"; + extraConfig.ssh_command = "/usr/bin/ssh"; + }; + }; + }; + + }; }