Skip to content

Commit

Permalink
Install dev dependencies of this flake through direnv
Browse files Browse the repository at this point in the history
  • Loading branch information
billy4479 committed Dec 29, 2024
1 parent 2152b61 commit f693365
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.direnv
13 changes: 13 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@
in
{
formatter.${system} = pkgs.nixfmt-rfc-style;

devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
stylua
shfmt
nixfmt-rfc-style

sops
age

wireguard-tools
];
};
}
// hosts;
}
2 changes: 0 additions & 2 deletions system/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
file
lsof
usbutils # lsusb
age
sops
];

services.smartd.enable = true;
Expand Down
7 changes: 4 additions & 3 deletions user/modules/applications/editor/nvim/plugins/format.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ pkgs, ... }:
{
programs.neovim = {
# TODO: move this to flake.nix mkShell
# each project should add their own
# This shouldn't be necessary,
# since every project should install it's own formatters in its flake.
# I leave it here just in case.
extraPackages = with pkgs; [
stylua
];

plugins = [
Expand All @@ -25,6 +25,7 @@
python = { "ruff" },
rust = { "rustfmt", lsp_format = "fallback" },
javascript = { "prettierd", "prettier", stop_after_first = true },
sh = { "shfmt" },
},
formatters = { injected = { options = { ignore_errors = false } } },
Expand Down

0 comments on commit f693365

Please sign in to comment.