diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ad6275 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.direnv diff --git a/flake.nix b/flake.nix index 39f6fb0..c9e6c92 100644 --- a/flake.nix +++ b/flake.nix @@ -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; } diff --git a/system/default.nix b/system/default.nix index b5bc730..8d2ca14 100644 --- a/system/default.nix +++ b/system/default.nix @@ -20,8 +20,6 @@ file lsof usbutils # lsusb - age - sops ]; services.smartd.enable = true; diff --git a/user/modules/applications/editor/nvim/plugins/format.nix b/user/modules/applications/editor/nvim/plugins/format.nix index d55c084..a1b8f06 100644 --- a/user/modules/applications/editor/nvim/plugins/format.nix +++ b/user/modules/applications/editor/nvim/plugins/format.nix @@ -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 = [ @@ -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 } } },