Compare commits

..

654 commits

Author SHA1 Message Date
Bruno BELANYI 5487f3f5c8 WIP
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-05 10:12:01 +02:00
Bruno BELANYI b582aff866 home: vim: migrate to 'nvim-surround'
All checks were successful
continuous-integration/drone/push Build is passing
It's potentially more customizable, and integrates with tree-sitter. It
also allows for buffer/filetype specific pairs.
2022-09-02 09:56:20 +02:00
Bruno BELANYI 1151b2e5ef flake: bump inputs 2022-09-02 09:49:35 +02:00
Bruno BELANYI f4b7914894 modules: services: gitea: migrate to 'settings'
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-31 17:19:58 +02:00
Bruno BELANYI c5c1e159e8 home: mail: accounts: use 'outlook' flavor
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-31 17:16:44 +02:00
Bruno BELANYI a85c73f14f flake: bump inputs 2022-08-31 17:16:44 +02:00
Bruno BELANYI bdef8577bd home: gdb: fix auto-load safe path
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-10 15:23:21 +02:00
Bruno BELANYI 135349c882 modules: services: grocy: fix SSL configuration
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-28 18:29:10 +02:00
Bruno BELANYI b965ee15e5 machines: porthos: services: enable grocy 2022-07-28 18:29:10 +02:00
Bruno BELANYI 622f9c61e4 modules: services: add grocy 2022-07-28 18:29:10 +02:00
Bruno BELANYI 224e8f8548 modules: services: paperless: fix DB dependency 2022-07-28 17:54:02 +02:00
Bruno BELANYI 20aebccb92 flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-12 13:48:25 +02:00
Bruno BELANYI 54e3699c25 home: xdg: do not set 'WGETRC'
I don't use it...
2022-07-11 14:11:43 +02:00
Bruno BELANYI 89934f5043 home: vim: add 'nvim-lspconfig'
All checks were successful
continuous-integration/drone/push Build is passing
For some reason I had not added it to my plug-in list, but it still
worked until I bumped my inputs.
2022-06-23 10:02:32 +02:00
Bruno BELANYI e5b82f0902 lib: fix formatting
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-22 16:06:58 +02:00
Bruno BELANYI fc63759c1a flake: remove 'aarch64-darwin'
'pyopenssl' has been marked as broken on this sytem, so remove it from
my supported systems to avoid breaking 'nix flake check'.
2022-06-22 16:05:28 +02:00
Bruno BELANYI 4ea0f8bc51 flake: bump inputs 2022-06-22 16:04:01 +02:00
Bruno BELANYI abc67487a3 pkgs: remove 'shellcheck' as a 'buildPhase'
I already verify those scripts with my pre-commit hook. And that way
avoid spurious build failures in case a (transitive) dependency is
broken.
2022-06-22 16:04:01 +02:00
Bruno BELANYI 56dcf94ba0 pkgs: add drone-rsync
All checks were successful
continuous-integration/drone/push Build is passing
A very simple wrapper script that I will migrate to, since 'drone-scp'
does not work for me anymore.
2022-06-20 14:34:37 +02:00
Bruno BELANYI 22fe2778cb home: vim: add 'tiger' file-type configuration 2022-06-20 14:33:44 +02:00
Bruno BELANYI 62b059ba0e pkgs: drone-scp: 1.6.2 -> 1.6.3
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-15 11:27:03 +02:00
Bruno BELANYI b587323095 home: migrate 'cursor' module to new option
Make it part of 'home.wm' now, since that makes more sense.

Not sure about making it related to 'i3' being activated though, will
need to think about this in the future.
2022-06-15 11:27:03 +02:00
Bruno BELANYI e81af8b3bc home: vim: ftdetect: add tiger 2022-06-15 11:27:03 +02:00
Bruno BELANYI 70fca2d19b modules: services: lohr: add 'openssh'
All checks were successful
continuous-integration/drone/push Build is passing
The git binary is not wrapped to add it in PATH anymore.
2022-05-31 13:54:34 +02:00
Bruno BELANYI 55a40a80b7 machines: aramis: home: add 'element-desktop'
All checks were successful
continuous-integration/drone/push Build is passing
It's less buggy than the web version...
2022-05-31 13:50:27 +02:00
Bruno BELANYI e03e3d674b flake: bump inputs 2022-05-31 13:48:18 +02:00
Bruno BELANYI 473c002c6e pkgs: diff-flake: 0.1.0 -> 0.2.0
Use the new flake attributes conventions.
2022-05-31 13:42:57 +02:00
Bruno BELANYI 11c53b4b1e flake: use new default app convention 2022-05-31 13:41:49 +02:00
Bruno BELANYI 609cd32001 overlays: remove 'sabnzbd-fix-missing-packages'
The upstream nixpkgs version has been fixed.
2022-05-31 11:07:32 +02:00
Bruno BELANYI b2be415b15 overlays: remove 'transgui-fix-duplicate-status'
It has been patched in upstream nixpkgs.
2022-05-31 11:06:58 +02:00
Bruno BELANYI 81df59c95f modules: services: nextcloud: bump to 24
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-23 15:49:22 +02:00
Bruno BELANYI db3950eb3a flake: bump inputs 2022-05-23 15:46:07 +02:00
Bruno BELANYI 46bc5cb392 pkgs: unified-hosts-lists: 3.9.11 -> 3.10.1
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-23 11:07:05 +02:00
Bruno BELANYI 1fa47793e8 home: vim: completion: activate 'ghost_text'
I'm still thinking whether I would want to use one of those signature
helper windows to go with this/replace this feature.

Could be especially useful in C++.
2022-05-19 14:53:09 +02:00
Bruno BELANYI d4c4349cdb pkgs: dragger: fix meta information 2022-05-15 19:07:49 +02:00
Bruno BELANYI 522cc99c03 home: packages: remove 'rr'
No need for this, now that I have a dedicated option for the package.
2022-05-10 13:51:49 +02:00
Bruno BELANYI 9616c5cce7 home: wm: i3: simplify 'htop' rule
All checks were successful
continuous-integration/drone/push Build is passing
Turns out you can chain commands with `,` in a `for_window` statement.

Of course this is inconsistent with `bindsym` which uses `;`...
2022-05-03 10:01:42 +02:00
Bruno BELANYI c54bbbfbec modules: hardware: bluetooth: remove wireplumber
This configuration file completely breaks my sound setup.

Will investigate more at a later time, in the mean time, since this is
basically the default options, I will just remove the configuration
file.

This reverts commit c987206bc5.
2022-05-02 11:18:23 +02:00
Bruno BELANYI d67c53a278 flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-28 13:45:55 +02:00
Bruno BELANYI ae64603d54 machines: aramis: hardware: use 'hardware' module
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-27 14:03:18 +02:00
Bruno BELANYI 256c857ac0 modules: hardware: add firmware 2022-04-27 14:03:18 +02:00
Bruno BELANYI c987206bc5 modules: hardware: bluetooth: add wireplumber conf
Now that `media-session` is deprecated, I should at least replicate this
configuration for `wireplumber`.
2022-04-27 14:03:10 +02:00
Bruno BELANYI 799890ca37 home: vim: lua: lsp: add signature help mapping 2022-04-27 14:02:17 +02:00
Bruno BELANYI 7df77a7e0c home: firefox: tridactyl: fix comment toggle
Ignore javascript event, like the upstream binding.
2022-04-27 14:02:17 +02:00
Bruno BELANYI b3662bfe5e home: firefox: tridactyl: add 'Nitter' redirect 2022-04-27 14:02:17 +02:00
Bruno BELANYI caf05fbdd8 profiles: gtk: remove typo 2022-04-27 14:02:17 +02:00
Bruno BELANYI e073cc900c home: vim: git: map keys on start
Instead of mapping those keys when `gitsigns` attaches to a buffer...
2022-04-27 14:02:17 +02:00
Bruno BELANYI 80c2c415fb home: vim: lualine: use 'FugitiveHead'
The built-in `branch` indicator does not handle git worktrees quite
correctly.

It shows the wrong branch when used in `git commit`.
2022-04-27 14:02:17 +02:00
Bruno BELANYI dd7cb5f081 flake: bump inputs
And ensure that the renamed `paperless` services are configured
correctly.
2022-04-27 14:02:17 +02:00
Bruno BELANYI 958cd30b33 flake: update from deprecated flake attributes 2022-04-18 14:11:46 +02:00
Bruno BELANYI 6530af39d8 home: direnv: allow specifying default flake
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-13 10:06:26 +02:00
Bruno BELANYI b9361dada4 home: direnv: add 'nix' library file 2022-04-13 10:04:54 +02:00
Bruno BELANYI d118351849 home: direnv: add 'python' library file
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-13 09:20:52 +02:00
Bruno BELANYI 19aabcf6f5 home: direnv: add 'postgres' library file 2022-04-12 17:34:36 +02:00
Bruno BELANYI 7010ba25f4 flake: only use subset of systems
All checks were successful
continuous-integration/drone/push Build is passing
Turns out pre-commit pulls dotnet in its closure, which is not supported
on i686...
2022-04-12 10:45:04 +02:00
Bruno BELANYI 5c6d0cd032 overlays: remove vim-plugins-overrides 2022-04-12 10:45:04 +02:00
Bruno BELANYI c936d2e043 home: zsh: use packaged 'agkozak-zsh-prompt'
Some checks failed
continuous-integration/drone/push Build is failing
2022-04-11 18:33:15 +02:00
Bruno BELANYI b322f09147 flake: bump inputs 2022-04-11 18:33:15 +02:00
Bruno BELANYI b53bcc5307 machines: aramis: networking: disable DHCP
All checks were successful
continuous-integration/drone/push Build is passing
Let NetworkManager take care of it, this avoids the "waiting for dhcpd"
message when shutting down my laptop.
2022-04-09 15:27:27 +02:00
Bruno BELANYI cb068a42e9 machines: porthos: services: set-up gitea mail
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-08 21:34:44 +02:00
Bruno BELANYI 9b0cc37502 modules: secrets: gitea: add 'mail-password' 2022-04-08 21:34:44 +02:00
Bruno BELANYI 7ecaa23f0b modules: services: gitea: add 'mail' configuration 2022-04-08 21:34:44 +02:00
Bruno BELANYI 2223659681 flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-04 16:20:55 +02:00
Bruno BELANYI e568b85781 home: wm: i3: bigger 'htop' window
All checks were successful
continuous-integration/drone/push Build is passing
It seems like one cannot use multiple commands in a `for_window`
directive. So use two different ones.
2022-03-29 15:49:08 +02:00
Bruno BELANYI e551c44748 home: gdb: remove HOME pollution
All checks were successful
continuous-integration/drone/push Build is passing
Now that the version in nixpkgs contains the patch to look at
XDG_CONFIG_HOME, use only that one.
2022-03-25 15:49:05 +01:00
Bruno BELANYI 53ad71fb7c machines: aramis: hardware: fix trackpoint device
All checks were successful
continuous-integration/drone/push Build is passing
My trackpoint, and its buttons, had stopped working a while ago. Before
that, I regularly had problems where the cursor jumped around randomly,
or the buttons stopped working.

This seems to have fixed it.
2022-03-14 14:33:12 +01:00
Bruno BELANYI 77e53c1643 home: vim: null-ls: prefer 'pflake8' if available
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-11 14:30:27 +01:00
Bruno BELANYI 2690dbf352 overlays: add vim-plugins-overrides 2022-03-11 14:28:09 +01:00
Bruno BELANYI e32ce32860 home: git: use 'zdiff3' merge conflict markers
See GitHub's presentation about this feature [1].

[1]: https://github.blog/2022-01-24-highlights-from-git-2-35/
2022-03-11 14:11:32 +01:00
Bruno BELANYI 0af000e52e home: vim: telescope: add 'which-key' mapping
This opens a little preview window with different mappings for
telescope.
2022-03-11 14:11:07 +01:00
Bruno BELANYI 0fd5fb86b1 home: vim: telescope: disable scrolling up 2022-03-11 14:03:18 +01:00
Bruno BELANYI b8406735ba home: vim: set 'termguicolors'
For once, I like the look *with* 24-bit colors better on this current
color-scheme.
2022-03-11 14:02:01 +01:00
Bruno BELANYI 30c676e20b home: vim: sort plugin list
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-11 10:08:25 +01:00
Bruno BELANYI ed24bebc04 home: wm: i3bar: show microphone status
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-09 12:09:43 +01:00
Bruno BELANYI 23c4256769 home: vim: telescope: add LSP handler
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-08 20:57:28 +01:00
Bruno BELANYI 4e9764920a home: vim: move 'on_attach' to 'ambroisie.lsp' 2022-03-08 20:20:22 +01:00
Bruno BELANYI 3fc0201dfa home: vim: lspconfig: use actual 'lspconfig' name 2022-03-08 20:18:02 +01:00
Bruno BELANYI d5527912a3 modules: services: matrix: use 'settings'
All checks were successful
continuous-integration/drone/push Build is passing
The unstructured attributes are hard-deprecated.
2022-03-08 11:56:32 +01:00
Bruno BELANYI 44b2034135 flake: bump inputs
Some checks failed
continuous-integration/drone/push Build is failing
2022-03-08 10:41:35 +01:00
Bruno BELANYI 6f7f49dc13 home: vim: completion: do not use tab to select
I would rather have my actual preferred mappings, <C-n> and <C-p>, for
that.
2022-03-08 10:41:35 +01:00
Bruno BELANYI d39c0419b7 home: vim: lualine: remove 'fzf' integration
I do not use 'fzf' anymore.
2022-03-08 10:41:35 +01:00
Bruno BELANYI e4622dd6ea home: vim: configure 'luasnip' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 52e0a2fd0f home: vim: add 'friendly-snippets' 2022-03-08 10:41:35 +01:00
Bruno BELANYI d5e50b5389 home: vim: completion: remove up/down mappings
I do not use arrow keys, why bother with them.
2022-03-08 10:41:35 +01:00
Bruno BELANYI fdf1f1617f home: vim: add 'nvim-ts-context-commentstring' 2022-03-08 10:41:35 +01:00
Bruno BELANYI be3391285a home: vim: comparison: stronger priority hint 2022-03-08 10:41:35 +01:00
Bruno BELANYI 435e56d53a home: vim: completion: configure snippets 2022-03-08 10:41:35 +01:00
Bruno BELANYI df92d1c562 home: vim: sort plugin list 2022-03-08 10:41:35 +01:00
Bruno BELANYI 8d1535e261 home: vim: add 'luasnip' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 2df0940665 home: vim: completion: add mapping to scroll docs 2022-03-08 10:41:35 +01:00
Bruno BELANYI 3e0a5ef1a4 home: vim: completion: add 'cmp-under-comparator' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 52722fb408 home: vim: completion: explicit mappings
This is basically a copy-paste of the default mappings, with some small
amount of customization.
2022-03-08 10:41:35 +01:00
Bruno BELANYI 93a3a4fb6b home: vim: configure 'dressing-nvim' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 1834a7002b home: vim: add 'dressing-nvim' 2022-03-08 10:41:35 +01:00
Bruno BELANYI bcbc9af372 home: vim: telescope: set-up 'fzf' matching 2022-03-08 10:41:35 +01:00
Bruno BELANYI 1be9eb517b home: vim: add 'telescope' grep mappings 2022-03-08 10:41:35 +01:00
Bruno BELANYI 16fc677509 home: vim: replace 'fzf' with 'telescope'
I like the fact that it uses built-in buffers to preview files.

It also has more inertia behind it, tighter integrations in the
ecosystem.
2022-03-08 10:41:35 +01:00
Bruno BELANYI bf7184c260 home: packages: add 'fd' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 4627350311 home: packages: add 'ripgrep' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 9ef35f06df home: vim: completion: limit 'buffer' suggestions
Otherwise it gets overwhelming, and most are useless.
2022-03-08 10:41:35 +01:00
Bruno BELANYI 5b7fa7c09a home: vim: completion: use better order 2022-03-08 10:41:35 +01:00
Bruno BELANYI a49e66da80 home: vim: completion: use native menu 2022-03-08 10:41:35 +01:00
Bruno BELANYI 35d96e1e69 home: vim: configure 'nvim-cmp' for LSP 2022-03-08 10:41:35 +01:00
Bruno BELANYI 05e7883dab home: vim: add 'cmp-nvim-lsp' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 273618ff94 home: vim: configure 'nvim-cmp' 2022-03-08 10:41:35 +01:00
Bruno BELANYI 25967e21f1 home: vim: add 'nvim-cmp' 2022-03-04 17:40:30 +01:00
Bruno BELANYI 3df2ad0f1f home: vim: git: more visual mappings
I cannot use the functions directly, as I would need to calculate the
current selections begin and end points and use them as arguments.

To be investigated.
2022-03-04 17:40:30 +01:00
Bruno BELANYI 57e5def998 home: vim: git: 'gitsigns' mappings are per buffer 2022-03-04 17:40:30 +01:00
Bruno BELANYI c5d9396a7d home: vim: git: use more appropriate mapping names 2022-03-04 17:40:30 +01:00
Bruno BELANYI 5263942970 home: vim: lsp: add diagnostic mappings 2022-03-04 17:40:30 +01:00
Bruno BELANYI cd20914370 home: vim: lsp: add workspace mappings 2022-03-04 17:40:30 +01:00
Bruno BELANYI 04761da664 home: vim: add 'dump' utility function 2022-03-04 17:40:30 +01:00
Bruno BELANYI 14d9837b07 home: vim: remove 'fastfold'
I don't think I need it anymore, neovim improves the native performance
well enough.
2022-03-04 17:40:30 +01:00
Bruno BELANYI adedb42a99 home: vim: add mappings for LSP functionality 2022-03-04 17:40:30 +01:00
Bruno BELANYI 38c140ee86 home: vim: don't use 'nixpkgs-fmt' with 'rnix' 2022-03-04 17:40:30 +01:00
Bruno BELANYI d36f01d937 home: vim: add 'rnix' LSP configuration 2022-03-04 17:40:30 +01:00
Bruno BELANYI 62f93a852a home: vim: add 'clang-tools' to vim package
It includes both `clangd` and `clang-format`, even though I'm mostly
looking for the later.
2022-03-04 17:40:30 +01:00
Bruno BELANYI 080d08bb13 home: vim: add linters & formatters to vim package
I use them so often, I basically always want them available.
2022-03-04 17:40:30 +01:00
Bruno BELANYI 6da1c47472 home: vim: add 'shellcheck' code actions 2022-03-04 17:40:30 +01:00
Bruno BELANYI 9c023b78a3 home: vim: rename 'git'-related settings file
Now that it contains more settings than just 'gitsigns'.
2022-03-04 17:40:30 +01:00
Bruno BELANYI 3d6580f52b home: vim: centralise 'git'-related mappings 2022-03-04 17:40:30 +01:00
Bruno BELANYI f34f2fc706 home: vim: configure 'gitsigns'
And remove some unused mappings, or adapt them to 'gitsigns'.
2022-03-04 17:40:30 +01:00
Bruno BELANYI 95df872916 home: vim: add 'gitsigns-nvim' 2022-03-04 17:40:30 +01:00
Bruno BELANYI 3e86aa5ef4 home: bat: use 'gruvbox-dark' theme
To match my `vim` configuration.
2022-03-04 17:40:30 +01:00
Bruno BELANYI f2f2b2a98a home: vim: prefer 'clangd' to 'clang-format'
Only use `clang-format` if `clangd` is not available, as its formatting
is otherwise built into the LSP server.
2022-03-04 17:40:30 +01:00
Bruno BELANYI 842489a986 home: vim: use 'unimpaired' mappings for quickfix 2022-03-04 17:40:30 +01:00
Bruno BELANYI 4cecb8b987 home: zsh: add 'zsh-completions' when enabled
Notably useful for `git-revise`.
2022-03-04 17:40:30 +01:00
Bruno BELANYI bc56292544 home: zsh: refactor 'mkIf' block 2022-03-04 17:40:30 +01:00
Bruno BELANYI c259fe87a0 home: zsh: use packaged 'fast-syntax-highlighting' 2022-03-04 17:40:30 +01:00
Bruno BELANYI 508b30eadd home: vim: show LSP progress in status line 2022-03-04 17:40:30 +01:00
Bruno BELANYI 605da54f24 home: vim: switch to 'lualine' 2022-03-04 17:40:30 +01:00
Bruno BELANYI 213d698d56 home: vim: add function to list LSP client names 2022-03-04 17:40:30 +01:00
Bruno BELANYI c5fff38942 home: vim: remove unused 'gruvbox' configuration 2022-03-04 17:40:30 +01:00
Bruno BELANYI e3b0f9d38f home: vim: move diagnostics config to 'on_attach' 2022-03-04 17:40:30 +01:00
Bruno BELANYI af56bc76cf home: vim: add 'clangd' LSP configuration 2022-03-04 17:40:30 +01:00
Bruno BELANYI 7a9760b0cd home: vim: add 'rust-analyzer' LSP configuration 2022-03-04 17:40:30 +01:00
Bruno BELANYI e8ffddedef home: vim: add basic LSP configuration
Trying it out with `pyright` for now.
2022-03-04 17:40:30 +01:00
Bruno BELANYI 44dae3a940 home: vim: move LSP-related 'on_attach' to 'utils'
As it will be shared between `null-ls` and `lspconfig`, it makes sense
to put it there.
2022-03-04 14:54:14 +01:00
Bruno BELANYI b79cee6eee home: vim: add diagnostic navigation mappings 2022-03-04 14:51:44 +01:00
Bruno BELANYI 56156e1fe4 home: vim: do not use 'ftplugin' for 'null-ls'
Unfortunately, this registers the sources many times...

I fear that I will have to settle for a centralised configuration for
LSP-related options.
2022-03-04 14:14:30 +01:00
Bruno BELANYI f551c4fc30 home: vim: only use 'null-ls' sources if available
This avoids the big red warning on each file that tries to use those
sources...
2022-03-03 18:15:28 +01:00
Bruno BELANYI f854c49c29 home: vim: add 'ambroisie.utils' lua module 2022-03-03 18:15:28 +01:00
Bruno BELANYI ae7c2d921b home: vim: add statement objects/moves
And document it.
2022-03-03 18:15:28 +01:00
Bruno BELANYI a96fb22d4d home: vim: document 'tree-sitter' moves 2022-03-03 18:15:28 +01:00
Bruno BELANYI bd5a15ebe7 home: vim: add 'tree-sitter' moves 2022-03-03 18:15:28 +01:00
Bruno BELANYI d26b9f2537 home: vim: document 'treesitter-textobjects' maps
By using 'which-key'.
2022-03-03 18:15:28 +01:00
Bruno BELANYI b7b3387df7 home: vim: add 'treesitter-textobjects' 2022-03-03 18:15:28 +01:00
Bruno BELANYI be84a4a6fa home: vim: remove mapping to run 'make' 2022-03-03 18:15:28 +01:00
Bruno BELANYI bbc47b6683 home: vim: document 'commentary' mappings
By using 'which-key'.
2022-03-03 18:15:28 +01:00
Bruno BELANYI 416a4ca0d6 home: vim: document 'unimpaired' mappings
By using 'which-key'.
2022-03-03 18:15:28 +01:00
Bruno BELANYI 19889f4cbf home: vim: use 'which-key' 2022-03-03 18:15:28 +01:00
Bruno BELANYI fa836d7df9 home: vim: add 'which-key-nvim' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 8b985cda84 home: vim: move leader mappings to 'init.vim' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 0478efa817 home: vim: remove unused mappings
The beancount mappings are absolutely unused.

The `Y` mapping is built in NeoVim nowadays.
2022-03-02 12:30:53 +01:00
Bruno BELANYI 87f255d265 home: vim: remove unimpaired mappings
I do not use `azerty` anymore, no need for those.
2022-03-02 12:30:53 +01:00
Bruno BELANYI b9e5273672 home: vim: remove 'lsp_lines'
I like the hovering behaviour better, it's less "in your face".

I might revisit the idea in the future, as a toggled mapping.
2022-03-02 12:30:53 +01:00
Bruno BELANYI dd3bfc74fa home: vim: show diagnostics on hover
Ideally, I want the following features:
* diagnostic icons in the sign column always,
* virtual text on the current line only
* switch to hover window and/or lsp_lines display through a mapping
2022-03-02 12:30:53 +01:00
Bruno BELANYI 5dd9d1c6d0 home: vim: configure short 'CursorHold' timeout 2022-03-02 12:30:53 +01:00
Bruno BELANYI d87fd7b9e1 home: vim: configure diagnostics further
This is not only 'lsp_lines' configuration anymore, but the whole
display of diagnostics.
2022-03-02 12:30:53 +01:00
Bruno BELANYI 01d7ead121 home: vim: add 'nvim-treesitter'
IMHO, this is *very* colorful, I might not end up using the highlighting
after all.

Let's see if I get used to it after a little while.
2022-03-02 12:30:53 +01:00
Bruno BELANYI e701dd06ea home: vim: make python formatting faster 2022-03-02 12:30:53 +01:00
Bruno BELANYI faa8ae6d1e home: vim: add 'lsp_lines'
I dislike the diagnostics *next* to affected lines.

This looks neater, though the best look would be a simple hover window
or status line message instead, like ALE used to do.

It might grow on me however.
2022-03-02 12:30:53 +01:00
Bruno BELANYI 729f60c471 home: vim: configure 'null-ls' for 'nix' 2022-03-02 12:30:53 +01:00
Bruno BELANYI d7a9783ceb home: vim: keep space after shell redirections 2022-03-02 12:30:53 +01:00
Bruno BELANYI f54fbcf793 home: vim: show error codes from 'shellcheck' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 4b92a3fda9 home: vim: configure 'null-ls' for 'python' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 5947ec4217 home: vim: configure 'null-ls' for 'cpp' 2022-03-02 12:30:53 +01:00
Bruno BELANYI bb512cf838 home: vim: configure 'null-ls' for 'c' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 3aa859861e home: vim: add formatting on save with 'null-ls' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 60b87c90fc home: vim: configure 'null-ls' for 'haskell' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 5f06b43ad4 home: vim: configure 'null-ls' for 'zsh' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 58470804d6 home: vim: configure 'null-ls' for 'sh' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 58bf5b6b1c home: vim: configure 'null-ls' for 'bash' 2022-03-02 12:30:53 +01:00
Bruno BELANYI 367dc1e5a5 home: vim: add 'null-ls' 2022-03-02 12:30:53 +01:00
Bruno BELANYI d9a2c12d3f home: vim: configure 'lightline-lsp'
This pretty much replace 'lightline-ale' for me now.

At least it will, once I have configured some LSP clients.
2022-03-02 12:30:53 +01:00
Bruno BELANYI f73f59b06c home: vim: add 'lightline-lsp' 2022-03-02 12:30:53 +01:00
Bruno BELANYI cb389b71b1 home: vim: remove 'quickfixed' functionality
I never use it anymore...
2022-03-02 12:13:13 +01:00
Bruno BELANYI 4382904060 home: vim: remove 'ALE' configuration
First step to modernising my configuration to use the native LSP client
instead.
2022-03-02 12:13:13 +01:00
Bruno BELANYI 5ce5057d0f flake: bump inputs
And do not use 'pipewire-media-session' which is deprecated.
2022-03-02 12:13:13 +01:00
Bruno BELANYI d2e410de56 home: vim: fix icon for read-only files 2022-02-23 21:06:12 +01:00
Bruno BELANYI 1819c7077d flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-21 18:53:56 +01:00
Bruno BELANYI 44ed078606 home: wm: i3: only boost volume on 'Shift' mapping
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-18 12:22:51 +01:00
Bruno BELANYI 305b0b985c pkgs: change-audio: 0.2.0 -> 0.3.0
Only boost audio beyond 100% if specifically asked for.
2022-02-18 12:22:51 +01:00
Bruno BELANYI 27448ac60a home: tmux: fix yanking configuration
All checks were successful
continuous-integration/drone/push Build is passing
Use `tmux-yank` when a GUI is enabled, otherwise use the internal tmux
buffer.

In both cases, stay in copy mode after yanking.
2022-02-08 17:25:44 +01:00
Bruno BELANYI f73edd9f8d modules: system: nix: use structural 'settings'
All checks were successful
continuous-integration/drone/push Build is passing
Instead of a stringly-typed `extraOptions`.
2022-02-08 14:32:00 +01:00
Bruno BELANYI e57ebf4317 home: firefox: tridactyl: fix HN comment folding
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-07 17:00:18 +01:00
Bruno BELANYI e8adbb5b20 home: firefox: tridactyl: fix DDG mapping
All checks were successful
continuous-integration/drone/push Build is passing
Taken straight from upstream's sample configuration.
2022-02-07 15:51:56 +01:00
Bruno BELANYI 6d1d0c9488 home: packages: add 'mosh'
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-07 15:00:52 +01:00
Bruno BELANYI 61cd9cb1a2 flake: bump inputs 2022-02-07 14:49:06 +01:00
Bruno BELANYI d6acc175de home: wm: i3bar: show volume when muted 2022-02-03 11:40:24 +01:00
Bruno BELANYI 9dd3dceb83 home: ssh: add 'work' host
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-25 15:53:01 +01:00
Bruno BELANYI 633a422532 home: firefox: remove 'i-dont-care-about-cookies'
Should be superseded by Consent-O-Matic now.
2022-01-25 15:53:01 +01:00
Bruno BELANYI b082057170 home: firefox: add 'consent-o-matic' 2022-01-25 15:53:01 +01:00
Bruno BELANYI 50c927fea3 flake: bump inputs
Also change a removed package alias' name.
2022-01-25 15:53:01 +01:00
Bruno BELANYI 42cb742976 modules: system: packages: remove some packages
All checks were successful
continuous-integration/drone/push Build is passing
They either belong in a nix shell or are taken care of by other
configurations.
2022-01-14 15:06:55 +01:00
Bruno BELANYI 5558642d32 modules: services: nginx: use 'acme.default.email'
All checks were successful
continuous-integration/drone/push Build is passing
The option `security.acme.email` has been deprecated.
2022-01-14 13:30:22 +01:00
Bruno BELANYI a66441d496 pkgs: add psst 2022-01-14 13:27:17 +01:00
Bruno BELANYI 702bfafe73 home: firefox: trydactyl: ignore prime video 2022-01-14 13:24:09 +01:00
Bruno BELANYI f4b860d915 machines: porthos: services: disable nzbhydra
Same deal as jackett: prowlarr has been working perfectly adequately for
a while now.
2022-01-14 13:24:09 +01:00
Bruno BELANYI b565518e2d machines: porthos: services: disable jackett
Prowlarr has been humming along just fine, and works even better than
jackett.
2022-01-14 13:24:09 +01:00
Bruno BELANYI 15a093ff61 modules: system: add podman 2022-01-14 13:24:09 +01:00
Bruno BELANYI 06e7134ae0 machines: aramis: home: enable discord
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-09 22:19:28 +01:00
Bruno BELANYI d2db3e52c2 home: add discord 2022-01-09 22:19:07 +01:00
Bruno BELANYI 9c009b40eb home: wm: change default screen-lock timeout
5 minutes is too short.
2022-01-07 08:55:58 +01:00
Bruno BELANYI dc8d4c2802 flake: bump inputs 2022-01-07 08:55:58 +01:00
Bruno BELANYI afc78bac2a machines: aramis: home: add teams package
Unfortunately, it is the preferred communication method at $WORK.
2022-01-07 08:55:58 +01:00
Bruno BELANYI 3a313812b8 modules: system: nix: add inputs to NIX_PATH 2022-01-07 08:55:58 +01:00
Bruno BELANYI 876dacab85 home: vim: cut back on fzf mappings
I only ever use the buffer and files regularly.
2021-12-22 23:34:46 +01:00
Bruno BELANYI d71a99083c modules: services: nextcloud: upgrade version
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-07 19:11:32 +01:00
Bruno BELANYI 5f3d9b3a22 flake: bump inputs
And use renamed option for agenix identities.
2021-12-07 19:11:32 +01:00
Bruno BELANYI 0becdd4b99 home: git: do not change metadata color
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-06 21:24:31 +01:00
Bruno BELANYI 555c474b88 flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
And make my configuration build after the removed option from
`programs.direnv` in home-manager.
2021-11-30 15:41:14 +01:00
Bruno BELANYI 0bf893c8a0 home: restart services automatically (again)
All checks were successful
continuous-integration/drone/push Build is passing
I think my issue was *not* related to this, so I might as well keep
using it since it does seem useful in the long run.

This reverts commit a94f349dde.
2021-11-30 15:41:14 +01:00
Bruno BELANYI 925b872305 home: git: switch to 'delta'
All checks were successful
continuous-integration/drone/push Build is passing
Now that my issue with it has been resolved [1], let's switch to the
more mature tool.

This also solves a small issue that I had with `diff-highlight` which is
that non-highlighted text should not be boldened.

[1]: https://github.com/dandavison/delta/issues/544
2021-11-29 17:50:07 +01:00
Bruno BELANYI 2b5fedadd2 home: git: use diff-highlight in interactive diffs
Now even `git log -p` and `git add -p` can use the more readable diffs.
2021-11-29 13:13:48 +01:00
Bruno BELANYI c7c38865e9 modules: system: nix: don't change daemon niceness
This option doesn't really work the way it should anyway [1].

This reverts commit cbf6ea9ac9.

[1]: https://github.com/NixOS/nixpkgs/pull/138741
2021-11-23 18:53:11 +01:00
Bruno BELANYI 5150bad300 flake: agenix has renamed its branch to 'main' 2021-11-23 17:08:46 +01:00
Bruno BELANYI 6f643052e1 home: wm: i3: show notification on toggling mute
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-12 10:21:25 +01:00
Bruno BELANYI 119504d0b5 pkgs: change-audio: 0.1.2 -> 0.2.0
Allow muting microphone and speakers, with refactor to make it DRY.
2021-11-12 10:17:42 +01:00
Bruno BELANYI 2d7f01f035 pkgs: change-audio: 0.1.1 -> 0.1.2
Show if volume is currently muted.
2021-11-12 09:52:22 +01:00
Bruno BELANYI 6ebfa1a8cc flake: enable shellcheck pre-commit hook
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-12 09:42:39 +01:00
Bruno BELANYI 7d31aa93db pkgs: change-audio: 0.1.0 -> 0.1.1
Fix issue with not showing notification at 0% volume.
2021-11-12 09:40:37 +01:00
Bruno BELANYI cef430ed39 home: tmux: remove tmux service
All checks were successful
continuous-integration/drone/push Build is passing
Turns out it is more trouble than it is worth trying to make this work:
with the secure socket problem etc...

The first start up is fast enough for me in the end.

This reverts commit cc21d84808.
2021-11-09 15:32:59 +01:00
Bruno BELANYI 4c5b556bb8 flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-09 15:16:20 +01:00
Bruno BELANYI 10d35f73c8 modules: services: nginx-sso: always rewrite conf
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-06 15:43:00 +01:00
Bruno BELANYI 4491eaea49 modules: services: paperless: backup 'dataDir' 2021-11-05 17:03:52 +01:00
Bruno BELANYI 5f47ec564c modules: services: calibre-web: use 'dataDir' 2021-11-05 17:03:52 +01:00
Bruno BELANYI 6633405e42 modules: services: pirate: sort 'ports' values 2021-11-05 17:03:52 +01:00
Bruno BELANYI 21f0199791 machines: porthos: services: use 'lohr.sshKeyFile'
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-05 16:59:11 +01:00
Bruno BELANYI 7c1f379d82 modules: services: lohr: declarative ssh key 2021-11-05 16:59:11 +01:00
Bruno BELANYI e91ebb24f0 modules: secrets: lohr: add 'ssh-key' 2021-11-05 15:31:59 +01:00
Bruno BELANYI a602cf4143 profiles: wm: remove unused argument
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-05 14:58:58 +01:00
Bruno BELANYI e428895ba7 profiles: gtk: remove unused argument 2021-11-05 14:58:58 +01:00
Bruno BELANYI e7ff83b1bb pkgs: dragger: remove unused argument 2021-11-05 14:58:58 +01:00
Bruno BELANYI 79265008d2 modules: services: nginx: remove unused argument 2021-11-05 14:58:58 +01:00
Bruno BELANYI 74a5c50fbe modules: services: drone: remove unused arguments 2021-11-05 14:58:58 +01:00
Bruno BELANYI 680eeffd3a machines: porthos: users: remove unused let block 2021-11-05 14:58:58 +01:00
Bruno BELANYI 9b4a92895f home: wm: dunst: replace deprecated 'geometry'
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-04 16:35:06 +01:00
Bruno BELANYI 2af0fe542f home: wm: i3: use packaged scripts
Instead of inlining them in the configuration, use an actual package for
those.
2021-11-04 16:35:06 +01:00
Bruno BELANYI fe455ffe9f pkgs: add change-audio 2021-11-04 16:35:06 +01:00
Bruno BELANYI f6381b14b0 pkgs: add change-backlight 2021-11-04 16:35:06 +01:00
Bruno BELANYI 7dc177cf44 home: wm: i3: avoid loading icon on notifications
Because my script are obviously not startup id aware, hovering on the
notification leads to having a loading cursor.
2021-11-03 17:57:33 +01:00
Bruno BELANYI da4acebdde home: wm: i3: notify when changing audio volume 2021-11-03 17:50:28 +01:00
Bruno BELANYI 3f7fb26b8f home: wm: i3: extract 'notify-send' variable
It is used in multiple scripts, might as well centralise it.
2021-11-03 17:49:47 +01:00
Bruno BELANYI ddeeb974a4 modules: services: backup: remove deprecated name
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-03 17:16:40 +01:00
Bruno BELANYI ea6c3727be flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-03 14:10:18 +01:00
Bruno BELANYI 40ec169d6e flake: remove gnupg from devShell
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-03 14:10:18 +01:00
Bruno BELANYI a94f349dde home: do not restart services automatically
Turns out it is *not* ideal when modifying my WM configuration in any
way... Having i3 restart due to changing a keybinding is not great.

This reverts commit 6bec62073b.
2021-11-03 14:10:18 +01:00
Bruno BELANYI b83f28f2ba home: wm: i3: use 'i3status-rust.package' value 2021-11-03 14:10:18 +01:00
Bruno BELANYI 148d6609ec flake: bump inputs 2021-11-03 14:10:18 +01:00
Bruno BELANYI 14e4e681aa home: wm: screen-lock: rename changed option 2021-10-22 13:15:22 +02:00
Bruno BELANYI 3058636c87 modules: home: forward inputs to home-manager
This will be useful if and when I end up adding inputs with home-manager
modules defined.
2021-10-22 13:06:53 +02:00
Bruno BELANYI 6bec62073b home: start services when switching
All checks were successful
continuous-integration/drone/push Build is passing
As I use home-manager with its NixOS module, I do not see the message
suggesting to start the services otherwise.
2021-10-21 16:42:15 +02:00
Bruno BELANYI 5241bce29b project: readme: mention manual prowlarr step
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-18 19:48:50 +02:00
Bruno BELANYI 4f11cf3a9a machines: porthos: services: enable prowlarr 2021-10-18 19:48:50 +02:00
Bruno BELANYI 927dd9e02a modules: services: indexers: add prowlarr 2021-10-18 19:48:50 +02:00
Bruno BELANYI 9582f8403e flake: bump inputs 2021-10-18 19:48:50 +02:00
Bruno BELANYI df1bc0d0d5 modules: services: indexers: refactor
This is cleaner and more correct.
2021-10-18 19:48:50 +02:00
Bruno BELANYI 760e24a356 modules: services: indexers: fix typo 2021-10-18 19:48:50 +02:00
Bruno BELANYI c280f0cae8 pkgs: unified-hosts-lists: 3.8.5 -> 3.9.11
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-18 19:28:46 +02:00
Bruno BELANYI cbf6ea9ac9 modules: system: nix: change nix build niceness
19 is the lowest priority.
2021-10-18 18:49:03 +02:00
Bruno BELANYI 8edef9d528 home: wm: i3bar: add bluetooth blocks
All checks were successful
continuous-integration/drone/push Build is passing
I have decided that the potential security and privacy risk of exposing
my MAC addresses is fine by me.

My earphones and headphones do not seem to expose their battery level,
would need more investigation.
2021-10-18 15:51:15 +02:00
Bruno BELANYI 708d60bcc6 home: git: rewrite gitlab URLs to use ssh
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-18 14:45:23 +02:00
Bruno BELANYI 5e438f9e77 home: git: rewrite github URLs to use ssh 2021-10-18 14:44:19 +02:00
Bruno BELANYI 9e33f4ca82 home: git: rewrite personal gitea URLs to use ssh 2021-10-18 14:44:08 +02:00
Bruno BELANYI c55708ab54 home: wm: i3bar: use dynamic width on music block
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-16 18:07:07 +02:00
Bruno BELANYI 6c25380d5d machines: aramis: networking: remove 'domain'
All checks were successful
continuous-integration/drone/push Build is passing
Now that services handle subdomains through my Nginx abstraction, we can
remove this.
2021-10-16 14:56:15 +02:00
Bruno BELANYI 537fa5c909 home: wm: i3: add 'rofi-bluetooth' binding
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-15 17:19:12 +02:00
Bruno BELANYI 8a8256e555 home: tmux: add binding for block selection 2021-10-15 17:13:02 +02:00
Bruno BELANYI 9117df1e72 home: wm: i3: don't add 'dragger' through profile 2021-10-15 17:12:24 +02:00
Bruno BELANYI 296833651a pkgs: add rofi-bluetooth 2021-10-15 17:09:03 +02:00
Bruno BELANYI 158d39bb6e pkgs: sort packages alphabetically 2021-10-15 17:01:40 +02:00
Bruno BELANYI b1cff1b8a3 home: git: add git-related packages when enabled
All checks were successful
continuous-integration/drone/push Build is passing
Instead of adding them in the general packages section.
2021-10-13 15:36:28 +02:00
Bruno BELANYI e475855e18 home: git: inline EPITA configuration include 2021-10-13 15:36:28 +02:00
Bruno BELANYI ef07c9ff43 modules: services: nginx: use 'mkMailAccount' 2021-10-13 15:36:28 +02:00
Bruno BELANYI 111ee136c8 home: git: use 'mkMailAccount' 2021-10-13 15:36:28 +02:00
Bruno BELANYI 8d8904ccef home: mail: accounts: use 'mkMailAccount' 2021-10-12 17:55:37 +02:00
Bruno BELANYI 97fa58c220 lib: strings: add 'mkMailAddress' 2021-10-12 17:53:23 +02:00
Bruno BELANYI ce5a8a20b9 lib: add strings 2021-10-12 17:53:10 +02:00
Bruno BELANYI b298607ea7 home: git: add 'git' alias
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-12 16:33:33 +02:00
Bruno BELANYI d918bf279d modules: services: wireguard: add 'milady'
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-10 17:16:29 +02:00
Bruno BELANYI 6f3bee895c modules: secrets: wireguard: add 'milady' 2021-10-10 17:16:29 +02:00
Bruno BELANYI 069987f47e pkgs: dragger: change platforms to linux
All checks were successful
continuous-integration/drone/push Build is passing
I haven't tested it on darwin, and it just so happens that some
dependency is broken on that system (breaking `nix flake check`)...

Will revisit this later in case I ever happen to use a darwin system.
2021-10-08 19:39:43 +02:00
Bruno BELANYI 971b6e9b65 profiles: wm: add 'dragger' when a WM is set up 2021-10-08 15:06:33 +02:00
Bruno BELANYI 8c103a2261 home: gammastep: fix typo 2021-10-08 15:03:45 +02:00
Bruno BELANYI 76f33fbd57 flake: use 'recurseIntoAttrs' in 'pkgs' overlay 2021-10-08 15:00:46 +02:00
Bruno BELANYI 7d787a2770 pkgs: add dragger
Some checks failed
continuous-integration/drone/push Build is failing
2021-10-08 14:59:03 +02:00
Bruno BELANYI 323e99bbb0 home: xdg: make gdb store history in XDG_DATA_HOME
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-08 12:46:00 +02:00
Bruno BELANYI 8569a8eb55 home: firefox: add 'reddit-comment-collapser' 2021-10-06 09:48:20 +02:00
Bruno BELANYI 6d393fdef2 home: firefox: re-organise module 2021-10-06 09:48:20 +02:00
Bruno BELANYI a85922b3b3 home: firefox: add 'refined-github' 2021-10-06 09:48:20 +02:00
Bruno BELANYI d1cd5bfa32 overlays: add sabnzbd-fix-missing-dependencies
All checks were successful
continuous-integration/drone/push Build is passing
While waiting for my PR to fix this [1].

[1]: https://github.com/NixOS/nixpkgs/pull/140478
2021-10-04 15:01:39 +02:00
Bruno BELANYI d64a867afc flake: bump inputs 2021-10-04 14:45:41 +02:00
Bruno BELANYI cc21d84808 home: tmux: add tmux service
All checks were successful
continuous-integration/drone/push Build is passing
The service definition is pretty awful, but it deals with the secure
socket correctly...

This avoids having a small lapse when starting the very first shell of a
session, which must first launch the server.
2021-09-30 16:58:44 +02:00
Bruno BELANYI 84cdc30037 home: tmux: make history longer
We got tons of RAM!
2021-09-30 16:47:52 +02:00
Bruno BELANYI 07cf0fa4da home: wm: i3: launch tmux when starting terminal
All checks were successful
continuous-integration/drone/push Build is passing
Similarly to the `zsh` snippet, launch tmux unless I explicitly do not
want it.

The reason I also add it in `i3` is to make the launch happen sooner,
and to avoid doing double work on some shell startup shenanigans if I
can.
2021-09-30 15:38:43 +02:00
Bruno BELANYI 24de1890fc home: zsh: launch tmux when starting a shell 2021-09-30 15:34:16 +02:00
Bruno BELANYI 4055ef17f0 home: vim: switch back to gruvbox theme
All checks were successful
continuous-integration/drone/push Build is passing
Onedark is too annoying to deal with, and I still like gruvbox's colors
best.
2021-09-29 18:50:33 +02:00
Bruno BELANYI 7ce69233c1 flake: bump inputs 2021-09-29 17:37:15 +02:00
Bruno BELANYI 9f86615e77 profiles: gtk: new best practices for dconf
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-27 17:07:47 +02:00
Bruno BELANYI e805496588 modules: secrets: fix permission for grafana
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-26 23:09:33 +02:00
Bruno BELANYI 3201445c08 modules: secrets: fix permission of 'matrix/mail' 2021-09-26 23:09:33 +02:00
Bruno BELANYI 30eaefc1d1 modules: secrets: add 'owner' logic 2021-09-26 23:09:33 +02:00
Bruno BELANYI 5f41bb1647 modules: secrets: remove 'with lib;' 2021-09-26 23:09:33 +02:00
Bruno BELANYI fec4956063 secrets: move into 'modules' 2021-09-26 23:09:33 +02:00
Bruno BELANYI a62c0ad126 project: bootstrap: retrieve agenix key 2021-09-26 23:09:33 +02:00
Bruno BELANYI 2cc13dddb5 ci: use 'nix flake check'
Now that I am using agenix, secrets stays encrypted at rest.
2021-09-26 23:09:33 +02:00
Bruno BELANYI de92358bc0 flake: remove 'git-crypt' 2021-09-26 23:09:33 +02:00
Bruno BELANYI 167db81c6c secrets: remove git-crypt 2021-09-26 23:09:33 +02:00
Bruno BELANYI 738d1760c3 secrets: remove git-crypt secrets 2021-09-26 23:09:33 +02:00
Bruno BELANYI e962d4c574 modules: services: nginx: sso: use runtime secrets 2021-09-26 23:09:33 +02:00
Bruno BELANYI 1c0d671fff machines: porthos: services: switch to agenix
The prep-work should be done now, time to hit the switch.
2021-09-26 23:09:32 +02:00
Bruno BELANYI 3bf3980e45 modules: services: nginx: allow sso secret files
This is in preparation of the migration to agenix, which does not allow
access to the secrets at build time.
2021-09-26 23:09:32 +02:00
Bruno BELANYI f6faa11ff7 home: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 67090494e2 home: terminal: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 0d44b3b9f2 home: x: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 37c20529c1 home: wm: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 2449a96652 home: mail: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 8a9337710f home: firefox: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 7b75ea43ad profiles: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI fb6e2afe89 modules: services: drone: split into files
This is cleaner to read.
2021-09-26 23:09:32 +02:00
Bruno BELANYI 51067582e0 modules: services: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 78ade4c605 modules: hardware: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 5c2921e00d modules: system: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI 62a18cd3f6 modules: programs: put modules into folders 2021-09-26 23:09:32 +02:00
Bruno BELANYI c6cc64e156 modules: home: put into folder 2021-09-26 23:09:32 +02:00
Bruno BELANYI 875a3d8587 machines: porthos: users: use clear-text ssh key 2021-09-26 23:09:32 +02:00
Bruno BELANYI 409e0ef357 modules: system: users: use agenix secrets 2021-09-26 23:09:32 +02:00
Bruno BELANYI b6af754199 modules: services: wireguard: use agenix secrets 2021-09-26 23:09:32 +02:00
Bruno BELANYI ca5e5a53cd modules: services: nginx: use 'credentialsFile'
In preparation for the migration to agenix.
2021-09-26 23:09:32 +02:00
Bruno BELANYI ba10af0644 modules: services: matrix: use 'mailConfigFile'
In preparation of the migration to agenix.
2021-09-26 23:09:32 +02:00
Bruno BELANYI 0f2c20e51d modules: services: paperless: use 'secretKeyFile'
In preparation for the migration to agenix.
2021-09-26 23:09:32 +02:00
Bruno BELANYI ca218730ff modules: services: nextcloud: use 'credentialsfile'
In preparation for the migration to agenix.
2021-09-26 23:09:32 +02:00
Bruno BELANYI ac5fd7f472 modules: services: miniflux: use 'credentialsFiles'
In preparation for the migration to agenix.
2021-09-26 23:09:32 +02:00
Bruno BELANYI db37cea907 modules: services: transmission: secrets w/ file
In preparation for the migration to using agenix.
2021-09-26 23:09:31 +02:00
Bruno BELANYI 1cf93825b2 secrets: register agenix secrets automatically 2021-09-26 23:09:31 +02:00
Bruno BELANYI 8a2aad9b54 secrets: migrate to agenix
It is finally time to graduate to an actually secure, stateless
solution.
2021-09-26 23:09:31 +02:00
Bruno BELANYI 018394b61d secrets: import 'agenix' module 2021-09-25 13:31:43 +02:00
Bruno BELANYI 1e3c633c72 flake: add 'agenix' 2021-09-25 13:30:51 +02:00
Bruno BELANYI df302465c9 home: remove unused 'secrets' module 2021-09-25 13:27:01 +02:00
Bruno BELANYI 673ead7863 home: ssh: add missing 'mkIf cfg.enable'
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-24 01:21:57 +02:00
Bruno BELANYI 3d10461a6e home: remove unused arguments 2021-09-24 01:21:57 +02:00
Bruno BELANYI 75312c747b modules: remove unused arguments 2021-09-24 01:21:57 +02:00
Bruno BELANYI 68be7743ad machines: remove unused arguments 2021-09-24 01:21:57 +02:00
Bruno BELANYI 9d362655e2 pkgs: remove unused arguments 2021-09-24 01:21:57 +02:00
Bruno BELANYI 604b99a7ac lib: remove 'with self;' 2021-09-24 01:21:57 +02:00
Bruno BELANYI 8467fda721 lib: modules: refactor 'mapModules'
Introduce the recursive version of this function, then refactor to
reduce repetition.
2021-09-24 01:21:57 +02:00
Bruno BELANYI bad9b8a06b lib: modules: document 'mapModules' 2021-09-24 00:26:28 +02:00
Bruno BELANYI 2d26b36e31 modules: services: nginx: use 'recursiveMerge'
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-23 22:11:25 +02:00
Bruno BELANYI c93a9e5a98 home: wm: i3: use 'recursiveMerge' 2021-09-23 22:11:25 +02:00
Bruno BELANYI 3fa14ebe71 lib: attrs: add 'recursiveMerge' 2021-09-23 22:11:25 +02:00
Bruno BELANYI bd1a2000fe modules: system: users: use 'initialHashedPassword'
This is the better option to use in case I want to have a stateless
system.
2021-09-23 21:30:24 +02:00
Bruno BELANYI 4a0c10b897 modules: system: users: use 'ambroisie' password
Do not rely on `my.user.name` which could be changed to a value not
available in the secrets.
2021-09-23 21:28:29 +02:00
Bruno BELANYI 9f3811ea3b modules: programs: steam: respect XDG conventions
All checks were successful
continuous-integration/drone/push Build is passing
Steam wants to pollute HOME with `.steam*` files and folders, which are
useless and annoying.

We want to make sure the wrappers are preferred when installing, so use
`lib.hiPrio` to ensure they get chosen.
2021-09-15 19:23:24 +02:00
Bruno BELANYI 5c95ba1113 machines: aramis: programs: enable steam 2021-09-15 19:23:24 +02:00
Bruno BELANYI 37bb7fd625 modules: programs: add steam 2021-09-15 19:23:24 +02:00
Bruno BELANYI 45321072fc modules: add 'programs' directory 2021-09-15 16:48:10 +02:00
Bruno BELANYI ed456c999d modules: system: remove 'media'
All checks were successful
continuous-integration/drone/push Build is passing
It was not the idiomatic way to do this.
2021-09-15 16:10:06 +02:00
Bruno BELANYI ad848ef89d pkgs: make use of scoping
This is the way to make sure `callPackage` picks up my custom packages
to be used in the set.
2021-09-15 15:33:18 +02:00
Bruno BELANYI 680d0c9f37 home: gdb: add nix store to safe path
For now, the nix store path is hard-coded rather than substituted.

This is useful for pretty-printing C++ types compiled with a different
C++ library from my gdb.
2021-09-03 17:34:39 +02:00
Bruno BELANYI 9a06108603 git: remove duplicate ignore directive
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-01 14:52:38 +02:00
Bruno BELANYI c8633abf6d flake: use 'nativeBuildInputs' 2021-09-01 14:51:27 +02:00
Bruno BELANYI aceb4ef901 pkgs: unified-hosts-lists: do not set 'phases'
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-31 20:11:11 +02:00
Bruno BELANYI 5937d43993 pkgs: unbound-zones-adblock: do not set 'phases' 2021-08-31 20:11:00 +02:00
Bruno BELANYI add6326fdf pkgs: matrix-notifier: do not set 'phases' 2021-08-31 20:10:41 +02:00
Bruno BELANYI b0e4475586 pkgs: i3-get-window-criteria: do not set 'phases' 2021-08-31 20:08:22 +02:00
Bruno BELANYI 5c1dd6500a pkgs: havm: use 'nativeBuildInputs'
This is the correct one to use for a compiler like 'ghc'.
2021-08-31 19:50:44 +02:00
Bruno BELANYI 60e977611c pkgs: diff-flake: do not set 'phases' 2021-08-31 19:03:33 +02:00
Bruno BELANYI 99462199bd pkgs: comma: do not set 'phases' 2021-08-31 19:03:25 +02:00
Bruno BELANYI 4fe18ff4cd pkgs: comma: give path to source directly 2021-08-31 19:03:24 +02:00
Bruno BELANYI 02ffbcf970 pkgs: bw-pass: do not set 'phases' 2021-08-31 18:59:05 +02:00
Bruno BELANYI 878c92b67e pkgs: havm: use 'checkInputs' for test dependency 2021-08-31 18:44:17 +02:00
Bruno BELANYI 8596ce8638 home: wm: i3bar: remove redundant '%' 2021-08-31 18:31:32 +02:00
Bruno BELANYI 808058d576 modules: services: paperless: proxy websockets 2021-08-31 13:52:11 +02:00
Bruno BELANYI 8ffad5d41b machines: porthos: services: enable paperless 2021-08-31 13:52:11 +02:00
Bruno BELANYI 52706ab4c4 modules: services: paperless: add admin password
This is a fallback in case SSO stops working...
2021-08-31 13:52:11 +02:00
Bruno BELANYI 5ae7b593e4 secrets: add paperless password
To be used as a fallback.
2021-08-31 13:52:11 +02:00
Bruno BELANYI 87613a9163 modules: services: add paperless 2021-08-31 13:52:11 +02:00
Bruno BELANYI 47d19e5b3f secrets: add paperless 2021-08-31 13:52:11 +02:00
Bruno BELANYI a78091c57c flake: bump inputs 2021-08-31 13:52:10 +02:00
Bruno BELANYI 9aba0d3ce0 home: pager: remove lesspipe
I don't use it anymore.
2021-08-30 21:23:13 +02:00
Bruno BELANYI 78064bb2a1 modules: services: nginx: nginx-sso verbose logs
All checks were successful
continuous-integration/drone/push Build is passing
For some reason it still doesn't appear in the systemd log...
2021-08-30 17:38:25 +02:00
Bruno BELANYI 70af0ba99a modules: services: nginx: add SSO 2021-08-30 17:36:39 +02:00
Bruno BELANYI dc2a3610a6 modules: services: nginx: enable explicitly 2021-08-30 17:36:39 +02:00
Bruno BELANYI 894b571745 secrets: add sso 2021-08-30 17:36:39 +02:00
Bruno BELANYI 2049e7a2c5 secrets: allow lists in types 2021-08-30 15:35:00 +02:00
Bruno BELANYI 7032ddef37 modules: services: use new nginx wrapper
All checks were successful
continuous-integration/drone/push Build is passing
And when not possible, document why.

Note for the future: there is some repetition in some modules to
configure the correct value of the subdomain, which I happen to know
will line up correctly thanks to the nginx wrapper. A good way to
refactor this in the future would involve avoiding this repetition,
allowing use to query the correct domain in some way...
2021-08-26 15:54:13 +02:00
Bruno BELANYI 81e12969eb modules: services: nginx: overhaul modularity
This should be all that's needed for almost all my services.
2021-08-26 15:54:13 +02:00
Bruno BELANYI b97eff2479 lib: lists: add countValues 2021-08-26 15:54:13 +02:00
Bruno BELANYI 4f742b69f2 lib: lists: add 'mapFilter' 2021-08-26 15:54:13 +02:00
Bruno BELANYI 11fbbd62eb home: zsh: clean-up blank in history
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-25 12:51:38 +02:00
Bruno BELANYI d21087ddcd home: zsh: append to history
Otherwise the file is replaced rather than appended to.
2021-08-25 12:44:42 +02:00
Bruno BELANYI 3919a87d9e home: zsh: do not share history accross shells
It's more annoying than helpful...
2021-08-25 12:22:36 +02:00
Bruno BELANYI 3fd487bbd2 home: gdb: fix configuration path
All checks were successful
continuous-integration/drone/push Build is passing
Turns out the latest version of `gdb` does not yet look for its
configuration in `XDG_CONFIG_HOME`...
2021-08-22 15:02:57 +02:00
Bruno BELANYI 5916ae631d home: gdb: add rr 2021-08-21 01:13:14 +02:00
Bruno BELANYI 1a436fd962 home: gdb: fix auto-load safe path 2021-08-20 21:22:27 +02:00
Bruno BELANYI a48303e66d home: add gdb
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-20 20:03:51 +02:00
Bruno BELANYI 30fc01b5ae modules: services: nextcloud: exclude previews
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-19 14:27:40 +02:00
Bruno BELANYI 13684ecdc4 modules: services: backup: make it verbose 2021-08-19 14:27:40 +02:00
Bruno BELANYI fe720b2de3 machines: porthos: services: enable navidrome
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-19 12:23:06 +02:00
Bruno BELANYI ec6b31f4a6 modules: services: add navidrome 2021-08-19 12:23:06 +02:00
Bruno BELANYI 1335bbfe9d flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-19 11:49:41 +02:00
Bruno BELANYI 2cc1925346 modules: services: backup: fix exclude files
All checks were successful
continuous-integration/drone/push Build is passing
I was using the wrong option... Somehow it didn't error out.
2021-08-09 20:08:43 +02:00
Bruno BELANYI eb0c5d5895 pkgs: add drone-scp
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-08 18:03:19 +02:00
Bruno BELANYI 8c298c26f9 pkgs: unified-hosts-lists: 3.6.4 -> 3.8.5
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-07 12:29:41 +02:00
Bruno BELANYI 55a04cfac3 pkgs: bw-pass: report errors to stderr
Useful in case the script can't prompt using `rofi`.
2021-07-31 20:17:37 +02:00
Bruno BELANYI 1783c2838b modules: services: tlp: add power scaling 2021-07-31 16:56:20 +02:00
Bruno BELANYI e215f7aa1d modules: services: nextcloud: upgrade version
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-29 13:42:28 +02:00
Bruno BELANYI afb683f1cf flake: bump inputs
And update package names for grafana dashboards to avoid breaking the
config.
2021-07-29 13:42:28 +02:00
Bruno BELANYI c320387746 modules: services: postgres: upgrade version 2021-07-29 13:03:10 +02:00
Bruno BELANYI bbb1231ad3 modules: services: postgres: add migration script
The process to upgrade is:

* Make sure the version number of the script is one major version over
  the service version.

* Activate the script, rebuild configuration.

* Run `upgrade-pg-cluster` as `root`. One can give arguments like
  `--link` or `--jobs 4` to speedup the process. See documentation for
  some details.

* Change package to new version once the upgrade is finished, rebuild
  configuration.

* Optionally, `ANALYZE` the new database.
2021-07-29 13:02:49 +02:00
Bruno BELANYI 9f00d8a38e modules: services: add postgresql
Enable the service itself in other modules when needed, but pin the
package in a single place.
2021-07-29 12:43:28 +02:00
Bruno BELANYI 820b52314f modules: services: monitoring: add scrape interval
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-15 18:54:07 +02:00
Bruno BELANYI a3293277d9 flake: flatten and filter packages w/ flake-utils
All checks were successful
continuous-integration/drone/push Build is passing
Instead of my home-grown solution, use one that has been upstreamed.
2021-07-14 21:49:31 +02:00
Bruno BELANYI 2ecd417a68 machines: porthos: services: enable monitoring
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-13 19:17:33 +02:00
Bruno BELANYI 4e8045716c secrets: add monitoring password 2021-07-13 19:17:33 +02:00
Bruno BELANYI e060476f32 modules: services: add monitoring dashboard 2021-07-13 19:17:33 +02:00
Bruno BELANYI 2458ddf59d modules: services: add monitoring
This includes a dashboard to monitor system ressources, using
Prometheus.
2021-07-13 19:17:33 +02:00
Bruno BELANYI 8927b3182f flake: bump inputs 2021-07-13 19:08:54 +02:00
Bruno BELANYI f2dfeeb35b home: git: use topological order in log
It is the one that makes most sense, rather than some kind of date
order...
2021-07-13 17:50:44 +02:00
Bruno BELANYI 971b610cd5 modules: services: matrix: SSL only for server
This is a requirement anyway for homeservers, and the `forceSSL` option
tried to create a redirect for non-SSL traffic, except the `listen`
option only provided SSL endpoints anyway, so this resulted in
additional rules in the nginx config looking like this:

```nginx
server {
        server_name matrix.belanyi.fr ;
        location /.well-known/acme-challenge {
                root /var/lib/acme/acme-challenge;
                auth_basic off;
        }
        location / {
                return 301 https://$host$request_uri;
        }
}
```
2021-07-13 17:43:31 +02:00
Bruno BELANYI 21f48b5f71 pkgs: bw-pass: change password prompt
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-04 11:52:07 +02:00
Bruno BELANYI a3edf2548b overlays: transgui: correctly use previous patches 2021-07-04 11:52:07 +02:00
Bruno BELANYI ea7b064546 home: direnv: update to new option name
All checks were successful
continuous-integration/drone/push Build is passing
And enable the flakes option.

I don't actually use this on my own projects, but it could be useful for
other projects that I contribute to.
2021-06-30 20:08:07 +02:00
Bruno BELANYI ff8e64d601 home: mail: add himalaya
This mail client is very KISS. I like it.
2021-06-30 20:08:06 +02:00
Bruno BELANYI 791109c3c1 flake: bump inputs 2021-06-30 20:07:55 +02:00
Bruno BELANYI 6eb3942270 home: firefox: add sponsorblock
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-27 19:51:04 +02:00
Bruno BELANYI 2232062fd9 home: secrets: use more specific type
I will amend it if I need more types, but for now this is fine.
2021-06-27 19:48:42 +02:00
Bruno BELANYI d6e9f9786d secrets: use more specific type
I will amend it if I need more types, but for now this is fine.
2021-06-27 19:48:26 +02:00
Bruno BELANYI 5abe4e929e modules: hardware: sound: refactor options
All checks were successful
continuous-integration/drone/push Build is passing
Do not enable ALSA when using pipewire. Ensure that both pulseaudio and
pipewire are not configured at the same time.
2021-06-27 01:59:07 +02:00
Bruno BELANYI 57717d70ef home: wm: i3: also toggle xss-lock 2021-06-26 18:38:11 +02:00
Bruno BELANYI 7a382368e8 modules: move home configuration from flake 2021-06-25 20:46:36 +02:00
Bruno BELANYI 0f17123d09 modules: change username configuration option
It makes more sense to have a `my.user` option.
2021-06-25 20:45:36 +02:00
Bruno BELANYI c6d21493ef home: zsh: explicitly set history save size
All checks were successful
continuous-integration/drone/push Build is passing
Turns out the `history.save` limit is for what is *loaded into memory*,
not what is written to disk.
2021-06-23 23:14:05 +02:00
Bruno BELANYI 5cebb9b54b home: zsh: explicitly opt out of extended history 2021-06-23 23:13:39 +02:00
Bruno BELANYI 92c2748747 home: wm: dunst: use rofi as 'dmenu' when enabled 2021-06-23 23:08:23 +02:00
Bruno BELANYI 4cae294cf5 home: wm: i3: enable rofi bindings when applicable 2021-06-23 23:06:15 +02:00
Bruno BELANYI 23c6093c36 home: wm: dunst: add line wrapping
All checks were successful
continuous-integration/drone/push Build is passing
Once again, trying to make them actually readable.
2021-06-22 19:48:03 +02:00
Bruno BELANYI 3fdcfb5b5f home: wm: dunst: add max icon size
All checks were successful
continuous-integration/drone/push Build is passing
Otherwise I end up with icons that are way too big...
2021-06-22 19:39:35 +02:00
Bruno BELANYI c9418cc4d3 pkgs: matrix-notifier: 0.1.2 -> 0.2.0
All checks were successful
continuous-integration/drone/push Build is passing
`pandoc` is now a dependency.
2021-06-16 21:19:09 +02:00
Bruno BELANYI cd02cbff45 pkgs: use 'lib' as first input
All checks were successful
continuous-integration/drone/push Build is passing
This is the idiomatic style in nixpkgs.
2021-06-16 20:13:25 +02:00
Bruno BELANYI daa69a54fa modules: services: indexers: limit Jackett memory
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-15 21:25:56 +02:00
Bruno BELANYI 212dd299e2 pkgs: matrix-notifier: 0.1.0 -> 0.1.2
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-15 18:42:13 +02:00
Bruno BELANYI cff3811cad home: wm: screen-lock: use actual assertion
All checks were successful
continuous-integration/drone/push Build is passing
Instead of hijacking the type verification, use an assertion.
2021-06-15 17:45:17 +02:00
Bruno BELANYI 8f266245ee modules: system: add boot
And enable mounting `/tmp` as tmpfs by default.
2021-06-14 16:41:28 +02:00
Bruno BELANYI b8be3d80a8 ci: migrate to 'exec' runner
All checks were successful
continuous-integration/drone/push Build is passing
Now that I have written a script to do the Matrix notification, I can do
that.
2021-06-13 18:38:09 +02:00
Bruno BELANYI b04c1b09ea pkgs: add matrix-notifier 2021-06-13 18:37:11 +02:00
Bruno BELANYI 3a471433ed home: secrets: clean-up 'default.nix'
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-12 20:35:28 +02:00
Bruno BELANYI f8325cc9c7 secrets: clean-up 'default.nix' 2021-06-12 20:35:06 +02:00
Bruno BELANYI cd1173d2f6 flake: filter 'packages' on system 2021-06-12 19:56:17 +02:00
Bruno BELANYI e319eaf09f pkgs: bw-pass: fix 'meta.platforms'
This makes use of 'keyutils' which only works on Linux.
2021-06-12 19:30:25 +02:00
Bruno BELANYI e6ba569b36 modules: system: documentation: include POSIX man
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-12 13:23:09 +02:00
Bruno BELANYI ee21de5b94 modules: services: matrix: add mail configuration
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-09 19:14:09 +02:00
Bruno BELANYI 6614b47546 secrets: matrix: add mail configuration 2021-06-09 19:14:09 +02:00
Bruno BELANYI 06c53620f8 modules: services: matrix: enable spaces 2021-06-09 18:33:54 +02:00
Bruno BELANYI d43045c6d6 modules: services: matrix: add SMS verification 2021-06-09 18:32:59 +02:00
Bruno BELANYI 6113ad154d home: firefox: tridactyl: add tabduplicate mapping
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2021-06-07 17:56:46 +02:00
Bruno BELANYI e8982b8bc9 machines: aramis: profiles: enable devices 2021-06-07 17:56:46 +02:00
Bruno BELANYI 7684489c9a profiles: add devices 2021-06-07 17:56:46 +02:00
Bruno BELANYI 1994ef2b1b modules: hardware: add mx-ergo
This adds the ability to scroll using the ball, which is way better.
2021-06-07 17:56:46 +02:00
Bruno BELANYI a434016252 home: wm: i3: remove 'udiskie' and 'flameshot'
It makes more sense to activate those at the `profile` level.
2021-06-03 17:34:16 +02:00
Bruno BELANYI 1794eefd30 profiles: wm: enable 'i3' helpers
`flameshot` and `udiskie` provide some functionnality that would usually
be found in an actual DE.

It makes more sense to activate them here instead of in the home
configuration, so I will remove it in the next commit.
2021-06-03 17:33:13 +02:00
Bruno BELANYI 29437d3e3f home: wm: i3: move script generation out-of-line
This makes for a cleaner configuration file.
2021-06-03 17:18:33 +02:00
Bruno BELANYI a827a34501 git: ignore generated pre-commit configuration
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-31 23:06:37 +02:00
Bruno BELANYI 610b0f2f4b nix: evaluate shell hooks
This activates the pre-commit-hook configuration.
2021-05-31 23:06:20 +02:00
Bruno BELANYI 59cb038045 flake: add pre-commit-hooks
Instead of havin the tool manage versions, use a pinned version.
2021-05-31 23:04:08 +02:00
Bruno BELANYI 15db81eb3b flake: change format 2021-05-31 23:02:32 +02:00
Bruno BELANYI 24efa3edca machines: aramis: hardware: enable trackpoint 2021-05-31 20:30:36 +02:00
Bruno BELANYI 2fe4f1faad modules: home: use 'username' config value 2021-05-30 01:31:05 +02:00
Bruno BELANYI 4f1f687eea flake: use 'username' config value 2021-05-30 01:20:14 +02:00
Bruno BELANYI b90be0acdf home: zsh: remove trailing whitespace
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-30 00:46:09 +02:00
Bruno BELANYI ea4c699b81 modules: system: users: make it configurable
Notably, make use of my global 'username' option.
2021-05-30 00:46:09 +02:00
Bruno BELANYI 8efe75295d modules: add option to specify username
Given that I use it in plenty of places, it makes sense to place it
there for reference in other modules.
2021-05-30 00:46:09 +02:00
Bruno BELANYI 2d9b11406a modules: system: packages: make it configurable 2021-05-30 00:46:09 +02:00
Bruno BELANYI 003c08cb09 modules: system: nix: make it configurable 2021-05-30 00:46:09 +02:00
Bruno BELANYI 6728b50d3a modules: system: language: make it configurable 2021-05-30 00:46:09 +02:00
Bruno BELANYI 2eaf3bf2c7 modules: system: move 'packages' 2021-05-29 16:58:44 +02:00
Bruno BELANYI 0077ce1f94 modules: system: move 'nix' 2021-05-29 16:58:44 +02:00
Bruno BELANYI 14d9fc89f1 modules: system: move 'documentation' 2021-05-29 16:58:44 +02:00
Bruno BELANYI f660bf94e9 modules: system: move 'language' 2021-05-29 16:58:44 +02:00
Bruno BELANYI 3b9f01e780 modules: system: move 'users' 2021-05-29 16:58:44 +02:00
Bruno BELANYI 60f1e693d1 modules: system: move 'media' 2021-05-29 16:56:15 +02:00
Bruno BELANYI ce4b0b8c90 modules: add 'system' directory 2021-05-29 16:56:15 +02:00
Bruno BELANYI d2704b17fe modules: move 'services' into subfolder 2021-05-29 16:56:15 +02:00
Bruno BELANYI 31f8ec6e98 modules: hardware: move 'upower' 2021-05-29 16:56:15 +02:00
Bruno BELANYI af67d04992 modules: hardware: move 'sound' 2021-05-29 16:56:15 +02:00
Bruno BELANYI f9bcf79430 modules: hardware: move 'networking' 2021-05-29 16:56:15 +02:00
Bruno BELANYI b0cc830467 modules: hardware: move 'ergodox' 2021-05-29 16:56:15 +02:00
Bruno BELANYI 9b054d10c7 modules: hardware: move 'bluetooth' 2021-05-29 16:56:15 +02:00
Bruno BELANYI e81aaa8ebc modules: add 'hardware' directory 2021-05-29 16:56:15 +02:00
Bruno BELANYI 737b5e797b modules: ergodox: remove useless group clause
The `zsa` module already add the group itself.
2021-05-29 16:15:20 +02:00
Bruno BELANYI 6728b5b949 flake: bump inputs
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-29 12:23:01 +02:00
Bruno BELANYI 2999ba7c0b services: jellyfin: fix proxy configuration
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-28 11:38:28 +02:00
Bruno BELANYI 1ac9f0cc8c home: comma: configure custom 'nixpkgs' flake
All checks were successful
continuous-integration/drone/push Build is passing
This makes use of my pinned `pkgs` flake from the registry by default.
2021-05-27 21:50:27 +02:00
Bruno BELANYI 6074958292 home: extract 'comma' into its own module 2021-05-27 21:49:24 +02:00
Bruno BELANYI da21e7a6f2 pkgs: comma: allow override which nixpkgs is used
This is useful for me to use my pinned `pkgs` instead.
2021-05-27 21:42:41 +02:00
Bruno BELANYI 395f15f181 pkgs: add volantes-cursors 2021-05-27 19:57:31 +02:00
Bruno BELANYI 059831b532 home: x: cursor: switch to Vimix
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-27 19:15:52 +02:00
Bruno BELANYI 76d165343e pkgs: add vimix-cursors 2021-05-27 19:15:52 +02:00
Bruno BELANYI f66da6fee6 home: git: add 'pick' alias
All checks were successful
continuous-integration/drone/push Build is passing
I wanted to name it 'pickaxe' but for a curious reason, it does not seem
to be working when I use that alias...

I am trying to find a second alias name for `git log -p -S`, which only
shows commits that change the number of occurrences of its pickaxe in
the file. Whereas `-G` shows any commit involving the pickaxe in its
diff.
2021-05-25 23:13:35 +02:00
Bruno BELANYI ca1c7962ea machines: aramis: sound: switch to pipewire
The support for mSBC means I should get better audio on my QC35.
2021-05-25 23:13:35 +02:00
Bruno BELANYI 796df5475e home: wm: i3: use pamixer for audio control
This can be used with either pipewire and pulseaudio without having to
install all of pulseaudio.
2021-05-25 23:13:35 +02:00
Bruno BELANYI 414606b58e modules: bluetooth: add pipewire codecs 2021-05-25 23:13:35 +02:00
Bruno BELANYI 931b67fdb2 modules: sound: add pipewire configuration 2021-05-25 18:19:52 +02:00
Bruno BELANYI 8b4966fcbe machines: aramis: sound: use common module 2021-05-25 18:19:52 +02:00
Bruno BELANYI a508db48c9 modules: add sound
I will probably want to share this configuration between multiple
machines in the future.
2021-05-25 18:19:52 +02:00
Bruno BELANYI 406eeea9f6 services: podgrab: remove mention of merged PR
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-23 00:32:59 +02:00
Bruno BELANYI 9d3d86365c project: readme: mention manual flood config
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-23 00:14:26 +02:00
Bruno BELANYI 78d77890de machines: porthos: services: enable flood
Some checks failed
continuous-integration/drone/push Build is failing
2021-05-22 23:59:27 +02:00
Bruno BELANYI a33fbc6659 services: add flood 2021-05-22 23:59:27 +02:00
Bruno BELANYI b134aedff0 home: wm: i3bar: invert baclight icon
Because I am using an emoji font, it looks better that way.
2021-05-22 23:59:27 +02:00
Bruno BELANYI d31e293cef home: mail: add msmtp 2021-05-22 23:49:57 +02:00
Bruno BELANYI 182ec2a4db home: add mail and accounts configuration 2021-05-22 23:49:57 +02:00
Bruno BELANYI 81647c5a02 home: terminal: use 'cfg.terminal' for TERMINAL 2021-05-22 23:49:57 +02:00
Bruno BELANYI 8a8f7387f4 pkgs: add bw-pass
Until `rbw` gets support for Yubikey 2FA, I still need a decent way to
query for my passwords on the command line...

This wrapper program should be good enough for basic usage with programs
that need a password command.
2021-05-22 23:49:57 +02:00
Bruno BELANYI f2b20c65a8 modules: nix: expose pinned nixpkgs as 'pkgs'
That way if I do want to use that latest version, I can still use
`nixpkgs#<whatever>`.
2021-05-22 23:49:57 +02:00
Bruno BELANYI cc37713839 home: firefox: tridactyl: fix Reddit URL rewriter 2021-05-22 23:49:57 +02:00
Bruno BELANYI e80485018c home: firefox: add ff2mpv
This allows watching videos using mpv via a simple button.
2021-05-22 23:49:57 +02:00
Bruno BELANYI 15abb291ef machines: aramis: home: enable mpv 2021-05-22 23:49:57 +02:00
Bruno BELANYI fb56631ef3 home: add mpv 2021-05-22 23:49:57 +02:00
Bruno BELANYI 9113290161 pkgs: add ff2mpv-go 2021-05-22 23:49:57 +02:00
Bruno BELANYI 943ea20b16 services: podgrab: switch to upstream service 2021-05-22 23:49:57 +02:00
Bruno BELANYI 129fcdd42c pkgs: remove podgrab
Now that it has been merged upstream, no reason to keep it.
2021-05-22 23:49:02 +02:00
Bruno BELANYI d086af7e00 modules: nix: pin flake registry to common inputs 2021-05-22 23:47:27 +02:00
Bruno BELANYI e4d8a4d4b2 flake: inject 'inputs' into NixOS configuration 2021-05-22 23:47:27 +02:00
Bruno BELANYI 1a5dd0b91c home: wm: rofi: configure terminal 2021-05-22 23:47:27 +02:00
Bruno BELANYI 02c2a23ee5 profiles: laptop: enable TLP 2021-05-22 23:47:27 +02:00
Bruno BELANYI f6ace9d438 services: add TLP 2021-05-22 23:47:27 +02:00
Bruno BELANYI 2a0b5b7802 pkgs: add myself as maintainer to all packages 2021-05-22 23:47:27 +02:00
Bruno BELANYI 2c596395b0 home: add nix-index 2021-05-22 23:47:27 +02:00
Bruno BELANYI 986701d1c8 services: adblock: use new 'settings' option
This shows that I have not upgraded the server in a while...
2021-05-22 23:47:27 +02:00
Bruno BELANYI ee33ab11c6 flake: bump inputs 2021-05-20 17:55:45 +02:00
Bruno BELANYI 7d0a772cce home: firefox: tridactyl: fix parent URL on Reddit
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-16 00:03:59 +02:00
Bruno BELANYI 97ee498405 home: packages: add 'comma' to common package set 2021-05-16 00:03:59 +02:00
Bruno BELANYI e5fdfd6c44 pkgs: add comma 2021-05-16 00:03:59 +02:00
Bruno BELANYI 76148d75b8 machines: aramis: services: remove gnupg-agent
The one configured by home-manager is more appropriate.
2021-05-16 00:03:59 +02:00
Bruno BELANYI 9e6bc604f3 home: x: add 'xsel' package
I like it better than 'xclip'.
2021-05-16 00:03:59 +02:00
Bruno BELANYI b4d3b06fbf home: zsh: make history ten times bigger 2021-05-16 00:03:59 +02:00
Bruno BELANYI 8de23feee7 profiles: laptop: enable power-alert 2021-05-16 00:03:59 +02:00
Bruno BELANYI 0fc3bf3096 home: add power-alert 2021-05-16 00:03:59 +02:00
Bruno BELANYI 7d48b0edab profiles: laptop: enable upower 2021-05-16 00:03:59 +02:00
Bruno BELANYI d23ad8f5e1 modules: add upower 2021-05-16 00:03:59 +02:00
Bruno BELANYI f3764ce20e home: pager: fix colorized man pages
Turns out that sessionVariables are not being set at the proper time for
use with `tput`.

This commit also cleans up a bit how the config was being set.
2021-05-16 00:03:59 +02:00
Bruno BELANYI f9d849c5da home: wm: i3bar: add 'backlight' block 2021-05-16 00:03:59 +02:00
Bruno BELANYI 59e833a55b home: wm: i3bar: remove gammastep block
It doesn't seem to be working well with my setup...
2021-05-16 00:03:59 +02:00
Bruno BELANYI 03130ed9ee home: wm: i3: use 'brightnessctl' 2021-05-16 00:03:59 +02:00
Bruno BELANYI ac4cf0c1a2 home: wm: i3: fix screen-related mappings 2021-05-16 00:03:59 +02:00
Bruno BELANYI fab93a5f2f modules: users: simplify 'groupsIfExist' 2021-05-16 00:03:59 +02:00
Bruno BELANYI f04368a71e machines: porthos: set timezone 2021-05-16 00:03:59 +02:00
Bruno BELANYI 30ce91557d machines: aramis: use laptop profile 2021-05-16 00:03:59 +02:00
Bruno BELANYI d46f66842f profiles: add laptop 2021-05-16 00:03:59 +02:00
Bruno BELANYI 737484dcfe machines: aramis: use X profile 2021-05-16 00:03:59 +02:00
Bruno BELANYI 125935ac0f profiles: add X 2021-05-16 00:03:59 +02:00
Bruno BELANYI e786eaddde machines: aramis: use gtk profile 2021-05-16 00:03:59 +02:00
Bruno BELANYI e211ac7d73 profiles: add gtk 2021-05-16 00:03:59 +02:00
Bruno BELANYI 3f50abcbe0 machines: aramis: use wm profile 2021-05-16 00:03:59 +02:00
Bruno BELANYI 1c2193d698 profiles: add wm 2021-05-16 00:03:59 +02:00
Bruno BELANYI 12b3397a20 modules: bluetooth: fix documentation 2021-05-16 00:03:59 +02:00
Bruno BELANYI ca620a4eb6 machines: aramis: enable bluetooth profile 2021-05-16 00:03:59 +02:00
Bruno BELANYI 885b45d39c profiles: add bluetooth 2021-05-16 00:03:59 +02:00
Bruno BELANYI 0c943d8430 flake: add profiles folder
This will be used for configurations that either consolidates multiple options
that make sens to use together, or span accross system and home configuration.
2021-05-16 00:03:59 +02:00
Bruno BELANYI 79dfb3a979 home: gtk: do not set font size
Turns out that I do not like how it interferes with Firefox's
rendering... I should probably investigate this in the future if I want
to use this option.
2021-05-16 00:03:59 +02:00
Bruno BELANYI 00a5d1b076 machines: aramis: home: enable GTK
In order to not have an error at activation, dconf must be made
available to the dbus service.
2021-05-10 00:31:01 +02:00
Bruno BELANYI 5e193b3a42 home: add gtk 2021-05-10 00:31:01 +02:00
Bruno BELANYI bf9de874ce machines: aramis: home: add transgui 2021-05-10 00:31:01 +02:00
Bruno BELANYI 5aaa497653 overlays: add transgui-fix-duplicate-status
Upstream is being slow in merging the patch...
2021-05-10 00:31:01 +02:00
Bruno BELANYI 3887a86650 flake: add overlays folder 2021-05-10 00:31:01 +02:00
Bruno BELANYI f57fd32088 machines: aramis: home: add jellyfin-media-player 2021-05-10 00:31:01 +02:00
Bruno BELANYI 1c147613e4 home: terminal: export TERMINAL when appropriate
This is used by some programs, like 'rofi' to launch terminal programs.
2021-05-10 00:31:01 +02:00
Bruno BELANYI 15190d4b50 pkgs: i3-get-window-criteria: remove whitespace 2021-05-10 00:31:01 +02:00
Bruno BELANYI 5f7d2c74bc home: wm: i3: add i3-get-window-criteria package 2021-05-10 00:31:01 +02:00
Bruno BELANYI 53dd04a0b7 pkgs: add i3-get-window-criteria 2021-05-10 00:31:01 +02:00
Bruno BELANYI 86ab6bf17a machines: aramis: home: enable feh 2021-05-10 00:31:01 +02:00
Bruno BELANYI 6008ac470c home: add feh 2021-05-10 00:31:01 +02:00
Bruno BELANYI 717c628ff1 machines: aramis: home: set up background
`i3` inherits its background from `lightdm`.
2021-05-10 00:31:01 +02:00
Bruno BELANYI 749ef9f072 home: packages: add 'file' to common package set 2021-05-10 00:31:01 +02:00
Bruno BELANYI a0c63f00f9 home: pager: add colored man page support 2021-05-10 00:31:01 +02:00
Bruno BELANYI d9734dd505 machines: aramis: add some additional packages 2021-05-10 00:31:01 +02:00
Bruno BELANYI 4225bdd103 home: packages: add option for additional packages 2021-05-10 00:31:01 +02:00
Bruno BELANYI 3a07cffa14 modules: documentation: add linux man pages option
I want to be able to read about syscalls or the C library.
2021-05-10 00:31:01 +02:00
Bruno BELANYI 06f9f423e9 modules: documentation: use 'mkDisableOption'
The documentation module already gates behind 'documentation.enable' for
the other options.
2021-05-10 00:31:01 +02:00
Bruno BELANYI ad1d907c25 home: x: add cursor
I would like to check out alternative themes. Notably Quintom [1],
Volantes [2], and Vimix [3].

[1]: https://gitlab.com/Burning_Cube/quintom-cursor-theme
[2]: https://github.com/varlesh/volantes-cursors
[3]: https://github.com/vinceliuice/Vimix-cursors
2021-05-10 00:31:01 +02:00
Bruno BELANYI ef0f4bdca5 machines: aramis: home: enable bluetooth 2021-05-10 00:31:01 +02:00
Bruno BELANYI b4d002033a home: add bluetooth 2021-05-10 00:31:01 +02:00
Bruno BELANYI 8837c7c33c home: wm: i3bar: use FontAwesome5 for icons 2021-05-10 00:31:01 +02:00
Bruno BELANYI f4cc68a650 home: wm: i3: use new 'fonts' option type 2021-05-10 00:31:01 +02:00
Bruno BELANYI 79525013b0 flake: bump inputs 2021-05-10 00:31:01 +02:00
Bruno BELANYI 2b8d01f056 machines: aramis: enable bluetooth 2021-05-10 00:31:01 +02:00
Bruno BELANYI b115d94cd6 modules: add bluetooth 2021-05-10 00:31:01 +02:00
Bruno BELANYI 1022601602 machines: aramis: networking: use wireless option 2021-05-10 00:31:01 +02:00
Bruno BELANYI 376e60d71e modules: networking: add 'wireless' option 2021-05-10 00:31:01 +02:00
Bruno BELANYI a03db294fe machines: aramis: install: exit on error 2021-05-10 00:31:01 +02:00
Bruno BELANYI f2b9040175 machines: aramis: home: enable nm-applet 2021-05-10 00:31:01 +02:00
Bruno BELANYI b1e8664e32 home: add nm-applet 2021-05-10 00:31:01 +02:00
Bruno BELANYI b61aca7def modules: users: add myself to 'networkmanager' 2021-05-08 17:14:13 +02:00
Bruno BELANYI d388a379d4 machine: aramis: networking: use networkmanager
I consider WiFi configurations to be ephemeral
2021-05-08 17:14:13 +02:00
Bruno BELANYI 3402b92784 home: gammastep: show tray icon 2021-05-08 17:14:13 +02:00
Bruno BELANYI b55466b791 home: gammastep: change default night temperature
I want the colour to be warmer, and blues even more attenuated.
2021-05-08 17:14:13 +02:00
Bruno BELANYI 036d59ec11 home: wm: i3: add mic mute media key 2021-05-08 17:14:13 +02:00
Bruno BELANYI f89e1ba3e9 home: wm: i3: fix audio media keys 2021-05-08 17:14:13 +02:00
Bruno BELANYI 8788deac5e home: wm: i3bar: extend width of music block 2021-05-08 17:14:13 +02:00
Bruno BELANYI 676cd03c9c home: wm: i3bar: show temperature block by default 2021-05-08 17:14:13 +02:00
Bruno BELANYI e329e7a59a home: zsh: enable VTE integration when appropriate 2021-05-08 17:14:13 +02:00
Bruno BELANYI 98a8e068ea machines: aramis: services: enable wireguard 2021-05-08 17:14:13 +02:00
Bruno BELANYI f5fcd2a7a6 home: wm: screen-lock: add 'notify.delay' setting 2021-05-08 17:14:13 +02:00
Bruno BELANYI 1b9b598662 home: wm: screen-lock: add corner delay setting 2021-05-08 17:14:13 +02:00
Bruno BELANYI 05e0cd4e1f modules: users: reformat 2021-05-08 17:14:13 +02:00
Bruno BELANYI 9973e0d32f home: firefox: add form-history-control extension 2021-05-08 17:14:13 +02:00
Bruno BELANYI 8231e8feaa home: wm: i3: use keycode for shutdown mapping
The motivation for using keycodes for all those mappings is to allow
switch to an actual french keyboard layout it still be able to move
through workspaces etc...
2021-05-08 17:14:13 +02:00
Bruno BELANYI 8dc89846b2 machines: aramis: home: use GTK pinentry
I do have a graphical session, I can afford to be "fancy"
2021-05-08 17:14:13 +02:00
Bruno BELANYI 5a32160954 home: gpg: make pinentry configurable 2021-05-08 17:14:13 +02:00
Bruno BELANYI 6612d0226a modules: packages: prefer user compinit to global
This should make the shell startup faster.
2021-05-08 17:14:13 +02:00
Bruno BELANYI 75e3d9bf70 project: bootstrap: unlock BW when logged in 2021-05-08 17:14:13 +02:00
Bruno BELANYI 9dbfb65c27 home: wm: i3: add display bindings 2021-05-08 17:14:13 +02:00
Bruno BELANYI f8d6447ac4 home: wm: i3: add dunst bindings 2021-05-08 17:14:13 +02:00
Bruno BELANYI 185781a4e2 home: wm: i3: add binding to toggle xautolock 2021-05-08 17:14:13 +02:00
Bruno BELANYI cdc29efafc home: wm: screen-lock: add xautolock options 2021-05-08 17:14:13 +02:00
Bruno BELANYI 9f6c614c9f home: wm: add screen-lock 2021-05-08 17:14:13 +02:00
Bruno BELANYI 54a20058fb home: wm: dunst: add configuration 2021-05-08 17:14:13 +02:00
Bruno BELANYI 6bad81a644 home: wm: add dunst 2021-05-08 17:14:13 +02:00
Bruno BELANYI 971ee359ce home: wm: use explicit 'enable' options
This is so that I can explicitly enable them if I were to use Wayland
and Sway, given that they should be compatible with both environment.

This also means that putting them in `/home/x/` would a misnomer... Will
revisit this if and when I try out Wayland and sway...
2021-05-08 17:14:13 +02:00
Bruno BELANYI c175964630 modules: users: add myself to 'video' and 'audio' 2021-05-08 17:14:13 +02:00
Bruno BELANYI 046391e26e home: wm: i3bar: hide music block when not playing 2021-05-08 17:14:13 +02:00
Bruno BELANYI b32fec2c63 home: wm: i3bar: add gammastep block if enabled 2021-05-08 17:14:13 +02:00
Bruno BELANYI 3ec448bf03 machines: aramis: home: enable gammastep 2021-05-08 17:14:13 +02:00
Bruno BELANYI c3c44bceb6 home: add gammastep 2021-05-08 17:14:13 +02:00
Bruno BELANYI e1240c188e home: firefox: add tridactyl 2021-05-08 17:14:13 +02:00
Bruno BELANYI d5b3b95827 home: firefox: use tridactyl-native when enabled 2021-05-08 17:14:13 +02:00
Bruno BELANYI c17b5f4004 machines: aramis: home: enable firefox 2021-05-08 17:14:13 +02:00
Bruno BELANYI e06edc8f47 home: add firefox 2021-05-08 17:14:13 +02:00
Bruno BELANYI 4d04dd9b9b home: wm: i3: use udiskie service 2021-05-08 17:14:13 +02:00
Bruno BELANYI e6b810b5a1 home: add udiskie 2021-05-08 17:14:13 +02:00
Bruno BELANYI 595720dcd4 home: wm: i3: use flameshot service directly
Instead of starting `flameshot` with `i3`, use the provided service.
2021-05-08 17:14:13 +02:00
Bruno BELANYI e6fb00ce9a home: add flameshot 2021-05-08 17:14:13 +02:00
Bruno BELANYI d01b7963cd machines: aramis: home: enable zathura 2021-05-08 17:14:13 +02:00
Bruno BELANYI 646768c3b7 home: add zathura 2021-05-08 17:14:13 +02:00
Bruno BELANYI b254e0f7ac machines: aramis: home: enable termite 2021-05-08 17:14:13 +02:00
Bruno BELANYI fee045d82c home: wm: i3: use 'my.home.terminal' explicitly 2021-05-08 17:14:13 +02:00
Bruno BELANYI 76b17e924a home: terminal: add termite 2021-05-08 17:14:13 +02:00
Bruno BELANYI 9fe78a5a70 home: add terminal
This module abstracts away the color configuration.
2021-05-08 17:14:13 +02:00
Bruno BELANYI 90ccf42779 home: wm: i3: add configuration 2021-05-08 17:14:13 +02:00
Bruno BELANYI cdbe16e703 home: wm: add rofi 2021-05-08 17:14:13 +02:00
Bruno BELANYI 1da8177ea2 home: wm: add i3bar 2021-05-08 17:14:13 +02:00
Bruno BELANYI fe9f468e06 machines: aramis: home: enable X & i3 2021-05-08 17:14:13 +02:00
Bruno BELANYI 45cb955433 machines: aramis: add home configuration 2021-05-08 17:14:13 +02:00
Bruno BELANYI b6fb77fc34 modules: add home
This makes setting and referring to my home-manager options easier.
2021-05-08 17:14:13 +02:00
Bruno BELANYI f57cfda767 home: wm: add i3
This is only the basic default configuration. The full configuration
will come later.

I am not a fan of `wm.windowManager`, I might rename that option at some
point.
2021-05-08 17:14:13 +02:00
Bruno BELANYI 5427f15a17 home: add X keyboard configuration 2021-05-08 17:14:13 +02:00
Bruno BELANYI 6acf9f4a19 machines: add aramis 2021-05-08 17:14:13 +02:00
Bruno BELANYI cd7c8e2172 lib: attrs: add renaming functions 2021-05-08 17:14:13 +02:00
Bruno BELANYI e0b0f44a9a lib: attrs: document functions 2021-05-08 17:14:13 +02:00
Bruno BELANYI bd53470e46 lib: attrs: add genAttrs' function 2021-05-08 17:14:13 +02:00
Bruno BELANYI f634f1b2ed flake: refactor handling of shared modules 2021-05-08 17:14:13 +02:00
Bruno BELANYI dc052386d1 machine: aramis: add installer script
This is the first time that I am setting up LVM-on-LUKS with NixOS, so a
VM came in handy to test it out.
2021-05-08 17:14:13 +02:00
421 changed files with 2618 additions and 6382 deletions

View file

@ -1,14 +1,16 @@
labels:
backend: local
---
kind: pipeline
type: exec
name: NixOS config check
steps:
- name: nix flake check
image: bash
commands:
- nix flake check
- name: notifiy
image: bash
commands:
- nix run .#matrix-notifier
environment:
ADDRESS:
from_secret: matrix_homeserver
@ -18,9 +20,8 @@ steps:
from_secret: matrix_username
PASS:
from_secret: matrix_password
commands:
- nix run '.#matrix-notifier'
when:
status:
- failure
- success
- failure
- success
...

13
.envrc
View file

@ -1,8 +1,9 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.0/direnvrc" "sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg="
fi
watch_file ./flake/checks.nix
watch_file ./flake/dev-shells.nix
use_flake() {
watch_file flake.nix
watch_file flake.lock
eval "$(nix print-dev-env)"
}
ulimit -s unlimited # Bypass current bug in `nix` flakes evaluation
use flake
eval "$shellHooks"

View file

@ -1 +0,0 @@
indent_type = "Spaces"

View file

@ -1,6 +1,5 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p bitwarden-cli git gnupg jq nix
# shellcheck shell=bash
#! nix-shell -i bash -p bitwarden-cli git gnupg jq nixFlakes
# Command failure is script failure
set -e
@ -11,6 +10,7 @@ BOLD_GREEN="\e[0;1;32m"
RESET="\e[0m"
DEST="$HOME/.config/nixpkgs"
BW_SESSION=""
warn() {
@ -58,8 +58,8 @@ get_ssh() {
get_doc "SysAdmin/SSH" "shared-key-public" "$HOME/.ssh/shared_rsa.pub" 644
get_doc "SysAdmin/SSH" "shared-key-private" "$HOME/.ssh/shared_rsa" 600
get_doc "SysAdmin/SSH" "agenix-public" "$HOME/.ssh/agenix.pub" 644
get_doc "SysAdmin/SSH" "agenix-private" "$HOME/.ssh/agenix" 600
get_doc "SysAdmin/SSH" "agenix-public" "$HOME/.ssh/id_ed25519.pub" 644
get_doc "SysAdmin/SSH" "agenix-private" "$HOME/.ssh/id_ed25519" 600
}
get_pgp() {
@ -87,6 +87,15 @@ get_creds() {
get_pgp
}
setup_gpg() {
info 'Setting up loopback pinentry for GnuPG'
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
info 'Signing dummy message to ensure GnuPG key is usable by `git-crypt`'
echo whatever | gpg --clearsign --armor --pinentry loopback --output /dev/null
}
[ -z "$NOCREDS" ] && get_creds
[ -z "$NOGPG" ] && setup_gpg
nix --experimental-features 'nix-command flakes' develop

View file

@ -2,23 +2,16 @@
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
],
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1715290355,
"narHash": "sha256-2T7CHTqBXJJ3ZC6R/4TXTcKoXWHcvubKNj9SfomURnw=",
"lastModified": 1662046976,
"narHash": "sha256-BrTReGRhkVm/Kmmf4zQrL+oYWy0sds/BDBgXNX1CL3c=",
"owner": "ryantm",
"repo": "agenix",
"rev": "8d37c5bdeade12b6479c85acd133063ab53187a0",
"rev": "9f136ecfa5bf954538aed3245e4408cf87c85097",
"type": "github"
},
"original": {
@ -28,36 +21,29 @@
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"devshell": {
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"lastModified": 1642188268,
"narHash": "sha256-DNz4xScpXIn7rSDohdayBpPR9H9OWCMDOgTYegX081k=",
"owner": "numtide",
"repo": "devshell",
"rev": "696acc29668b644df1740b69e1601119bf6da83b",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
@ -66,81 +52,37 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715865404,
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"ref": "main",
"repo": "flake-parts",
"type": "github"
}
},
"futils": {
"inputs": {
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "main",
"ref": "master",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": [
"futils"
]
},
"locked": {
"lastModified": 1715930644,
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
"lastModified": 1661824092,
"narHash": "sha256-nSWLWytlXbeLrx5A+r5Pso7CvVrX5EgmIIXW/EXvPHQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
"rev": "5bd66dc6cd967033489c69d486402b75d338eeb6",
"type": "github"
},
"original": {
@ -150,13 +92,52 @@
"type": "github"
}
},
"matrix-appservices": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1662227278,
"narHash": "sha256-n58O7wTmORHg+cwYrbKjnlKi3UQkDug9l0FY9RB6zIM=",
"owner": "coffeetables",
"repo": "nix-matrix-appservices",
"rev": "41c1418781dbdfae5d1c15a29b7f1b8f67e5d69f",
"type": "gitlab"
},
"original": {
"owner": "coffeetables",
"ref": "main",
"repo": "nix-matrix-appservices",
"type": "gitlab"
}
},
"nixlib": {
"locked": {
"lastModified": 1643502816,
"narHash": "sha256-Wrbt6Gs+hjXD3HUICPBJHKnHEUqiyx8rzHCgvqC1Bok=",
"owner": "divnix",
"repo": "nixpkgs.lib",
"rev": "ebed7ec5bcb5d01e298535989c6c321df18b631a",
"type": "github"
},
"original": {
"owner": "divnix",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1715961556,
"narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=",
"lastModified": 1662019588,
"narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64",
"rev": "2da64a81275b68fdad38af669afeda43d401e94b",
"type": "github"
},
"original": {
@ -168,11 +149,11 @@
},
"nur": {
"locked": {
"lastModified": 1716149933,
"narHash": "sha256-0Ui2HmmKvSqxXfT5kCzTu2EO+kqYxavPZHROxQLsI14=",
"lastModified": 1662103084,
"narHash": "sha256-zE6ftit1nllgrXJ3hnt/h/Ev+JsjkJQLKAgO5M31R5s=",
"owner": "nix-community",
"repo": "NUR",
"rev": "0d0e224fe23a49977d871ae2fe2f14c84b03322a",
"rev": "65fef905eaad9a585a3841103ed3f45608a50c56",
"type": "github"
},
"original": {
@ -184,21 +165,19 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
"flake-utils": [
"futils"
],
"nixpkgs-stable": [
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715870890,
"narHash": "sha256-nacSOeXtUEM77Gn0G4bTdEOeFIrkCBXiyyFZtdGwuH0=",
"lastModified": 1660830093,
"narHash": "sha256-HUhx3a82C7bgp2REdGFeHJdhEAzMGCk3V8xIvfBqg1I=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "fa606cccd7b0ccebe2880051208e4a0f61bfc8c1",
"rev": "8cb8ea5f1c7bc2984f460587fddd5f2e558f6eb8",
"type": "github"
},
"original": {
@ -211,29 +190,12 @@
"root": {
"inputs": {
"agenix": "agenix",
"flake-parts": "flake-parts",
"futils": "futils",
"home-manager": "home-manager",
"matrix-appservices": "matrix-appservices",
"nixpkgs": "nixpkgs",
"nur": "nur",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"ref": "main",
"repo": "default",
"type": "github"
"pre-commit-hooks": "pre-commit-hooks"
}
}
},

158
flake.nix
View file

@ -7,19 +7,7 @@
repo = "agenix";
ref = "main";
inputs = {
home-manager.follows = "home-manager";
nixpkgs.follows = "nixpkgs";
systems.follows = "systems";
};
};
flake-parts = {
type = "github";
owner = "hercules-ci";
repo = "flake-parts";
ref = "main";
inputs = {
nixpkgs-lib.follows = "nixpkgs";
};
};
@ -27,10 +15,7 @@
type = "github";
owner = "numtide";
repo = "flake-utils";
ref = "main";
inputs = {
systems.follows = "systems";
};
ref = "master";
};
home-manager = {
@ -40,6 +25,20 @@
ref = "master";
inputs = {
nixpkgs.follows = "nixpkgs";
utils.follows = "futils";
};
};
matrix-appservices = {
type = "gitlab";
owner = "coffeetables";
repo = "nix-matrix-appservices";
ref = "main";
inputs = {
# devshell.follows = "devshell";
# flake-compat.follows = "flake-compat";
# nixlib.follows = "nixlib";
nixpkgs.follows = "nixpkgs";
};
};
@ -63,19 +62,126 @@
repo = "pre-commit-hooks.nix";
ref = "master";
inputs = {
flake-utils.follows = "futils";
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
};
systems = {
type = "github";
owner = "nix-systems";
repo = "default";
ref = "main";
};
};
# Can't eta-reduce a flake outputs...
outputs = inputs: import ./flake inputs;
outputs =
inputs @
{ self
, agenix
, futils
, home-manager
, matrix-appservices
, nixpkgs
, nur
, pre-commit-hooks
}:
let
inherit (futils.lib) eachSystem system;
mySystems = [
system.aarch64-linux
system.x86_64-darwin
system.x86_64-linux
];
eachMySystem = eachSystem mySystems;
lib = nixpkgs.lib.extend (self: super: {
my = import ./lib { inherit inputs; pkgs = nixpkgs; lib = self; };
});
defaultModules = [
({ ... }: {
# Let 'nixos-version --json' know about the Git revision
system.configurationRevision = self.rev or "dirty";
})
{
nixpkgs.overlays = (lib.attrValues self.overlays) ++ [
nur.overlay
];
}
# Include generic settings
./modules
# Include bundles of settings
./profiles
];
buildHost = name: system: lib.nixosSystem {
inherit system;
modules = defaultModules ++ [
(./. + "/machines/${name}")
];
specialArgs = {
# Use my extended lib in NixOS configuration
inherit lib;
# Inject inputs to use them in global registry
inherit inputs;
};
};
in
eachMySystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
apps = {
diff-flake = futils.lib.mkApp { drv = packages.diff-flake; };
default = apps.diff-flake;
};
checks = {
pre-commit = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt = {
enable = true;
};
shellcheck = {
enable = true;
};
};
};
};
devShells = {
default = pkgs.mkShell {
name = "NixOS-config";
nativeBuildInputs = with pkgs; [
gitAndTools.pre-commit
nixpkgs-fmt
];
inherit (self.checks.${system}.pre-commit) shellHook;
};
};
packages =
let
inherit (futils.lib) filterPackages flattenTree;
packages = import ./pkgs { inherit pkgs; };
flattenedPackages = flattenTree packages;
finalPackages = filterPackages system flattenedPackages;
in
finalPackages;
}) // {
overlays = import ./overlays // {
lib = final: prev: { inherit lib; };
pkgs = final: prev: {
ambroisie = prev.recurseIntoAttrs (import ./pkgs { pkgs = prev; });
};
};
nixosConfigurations = lib.mapAttrs buildHost {
aramis = "x86_64-linux";
porthos = "x86_64-linux";
};
};
}

View file

@ -1,9 +0,0 @@
{ inputs, ... }:
{
perSystem = { self', ... }: {
apps = {
diff-flake = inputs.futils.lib.mkApp { drv = self'.packages.diff-flake; };
default = self'.apps.diff-flake;
};
};
}

View file

@ -1,33 +0,0 @@
{ inputs, ... }:
{
imports = [
inputs.pre-commit-hooks.flakeModule
];
perSystem = { ... }: {
pre-commit = {
# Add itself to `nix flake check`
check.enable = true;
settings = {
hooks = {
deadnix = {
enable = true;
};
nixpkgs-fmt = {
enable = true;
};
shellcheck = {
enable = true;
};
stylua = {
enable = true;
};
};
};
};
};
}

View file

@ -1,22 +0,0 @@
{ flake-parts
, systems
, ...
} @ inputs:
let
mySystems = import systems;
in
flake-parts.lib.mkFlake { inherit inputs; } {
systems = mySystems;
imports = [
./apps.nix
./checks.nix
./dev-shells.nix
./home-manager.nix
./lib.nix
./nixos.nix
./overlays.nix
./packages.nix
./templates.nix
];
}

View file

@ -1,19 +0,0 @@
{ ... }:
{
perSystem = { config, pkgs, ... }: {
devShells = {
default = pkgs.mkShellNoCC {
name = "NixOS-config";
nativeBuildInputs = with pkgs; [
gitAndTools.pre-commit
nixpkgs-fmt
];
shellHook = ''
${config.pre-commit.installationScript}
'';
};
};
};
}

View file

@ -1,62 +0,0 @@
{ self, inputs, lib, ... }:
let
defaultModules = [
# Include generic settings
"${self}/modules/home"
{
# Basic user information defaults
home.username = lib.mkDefault "ambroisie";
home.homeDirectory = lib.mkDefault "/home/ambroisie";
# Make it a Linux installation by default
targets.genericLinux.enable = lib.mkDefault true;
# Enable home-manager
programs.home-manager.enable = true;
}
];
mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration {
# Work-around for home-manager
# * not letting me set `lib` as an extraSpecialArgs
# * not respecting `nixpkgs.overlays` [1]
# [1]: https://github.com/nix-community/home-manager/issues/2954
pkgs = import inputs.nixpkgs {
inherit system;
overlays = (lib.attrValues self.overlays) ++ [
inputs.nur.overlay
];
};
modules = defaultModules ++ [
"${self}/hosts/homes/${name}"
];
extraSpecialArgs = {
# Inject inputs to use them in global registry
inherit inputs;
};
};
homes = {
"ambroisie@bazin" = "x86_64-linux";
"ambroisie@mousqueton" = "x86_64-linux";
};
in
{
perSystem = { system, ... }: {
# Work-around for https://github.com/nix-community/home-manager/issues/3075
legacyPackages = {
homeConfigurations =
let
filteredHomes = lib.filterAttrs (_: v: v == system) homes;
allHomes = filteredHomes // {
# Default configuration
ambroisie = system;
};
in
lib.mapAttrs mkHome allHomes;
};
};
}

View file

@ -1,11 +0,0 @@
{ self, inputs, ... }:
let
inherit (inputs) nixpkgs;
lib = nixpkgs.lib.extend (final: _: {
my = import "${self}/lib" { inherit inputs; pkgs = nixpkgs; lib = final; };
});
in
{
flake.lib = lib;
}

View file

@ -1,35 +0,0 @@
{ self, inputs, lib, ... }:
let
defaultModules = [
{
# Let 'nixos-version --json' know about the Git revision
system.configurationRevision = self.rev or "dirty";
}
{
nixpkgs.overlays = (lib.attrValues self.overlays) ++ [
inputs.nur.overlay
];
}
# Include generic settings
"${self}/modules/nixos"
];
buildHost = name: system: lib.nixosSystem {
inherit system;
modules = defaultModules ++ [
"${self}/hosts/nixos/${name}"
];
specialArgs = {
# Use my extended lib in NixOS configuration
inherit (self) lib;
# Inject inputs to use them in global registry
inherit inputs;
};
};
in
{
flake.nixosConfigurations = lib.mapAttrs buildHost {
aramis = "x86_64-linux";
porthos = "x86_64-linux";
};
}

View file

@ -1,17 +0,0 @@
{ self, ... }:
let
default-overlays = import "${self}/overlays";
additional-overlays = {
# Expose my expanded library
lib = _final: _prev: { inherit (self) lib; };
# Expose my custom packages
pkgs = _final: prev: {
ambroisie = prev.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
};
};
in
{
flake.overlays = default-overlays // additional-overlays;
}

View file

@ -1,13 +0,0 @@
{ self, inputs, ... }:
{
perSystem = { pkgs, system, ... }: {
packages =
let
inherit (inputs.futils.lib) filterPackages flattenTree;
packages = import "${self}/pkgs" { inherit pkgs; };
flattenedPackages = flattenTree packages;
finalPackages = filterPackages system flattenedPackages;
in
finalPackages;
};
}

View file

@ -1,4 +0,0 @@
{ self, ... }:
{
flake.templates = import "${self}/templates";
}

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.bat;
in
{
options.my.home.bat = with lib; {
enable = my.mkDisableOption "bat configuration";
options.my.home.bat = with lib.my; {
enable = mkDisableOption "bat configuration";
};
config.programs.bat = lib.mkIf cfg.enable {

29
home/comma/default.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.comma;
in
{
options.my.home.comma = with lib; {
enable = my.mkDisableOption "comma configuration";
pkgsFlake = mkOption {
type = types.str;
default = "pkgs";
example = "nixpkgs";
description = ''
Which flake from the registry should be used with
<command>nix shell</command>.
'';
};
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
ambroisie.comma
];
home.sessionVariables = {
COMMA_PKGS_FLAKE = cfg.pkgsFlake;
};
};
}

47
home/default.nix Normal file
View file

@ -0,0 +1,47 @@
{ ... }:
{
imports = [
./bat
./bluetooth
./comma
./direnv
./discord
./documentation
./feh
./firefox
./flameshot
./gammastep
./gdb
./git
./gpg
./gtk
./htop
./jq
./mail
./mpv
./nix-index
./nm-applet
./packages
./pager
./power-alert
./ssh
./terminal
./tmux
./udiskie
./vim
./wm
./x
./xdg
./zathura
./zsh
];
# First sane reproducible version
home.stateVersion = "20.09";
# Who am I?
home.username = "ambroisie";
# Start services automatically
systemd.user.startServices = "sd-switch";
}

View file

@ -7,9 +7,9 @@ in
enable = my.mkDisableOption "direnv configuration";
defaultFlake = mkOption {
type = with types; nullOr str;
default = null;
example = "pkgs";
type = types.str;
default = "pkgs";
example = "nixpkgs";
description = ''
Which flake from the registry should be used for
<command>use pkgs</command> by default.
@ -39,7 +39,7 @@ in
in
lib.my.genAttrs' files linkLibFile;
home.sessionVariables = lib.mkIf (cfg.defaultFlake != null) {
home.sessionVariables = {
DIRENV_DEFAULT_FLAKE = cfg.defaultFlake;
};
};

32
home/direnv/lib/nix.sh Normal file
View file

@ -0,0 +1,32 @@
#shellcheck shell=bash
use_pkgs() {
if ! has nix; then
# shellcheck disable=2016
log_error 'use_pkgs: `nix` is not in PATH'
return 1
fi
# Use user-provided default value, or fallback to nixpkgs
local DEFAULT_FLAKE="${DIRENV_DEFAULT_FLAKE:-nixpkgs}"
# Allow changing the default flake through a command line switch
if [ "$1" = "-f" ] || [ "$1" = "--flake" ]; then
DEFAULT_FLAKE="$2"
shift 2
fi
# Allow specifying a full installable, or just a package name and use the default flake
local packages=()
for pkg; do
if [[ $pkg =~ .*#.* ]]; then
packages+=("$pkg")
else
packages+=("$DEFAULT_FLAKE#$pkg")
fi
done
# shellcheck disable=2154
direnv_load nix shell "${packages[@]}" --command "$direnv" dump
}

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.documentation;
in
{
options.my.home.documentation = with lib; {
enable = my.mkDisableOption "documentation integration";
options.my.home.documentation = with lib.my; {
enable = mkDisableOption "documentation integration";
};
# Add documentation for user packages

View file

@ -33,10 +33,13 @@ in
enable = true;
package = pkgs.firefox.override {
nativeMessagingHosts = ([ ]
++ lib.optional cfg.tridactyl.enable pkgs.tridactyl-native
cfg = {
enableTridactylNative = cfg.tridactyl.enable;
};
extraNativeMessagingHosts = with pkgs; ([ ]
# Watch videos using mpv
++ lib.optional cfg.ff2mpv.enable pkgs.ff2mpv-go
++ lib.optional cfg.ff2mpv.enable ambroisie.ff2mpv-go
);
};
@ -54,27 +57,28 @@ in
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket
"extensions.pocket.enabled" = false; # Disable pocket
"media.eme.enabled" = true; # Enable DRM
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
"media.gmp-widevinecdm.visible" = true; # Enable DRM
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
"signon.autofillForms" = false; # Disable built-in form-filling
"signon.rememberSignons" = false; # Disable built-in password manager
"ui.systemUsesDarkTheme" = true; # Dark mode
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; ([
bitwarden
consent-o-matic
form-history-control
reddit-comment-collapser
reddit-enhancement-suite
refined-github
sponsorblock
ublock-origin
]
++ lib.optional (cfg.tridactyl.enable) tridactyl
++ lib.optional (cfg.ff2mpv.enable) ff2mpv
);
};
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; ([
bitwarden
consent-o-matic
form-history-control
https-everywhere
reddit-comment-collapser
reddit-enhancement-suite
refined-github
sponsorblock
ublock-origin
]
++ lib.optional (cfg.tridactyl.enable) tridactyl
++ lib.optional (cfg.ff2mpv.enable) ff2mpv
);
};
}

View file

@ -0,0 +1,9 @@
{ config, lib, ... }:
let
cfg = config.my.home.firefox.tridactyl;
in
{
config = lib.mkIf cfg.enable {
xdg.configFile."tridactyl/tridactylrc".source = ./tridactylrc;
};
}

View file

@ -5,12 +5,8 @@
colorscheme dark
" Make tridactyl open Vim in my prefered terminal
set editorcmd @editorcmd@
" Remove editor file after use
alias editor_rm composite editor | jsb -p tri.native.run(`rm -f '${JS_ARG[0]}'`)
bind --mode=insert <C-i> editor_rm
bind --mode=input <C-i> editor_rm
" FIXME: make it follow my prefered terminal
set editorcmd termite --class tridactyl_editor -e 'vim %f'
" }}}
" Binds {{{
@ -22,12 +18,12 @@ bind ;c hint -Jc [class*="expand"],[class*="togg"],[class="comment_folder"]
bindurl reddit.com gu urlparent 3
" Only hint search results on Google
bindurl www.google.com f hint -Jc #search a
bindurl www.google.com F hint -Jbc #search a
bindurl www.google.com f hint -Jc #search div:not(.action-menu) > a
bindurl www.google.com F hint -Jbc #search div:not(.action-menu) > a
" Only hint search results on DuckDuckGo
bindurl ^https://duckduckgo.com f hint -Jc [data-testid="result-title-a"]
bindurl ^https://duckduckgo.com F hint -Jbc [data-testid="result-title-a"]
bindurl ^https://duckduckgo.com f hint -Jc [class~=result__a]
bindurl ^https://duckduckgo.com F hint -Jbc [class~=result__a]
" Only hint item pages on Hacker News
bindurl news.ycombinator.com ;f hint -Jc .age > a
@ -69,6 +65,8 @@ unbind <C-f>
" Redirections {{{
" Always redirect Reddit to the old site
autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
" Use a better Twitter front-end
autocmd DocStart ^http(s?)://twitter.com js tri.excmds.urlmodify("-t", "twitter.com", "nitter.net")
" }}}
" Disabled websites {{{

View file

@ -20,26 +20,19 @@ in
};
};
config = lib.mkIf cfg.enable (lib.mkMerge [
{
config = lib.mkMerge [
(lib.mkIf cfg.enable {
home.packages = with pkgs; [
gdb
];
xdg = {
configFile."gdb/gdbinit".source = ./gdbinit;
dataFile. "gdb/.keep".text = "";
};
home.sessionVariables = {
GDBHISTFILE = "${config.xdg.dataHome}/gdb/gdb_history";
};
}
xdg.configFile."gdb/gdbinit".source = ./gdbinit;
})
(lib.mkIf cfg.rr.enable {
home.packages = [
cfg.rr.package
];
})
]);
];
}

View file

@ -28,7 +28,3 @@ compile_commands.json
# Direnv files
.envrc
.direnv/
# Project-local neovim configuration files
.nvim.lua
.nvimrc

View file

@ -5,17 +5,14 @@ let
inherit (lib.my) mkMailAddress;
in
{
options.my.home.git = with lib; {
enable = my.mkDisableOption "git configuration";
# I want the full experience by default
package = mkPackageOption pkgs "git" { default = [ "gitFull" ]; };
options.my.home.git = with lib.my; {
enable = mkDisableOption "git configuration";
};
config.home.packages = with pkgs; lib.mkIf cfg.enable [
git-absorb
git-revise
tig
config.home.packages = with pkgs.gitAndTools; lib.mkIf cfg.enable [
gitAndTools.git-absorb
gitAndTools.git-revise
gitAndTools.tig
];
config.programs.git = lib.mkIf cfg.enable {
@ -25,7 +22,8 @@ in
userEmail = mkMailAddress "bruno" "belanyi.fr";
userName = "Bruno BELANYI";
inherit (cfg) package;
# I want the full experience
package = pkgs.gitAndTools.gitFull;
aliases = {
git = "!git";
@ -37,7 +35,6 @@ in
pick = "log -p -G";
push-new = "!git push -u origin "
+ ''"$(git branch | grep '^* ' | cut -f2- -d' ')"'';
root = "git rev-parse --show-toplevel";
};
lfs.enable = true;
@ -123,11 +120,6 @@ in
defaultBranch = "main";
};
# Local configuration, not-versioned
include = {
path = "config.local";
};
merge = {
conflictStyle = "zdiff3";
};
@ -148,13 +140,9 @@ in
autoStash = true;
};
rerere = {
enabled = true;
};
url = {
"git@git.belanyi.fr:" = {
insteadOf = "https://git.belanyi.fr/";
"git@gitea.belanyi.fr:" = {
insteadOf = "https://gitea.belanyi.fr/";
};
"git@github.com:" = {
@ -178,15 +166,6 @@ in
};
};
}
{
condition = "gitdir:~/git/work/";
contents = {
user = {
name = "Bruno BELANYI";
email = mkMailAddress "ambroisie" "google.com";
};
};
}
];
ignores =

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.my.home.gpg;
in
@ -6,7 +6,12 @@ in
options.my.home.gpg = with lib; {
enable = my.mkDisableOption "gpg configuration";
pinentry = mkPackageOption pkgs "pinentry" { default = [ "pinentry-tty" ]; };
pinentry = mkOption {
type = types.str;
default = "tty";
example = "gtk2";
description = "Which pinentry interface to use";
};
};
config = lib.mkIf cfg.enable {
@ -17,15 +22,10 @@ in
services.gpg-agent = {
enable = true;
enableSshSupport = true; # One agent to rule them all
pinentryPackage = cfg.pinentry;
pinentryFlavor = cfg.pinentry;
extraConfig = ''
allow-loopback-pinentry
'';
};
home.shellAliases = {
# Sometime `gpg-agent` errors out...
reset-agent = "gpg-connect-agent updatestartuptty /bye";
};
};
}

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.htop;
in
{
options.my.home.htop = with lib; {
enable = my.mkDisableOption "htop configuration";
options.my.home.htop = with lib.my; {
enable = mkDisableOption "htop configuration";
};
config.programs.htop = lib.mkIf cfg.enable {

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.jq;
in
{
options.my.home.jq = with lib; {
enable = my.mkDisableOption "jq configuration";
options.my.home.jq = with lib.my; {
enable = mkDisableOption "jq configuration";
};
config.programs.jq = lib.mkIf cfg.enable {

View file

@ -8,7 +8,7 @@ let
realName = lib.mkDefault "Bruno BELANYI";
userName = lib.mkDefault (mkMailAddress address domain);
passwordCommand =
lib.mkDefault [ (lib.getExe pkgs.ambroisie.rbw-pass) "Mail" passName ];
lib.mkDefault [ "${pkgs.ambroisie.bw-pass}/bin/bw-pass" "Mail" passName ];
address = mkMailAddress address domain;
aliases = builtins.map (lib.flip mkMailAddress domain) aliases;
@ -17,7 +17,6 @@ let
himalaya = {
enable = cfg.himalaya.enable;
# FIXME: try to actually configure it at some point
};
msmtp = {

View file

@ -15,7 +15,7 @@ in
enable = my.mkDisableOption "email configuration";
himalaya = {
enable = mkEnableOption "himalaya configuration";
enable = mkRelatedOption "himalaya configuration";
};
msmtp = {

View file

@ -9,7 +9,7 @@ in
settings = {
notify-cmd =
let
notify-send = lib.getExe pkgs.libnotify;
notify-send = "${pkgs.libnotify}/bin/notify-send";
in
pkgs.writeScript "mail-notifier" ''
SENDER="$1"

View file

@ -13,8 +13,6 @@ in
scripts = [
pkgs.mpvScripts.mpris # Allow controlling using media keys
pkgs.mpvScripts.mpv-cheatsheet # Show some simple mappings on '?'
pkgs.mpvScripts.uosc # Nicer UI
];
};
};

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.nix-index;
in
{
options.my.home.nix-index = with lib; {
enable = my.mkDisableOption "nix-index configuration";
options.my.home.nix-index = with lib.my; {
enable = mkDisableOption "nix-index configuration";
};
config.programs.nix-index = lib.mkIf cfg.enable {

View file

@ -6,10 +6,6 @@ in
options.my.home.packages = with lib; {
enable = my.mkDisableOption "user packages";
allowAliases = mkEnableOption "allow package aliases";
allowUnfree = my.mkDisableOption "allow unfree packages";
additionalPackages = mkOption {
type = with types; listOf package;
default = [ ];
@ -21,15 +17,11 @@ in
};
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; ([
fd
file
ripgrep
] ++ cfg.additionalPackages);
nixpkgs.config = {
inherit (cfg) allowAliases allowUnfree;
};
};
config.home.packages = with pkgs; lib.mkIf cfg.enable ([
fd
file
mosh
ripgrep
termite.terminfo
] ++ cfg.additionalPackages);
}

36
home/pager/default.nix Normal file
View file

@ -0,0 +1,36 @@
{ config, lib, ... }:
let
cfg = config.my.home.pager;
in
{
options.my.home.pager = with lib.my; {
enable = mkDisableOption "pager configuration";
};
config = lib.mkIf cfg.enable {
home.sessionVariables = {
# My default pager
PAGER = "less";
# Clear the screen on start and exit
LESS = "-R -+X -c";
};
programs.zsh.localVariables = {
# Colored man pages
LESS_TERMCAP_mb = "$(tput bold; tput setaf 2)";
LESS_TERMCAP_md = "$(tput bold; tput setaf 6)";
LESS_TERMCAP_me = "$(tput sgr0)";
LESS_TERMCAP_so = "$(tput bold; tput setaf 3; tput setab 4)";
LESS_TERMCAP_se = "$(tput rmso; tput sgr0)";
LESS_TERMCAP_us = "$(tput bold; tput setaf 2)";
LESS_TERMCAP_ue = "$(tput rmul; tput sgr0)";
LESS_TERMCAP_mr = "$(tput rev)";
LESS_TERMCAP_mh = "$(tput dim)";
LESS_TERMCAP_ZN = "$(tput ssubm)";
LESS_TERMCAP_ZV = "$(tput rsubm)";
LESS_TERMCAP_ZO = "$(tput ssupm)";
LESS_TERMCAP_ZW = "$(tput rsupm)";
};
};
}

55
home/ssh/default.nix Normal file
View file

@ -0,0 +1,55 @@
{ config, lib, ... }:
let
cfg = config.my.home.ssh;
in
{
options.my.home.ssh = with lib.my; {
enable = mkDisableOption "ssh configuration";
};
config.programs.ssh = lib.mkIf cfg.enable {
enable = true;
matchBlocks = {
"github.com" = {
hostname = "github.com";
identityFile = "~/.ssh/shared_rsa";
user = "git";
};
"gitlab.com" = {
hostname = "gitlab.com";
identityFile = "~/.ssh/shared_rsa";
user = "git";
};
"git.sr.ht" = {
hostname = "git.sr.ht";
identityFile = "~/.ssh/shared_rsa";
user = "git";
};
"gitea.belanyi.fr" = {
hostname = "gitea.belanyi.fr";
identityFile = "~/.ssh/shared_rsa";
user = "git";
};
porthos = {
hostname = "91.121.177.163";
identityFile = "~/.ssh/shared_rsa";
user = "ambroisie";
};
work = {
hostname = "workspaces.dgexsol.fr";
identityFile = "~/.ssh/shared_rsa";
user = "bruno_belanyi";
};
};
extraConfig = ''
AddKeysToAgent yes
'';
};
}

View file

@ -10,14 +10,13 @@ let
in
{
imports = [
./alacritty
./termite
];
options.my.home = with lib; {
terminal = {
program = mkOption {
type = with types; nullOr (enum [ "alacritty" "termite" ]);
type = with types; nullOr (enum [ "termite" ]);
default = null;
example = "termite";
description = "Which terminal to use for home session";

62
home/tmux/default.nix Normal file
View file

@ -0,0 +1,62 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.tmux;
hasGUI = config.my.home.x.enable || (config.my.home.wm != null);
in
{
options.my.home.tmux = with lib.my; {
enable = mkDisableOption "tmux terminal multiplexer";
};
config.programs.tmux = lib.mkIf cfg.enable {
enable = true;
keyMode = "vi"; # Home-row keys and other niceties
clock24 = true; # I'm one of those heathens
escapeTime = 0; # Let vim do its thing instead
historyLimit = 50000; # Bigger buffer
terminal = "tmux-256color"; # I want accurate termcap info
plugins = with pkgs.tmuxPlugins; [
# Open high-lighted files in copy mode
open
# Better pane management
pain-control
# Better session management
sessionist
(lib.optionalAttrs hasGUI {
# X clipboard integration
plugin = yank;
extraConfig = ''
# Use 'clipboard' because of misbehaving apps (e.g: firefox)
set -g @yank_selection_mouse 'clipboard'
# Stay in copy mode after yanking
set -g @yank_action 'copy-pipe'
'';
})
{
# Show when prefix has been pressed
plugin = prefix-highlight;
extraConfig = ''
# Also show when I'm in copy or sync mode
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_show_sync_mode 'on'
# Show prefix mode in status bar
set -g status-right '#{prefix_highlight} %a %Y-%m-%d %H:%M'
'';
}
];
extraConfig = ''
# Better vim mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
${
lib.optionalString
(!hasGUI)
"bind-key -T copy-mode-vi 'y' send -X copy-selection"
}
# Block selection in vim mode
bind-key -Tcopy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-toggle
'';
};
}

View file

@ -4,7 +4,3 @@ call ftplugined#check_undo_ft()
" Enable spell checking on commit messages
setlocal spell
let b:undo_ftplugin.='|setlocal spell<'
" Change max length of a line to 72 for this buffer
setlocal colorcolumn=72
let b:undo_ftplugin.='|setlocal colorcolumn<'

View file

@ -1,3 +1,4 @@
lua << EOF
local wk = require("which-key")
local keys = {
@ -8,3 +9,4 @@ local keys = {
}
wk.register(keys, { prefix = "gc" })
EOF

View file

@ -1,3 +1,4 @@
lua << EOF
local wk = require("which-key")
local keys = {
@ -5,3 +6,4 @@ local keys = {
}
wk.register(keys, { prefix = "<leader>" })
EOF

View file

@ -1,3 +1,4 @@
lua << EOF
local wk = require("which-key")
local telescope_builtin = require("telescope.builtin")
@ -13,3 +14,5 @@ local keys = {
}
wk.register(keys, { prefix = "<leader>" })
EOF

View file

@ -1,3 +1,4 @@
lua << EOF
local wk = require("which-key")
local motions = {
@ -28,3 +29,4 @@ local objects = {
wk.register(motions, { mode = "n" })
wk.register(objects, { mode = "o" })
EOF

View file

@ -1,7 +1,6 @@
lua << EOF
local wk = require("which-key")
local lsp = require("ambroisie.lsp")
local keys = {
-- Edition and navigation mappins
["["] = {
@ -32,7 +31,7 @@ local keys = {
x = "XML encode",
y = "C string encode",
-- Custom
d = { lsp.goto_prev_diagnostic, "Previous diagnostic" },
d = { vim.diagnostic.goto_prev, "Previous diagnostic" }
},
["]"] = {
name = "Next",
@ -62,7 +61,7 @@ local keys = {
x = "XML decode",
y = "C string decode",
-- Custom
d = { lsp.goto_next_diagnostic, "Next diagnostic" },
d = { vim.diagnostic.goto_next, "Next diagnostic" }
},
-- Option mappings
@ -71,14 +70,13 @@ local keys = {
b = "Light background",
c = "Cursor line",
d = "Diff",
f = { "<cmd>FormatEnable<CR>", "LSP Formatting" },
e = { "<cmd>lwindow<CR>", "Location list" },
f = { "<cmd>cwindow<CR>", "Quickfix list" },
h = "Search high-lighting",
i = "Case insensitive search",
l = "List mode",
n = "Line numbers",
r = "Relative line numbers",
p = { "<cmd>lwindow<CR>", "Location list" },
q = { "<cmd>cwindow<CR>", "Quickfix list" },
u = "Cursor column",
v = "Virtual editing",
w = "Text wrapping",
@ -90,13 +88,12 @@ local keys = {
b = "Light background",
c = "Cursor line",
d = "Diff",
f = { "<cmd>FormatDisable<CR>", "LSP Formatting" },
e = { "<cmd>lclose<CR>", "Location list" },
f = { "<cmd>cclose<CR>", "Quickfix list" },
h = "Search high-lighting",
i = "Case insensitive search",
l = "List mode",
n = "Line numbers",
p = { "<cmd>lclose<CR>", "Location list" },
q = { "<cmd>cclose<CR>", "Quickfix list" },
r = "Relative line numbers",
u = "Cursor column",
v = "Virtual editing",
@ -109,13 +106,12 @@ local keys = {
b = "Light background",
c = "Cursor line",
d = "Diff",
f = { "<cmd>FormatToggle<CR>", "LSP Formatting" },
e = { "<Plug>(qf_loc_toggle)", "Location list" },
f = { "<Plug>(qf_qf_toggle)", "Quickfix list" },
h = "Search high-lighting",
i = "Case insensitive search",
l = "List mode",
n = "Line numbers",
p = { "<Plug>(qf_loc_toggle)", "Location list" },
q = { "<Plug>(qf_qf_toggle)", "Quickfix list" },
r = "Relative line numbers",
u = "Cursor column",
v = "Virtual editing",
@ -126,3 +122,4 @@ local keys = {
}
wk.register(keys)
EOF

View file

@ -18,16 +18,12 @@ let
];
in
{
options.my.home.vim = with lib; {
enable = my.mkDisableOption "vim configuration";
options.my.home.vim = with lib.my; {
enable = mkDisableOption "vim configuration";
};
config.programs.neovim = lib.mkIf cfg.enable {
enable = true;
# This is the best editor
defaultEditor = true;
# All the aliases
viAlias = true;
vimAlias = true;
@ -35,7 +31,7 @@ in
plugins = with pkgs.vimPlugins; [
# Theming
gruvbox-nvim # Nice dark theme
vim-gruvbox8 # Nice dark theme
lualine-nvim # A lua-based status line
lualine-lsp-progress # Show progress for LSP servers
@ -54,35 +50,34 @@ in
vim-beancount
vim-jsonnet
vim-nix
vim-pandoc
vim-pandoc-syntax
vim-toml
# General enhancements
vim-qf # Better quick-fix list
nvim-osc52 # Send clipboard data through terminal escape for SSH
# Other wrappers
git-messenger-vim # A simple blame window
# LSP and linting
nvim-lspconfig # Easy LSP configuration
lsp-format-nvim # Simplified formatting configuration
lsp_lines-nvim # Show diagnostics *over* regions
none-ls-nvim # LSP integration for linters and formatters
nvim-treesitter.withAllGrammars # Better highlighting
null-ls-nvim # LSP integration for linters and formatters
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) # Better highlighting
nvim-treesitter-textobjects # More textobjects
nvim-ts-context-commentstring # Comment string in nested language blocks
plenary-nvim # 'null-ls', 'telescope' dependency
# Completion
luasnip # Snippet manager compatible with LSP
friendly-snippets # LSP snippets collection
nvim-cmp # Completion engine
cmp-async-path # More responsive path completion
cmp-buffer # Words from open buffers
cmp-nvim-lsp # LSP suggestions
cmp-nvim-lua # NeoVim lua API
cmp-path # Path name suggestions
cmp-under-comparator # Sort items that start with '_' lower
cmp_luasnip # Snippet suggestions from LuaSnip
friendly-snippets # LSP snippets collection
luasnip # Snippet manager compatible with LSP
# UX improvements
dressing-nvim # Integrate native UI hooks with Telescope etc...
@ -105,7 +100,7 @@ in
nixpkgs-fmt
# Shell
nodePackages.bash-language-server
shellcheck
shfmt
];
};

View file

@ -0,0 +1,2 @@
" Use Automake filetype for `local.am` files, explicit `set` to force override
au BufNewFile,BufRead local.am set filetype=automake

View file

@ -0,0 +1,3 @@
" Use Tiger filetype for programs and header files
au BufNewFile,BufRead *.tig setfiletype tiger
au BufNewFile,BufRead *.tih setfiletype tiger

View file

@ -0,0 +1,2 @@
" Use LaTeX filetype for TikZ files
au BufNewFile,BufRead *.tikz setfiletype tex

View file

@ -66,11 +66,6 @@ set list
" Show a tab as an arrow, trailing spaces as ¤, non-breaking spaces as dots
set listchars=tab:>,trail,nbsp
" Use patience diff
set diffopt+=algorithm:patience
" Align similar lines in each hunk
set diffopt+=linematch:50
" Don't redraw when executing macros
set lazyredraw
@ -80,33 +75,17 @@ set timeoutlen=500
" Timeout quickly for CursorHold events (and also swap file)
set updatetime=250
" Disable all mouse integrations
set mouse=
" Set dark mode by default
set background=dark
" Include plug-in integration
let g:gruvbox_plugin_hi_groups=1
" Include filetype integration
let g:gruvbox_filetype_hi_groups=1
" 24 bit colors
set termguicolors
" Setup some overrides for gruvbox
lua << EOF
local gruvbox = require("gruvbox")
local colors = gruvbox.palette
gruvbox.setup({
overrides = {
-- Only URLs should be underlined
["@string.special.path"] = { link = "GruvboxOrange" },
-- Revert back to the better diff highlighting
DiffAdd = { fg = colors.green, bg = "NONE" },
DiffChange = { fg = colors.aqua, bg = "NONE" },
DiffDelete = { fg = colors.red, bg = "NONE" },
DiffText = { fg = colors.yellow, bg = colors.bg0 },
}
})
EOF
" Use my preferred colorscheme
colorscheme gruvbox
colorscheme gruvbox8
" }}}
" Search parameters {{{
@ -119,10 +98,12 @@ set ignorecase
set smartcase
" }}}
" Project-local settings {{{
" Import settings when inside a git repository {{{
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Securely read `.nvim.lua` or `.nvimrc`.
set exrc
let git_settings=system("git config --get vim.settings")
if strlen(git_settings)
exe "set" git_settings
endif
" }}}
" vim: foldmethod=marker

View file

@ -0,0 +1,84 @@
local M = {}
-- shared LSP configuration callback
-- @param client native client configuration
-- @param bufnr int? buffer number of the attched client
M.on_attach = function(client, bufnr)
-- Diagnostics
vim.diagnostic.config({
-- Disable virtual test next to affected regions
virtual_text = false,
-- Show diagnostics signs
signs = true,
-- Underline offending regions
underline = true,
-- Do not bother me in the middle of insertion
update_in_insert = false,
-- Show highest severity first
severity_sort = true,
})
vim.cmd([[
augroup DiagnosticsHover
autocmd! * <buffer>
" Show diagnostics on "hover"
autocmd CursorHold,CursorHoldI <buffer> lua vim.diagnostic.open_float(nil, {focus=false, scope="cursor"})
augroup END
]])
-- Format on save
if client.resolved_capabilities.document_formatting then
vim.cmd([[
augroup LspFormatting
autocmd! * <buffer>
autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
augroup END
]])
end
-- Mappings
local wk = require("which-key")
local function list_workspace_folders()
local utils = require("ambroisie.utils")
utils.dump(vim.lsp.buf.list_workspace_folders())
end
local function show_line_diagnostics()
vim.diagnostic.open_float(nil, { scope="line" })
end
local function show_buffer_diagnostics()
vim.diagnostic.open_float(nil, { scope="buffer" })
end
local keys = {
K = { vim.lsp.buf.hover, "Show symbol information" },
["<C-k>"] = { vim.lsp.buf.signature_help, "Show signature information" },
["gd"] = { vim.lsp.buf.definition, "Go to definition" },
["gD"] = { vim.lsp.buf.declaration, "Go to declaration" },
["gi"] = { vim.lsp.buf.implementation, "Go to implementation" },
["gr"] = { vim.lsp.buf.references, "List all references" },
["<leader>c"] = {
name = "Code",
a = { vim.lsp.buf.code_action, "Code actions" },
d = { show_line_diagnostics, "Show line diagnostics" },
D = { show_buffer_diagnostics, "Show buffer diagnostics" },
r = { vim.lsp.buf.rename, "Rename symbol" },
s = { vim.lsp.buf.signature_help, "Show signature" },
t = { vim.lsp.buf.type_definition, "Go to type definition" },
w = {
name = "Workspace",
a = { vim.lsp.buf.add_workspace_folder, "Add folder to workspace" },
l = { list_workspace_folders, "List folders in workspace" },
r = { vim.lsp.buf.remove_workspace_folder, "Remove folder from workspace" },
},
},
}
wk.register(keys, { buffer = bufnr })
end
return M

View file

@ -0,0 +1,37 @@
local M = {}
-- pretty print lua object
-- @param obj any object to pretty print
M.dump = function(obj)
print(vim.inspect(obj))
end
--- checks if a given command is executable
---@param cmd string? command to check
---@return boolean executable
M.is_executable = function(cmd)
return cmd and vim.fn.executable(cmd) == 1
end
--- return a function that checks if a given command is executable
---@param cmd string? command to check
---@return fun(cmd: string): boolean executable
M.is_executable_condition = function(cmd)
return function() return M.is_executable(cmd) end
end
-- list all active LSP clients for current buffer
-- @param bufnr int? buffer number
-- @return table all active LSP client names
M.list_lsp_clients = function(bufnr)
local clients = vim.lsp.buf_get_clients(bufnr)
local names = {}
for _, client in ipairs(clients) do
table.insert(names, client.name)
end
return names
end
return M

View file

@ -0,0 +1,5 @@
" A few useful sets of abbreviations
" A few things that are hard to write in ASCII
abbreviate (R) ©
abbreviate (TM)

View file

@ -0,0 +1,13 @@
" Idea for toggling taken from jeffkreeftmeijer
" Show line numbers
set number
augroup numbertoggle
autocmd!
" Toggle numbers between relative and absolute when changing buffers
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
" Disable line numbers and relative line numbers in terminal
autocmd TermOpen * setlocal nonu nornu
augroup END

View file

@ -1,6 +1,7 @@
-- Show completion menu in all cases, and don't select anything
vim.opt.completeopt = { "menu", "menuone", "noselect" }
" Show completion menu in all cases, and don't select anything
set completeopt=menu,menuone,noselect
lua << EOF
local cmp = require("cmp")
local cmp_under_comparator = require("cmp-under-comparator")
local luasnip = require("luasnip")
@ -28,7 +29,7 @@ cmp.setup({
end,
["<C-n>"] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), { "i", "c" }),
["<C-p>"] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), { "i", "c" }),
["<C-d>"] = cmp.mapping.scroll_docs(-5),
["<C-d>"] = cmp.mapping.scroll_docs(-5),
["<C-f>"] = cmp.mapping.scroll_docs(5),
["<C-y>"] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }),
["<C-e>"] = cmp.mapping.abort(),
@ -37,7 +38,7 @@ cmp.setup({
entries = "native",
},
sources = {
{ name = "async_path", priority_weight = 110 },
{ name = "path", priority_weight = 110 },
{ name = "nvim_lsp", priority_weight = 100 },
{ name = "nvim_lua", priority_weight = 90 },
{ name = "luasnip", priority_weight = 80 },
@ -60,3 +61,4 @@ cmp.setup({
ghost_text = true,
},
})
EOF

View file

@ -1,6 +1,8 @@
lua << EOF
local dressing = require("dressing")
dressing.setup({
-- Use a relative prompt size
prefer_width = 0.4,
})
EOF

View file

@ -0,0 +1,5 @@
" Intercept all fold commands
let g:fastfold_fold_command_suffixes=[
\ 'x', 'X', 'a', 'A', 'o', 'O', 'c', 'C',
\ 'r', 'R', 'm', 'M', 'i', 'n', 'N'
\ ]

View file

@ -1,7 +1,11 @@
local gitsigns = require("gitsigns")
lua << EOF
local gitsigns = require('gitsigns')
local wk = require("which-key")
gitsigns.setup({
-- I dislike the full-green sign column when this happens
attach_to_untracked = false,
current_line_blame_opts = {
-- Show the blame quickly
delay = 100,
@ -13,13 +17,13 @@ local keys = {
["[c"] = { "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", "Previous hunk/diff", expr = true },
["]c"] = { "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", "Next hunk/diff", expr = true },
-- Commands
["<leader>g"] = {
name = "Git",
-- Actions
b = { gitsigns.toggle_current_line_blame, "Toggle blame virtual text" },
d = { gitsigns.diffthis, "Diff buffer" },
-- stylua: ignore
D = { function() gitsigns.diffthis("~") end, "Diff buffer against last commit" },
g = { "<cmd>Git<CR>", "Git status" },
h = { gitsigns.toggle_deleted, "Show deleted hunks" },
@ -56,3 +60,4 @@ local visual = {
wk.register(keys, { buffer = bufnr })
wk.register(objects, { buffer = bufnr, mode = "o" })
wk.register(visual, { buffer = bufnr, mode = "x" })
EOF

View file

@ -0,0 +1,41 @@
lua << EOF
local lspconfig = require("lspconfig")
local lsp = require("ambroisie.lsp")
local utils = require("ambroisie.utils")
-- Inform servers we are able to do completion, snippets, etc...
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
-- C/C++
if utils.is_executable("clangd") then
lspconfig.clangd.setup({
capabilities = capabilities,
on_attach = lsp.on_attach,
})
end
-- Nix
if utils.is_executable("rnix-lsp") then
lspconfig.rnix.setup({
capabilities = capabilities,
on_attach = lsp.on_attach,
})
end
-- Python
if utils.is_executable("pyright") then
lspconfig.pyright.setup({
capabilities = capabilities,
on_attach = lsp.on_attach,
})
end
-- Rust
if utils.is_executable("rust-analyzer") then
lspconfig.rust_analyzer.setup({
capabilities = capabilities,
on_attach = lsp.on_attach,
})
end
EOF

View file

@ -1,3 +1,4 @@
lua << EOF
local lualine = require("lualine")
local utils = require("ambroisie.utils")
@ -10,7 +11,7 @@ local function list_spell_languages()
end
local function list_lsp_clients()
local client_names = utils.list_lsp_clients(0)
local client_names = utils.list_lsp_clients()
if #client_names == 0 then
return ""
@ -59,3 +60,4 @@ lualine.setup({
"quickfix",
},
})
EOF

View file

@ -0,0 +1,3 @@
lua << EOF
require("luasnip.loaders.from_vscode").load()
EOF

View file

@ -0,0 +1,125 @@
lua << EOF
local null_ls = require("null-ls")
local lsp = require("ambroisie.lsp")
local utils = require("ambroisie.utils")
null_ls.setup({
on_attach = lsp.on_attach,
})
-- C, C++
null_ls.register({
null_ls.builtins.formatting.clang_format.with({
-- Only used if available, but prefer clangd formatting if available
condition = function()
return utils.is_executable("clang-format") and not utils.is_executable("clangd")
end,
}),
})
-- Haskell
null_ls.register({
null_ls.builtins.formatting.brittany.with({
-- Only used if available
condition = utils.is_executable_condition("brittany"),
}),
})
-- Nix
null_ls.register({
null_ls.builtins.formatting.nixpkgs_fmt.with({
-- Only used if available, but prefer rnix if available
condition = function()
return utils.is_executable("nixpkgs-fmt") and not utils.is_executable("rnix-lsp")
end,
}),
})
-- Python
null_ls.register({
null_ls.builtins.diagnostics.flake8.with({
-- Only used if available, but prefer pflake8 if available
condition = function()
return utils.is_executable("flake8") and not utils.is_executable("pflake8")
end,
}),
null_ls.builtins.diagnostics.pyproject_flake8.with({
-- Only used if available
condition = utils.is_executable_condition("pflake8"),
}),
null_ls.builtins.diagnostics.mypy.with({
-- Only used if available
condition = utils.is_executable_condition("mypy"),
}),
null_ls.builtins.diagnostics.pylint.with({
-- Only used if available
condition = utils.is_executable_condition("pylint"),
}),
null_ls.builtins.formatting.black.with({
extra_args = { "--fast" },
-- Only used if available
condition = utils.is_executable_condition("black"),
}),
null_ls.builtins.formatting.isort.with({
-- Only used if available
condition = utils.is_executable_condition("isort"),
}),
})
-- Shell (non-POSIX)
null_ls.register({
null_ls.builtins.code_actions.shellcheck.with({
-- Restrict to bash and zsh
filetypes = { "bash", "zsh" },
-- Only used if available
condition = utils.is_executable_condition("shellcheck"),
}),
null_ls.builtins.diagnostics.shellcheck.with({
-- Show error code in message
diagnostics_format = "[#{c}] #{m}",
-- Require explicit empty string test, use bash dialect
extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" },
-- Restrict to bash and zsh
filetypes = { "bash", "zsh" },
-- Only used if available
condition = utils.is_executable_condition("shellcheck"),
}),
null_ls.builtins.formatting.shfmt.with({
-- Indent with 4 spaces, simplify the code, indent switch cases,
-- add space after redirection, use bash dialect
extra_args = { "-i", "4", "-s", "-ci", "-sr", "-ln", "bash" },
-- Restrict to bash and zsh
filetypes = { "bash", "zsh" },
-- Only used if available
condition = utils.is_executable_condition("shfmt"),
}),
})
-- Shell (POSIX)
null_ls.register({
null_ls.builtins.code_actions.shellcheck.with({
-- Restrict to POSIX sh
filetypes = { "sh" },
-- Only used if available
condition = utils.is_executable_condition("shellcheck"),
}),
null_ls.builtins.diagnostics.shellcheck.with({
-- Show error code in message
diagnostics_format = "[#{c}] #{m}",
-- Require explicit empty string test
extra_args = { "-o", "avoid-nullary-conditions" },
-- Restrict to POSIX sh
filetypes = { "sh" },
-- Only used if available
condition = utils.is_executable_condition("shellcheck"),
}),
null_ls.builtins.formatting.shfmt.with({
-- Indent with 4 spaces, simplify the code, indent switch cases,
-- add space after redirection, use POSIX
extra_args = { "-i", "4", "-s", "-ci", "-sr", "-ln", "posix" },
-- Only used if available
condition = utils.is_executable_condition("shfmt"),
}),
})
EOF

View file

@ -0,0 +1,20 @@
" Which code-block languages should I expect to be high-lighted.
let g:pandoc#syntax#codeblocks#embeds#langs=[
\ "bash=sh",
\ "c",
\ "cpp",
\ "go",
\ "haskell",
\ "python",
\ "rust",
\ "sh",
\ "vim",
\ "yaml",
\ "tex",
\ "toml",
\ "perl",
\ "json",
\ "latex=tex",
\ "make",
\ "makefile=make",
\ ]

View file

@ -1,3 +1,5 @@
lua << EOF
require("nvim-surround").setup({
-- No configuration at the moment
})
EOF

View file

@ -1,3 +1,4 @@
lua << EOF
local telescope = require("telescope")
telescope.setup({
@ -7,8 +8,8 @@ telescope.setup({
["<C-h>"] = "which_key",
-- I want the normal readline mappings rather than scrolling
["<C-u>"] = false,
},
},
}
}
},
extensions = {
fzf = {
@ -22,3 +23,4 @@ telescope.setup({
telescope.load_extension("fzf")
telescope.load_extension("lsp_handlers")
EOF

View file

@ -1,3 +1,4 @@
lua << EOF
local ts_config = require("nvim-treesitter.configs")
ts_config.setup({
highlight = {
@ -8,6 +9,9 @@ ts_config.setup({
indent = {
enable = true,
},
context_commentstring = {
enable = true,
},
textobjects = {
select = {
enable = true,
@ -51,3 +55,4 @@ ts_config.setup({
},
},
})
EOF

View file

@ -1,2 +1,4 @@
lua << EOF
local wk = require("which-key")
wk.setup()
EOF

View file

@ -0,0 +1,8 @@
augroup signtoggle
autocmd!
" Only show the sign column for the current focused buffer
autocmd BufEnter,FocusGained,WinEnter * set signcolumn=yes
autocmd BufLeave,FocusLost,WinLeave * set signcolumn=no
" Disable the sign column in terminal
autocmd TermOpen * setlocal signcolumn=no
augroup END

View file

@ -8,7 +8,7 @@ in
{
config = lib.mkIf cfg.enable {
home.pointerCursor = {
package = pkgs.vimix-cursors;
package = pkgs.ambroisie.vimix-cursors;
name = "Vimix-cursors";
x11 = {

Some files were not shown because too many files have changed in this diff Show more