Skip to content

Commit

Permalink
feat(nix): use devshell
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Nov 28, 2023
1 parent 4b069f9 commit 492b170
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 12 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
@@ -1,2 +1,3 @@
result
dist
.direnv/
3 changes: 3 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ tasks:
- "git tag -m {{.TAG}} {{.TAG}}"
- "git push --tags"
- "goreleaser release --clean"
changelog:
cmds:
- goreleaser changelog | glow -p -
update:
cmds:
- nix flake update
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
};
})
];

forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.platforms.unix;

nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
overlays = overlays;
});
in
{
nixosConfigurations = {
Expand Down Expand Up @@ -149,5 +156,24 @@
];
};
};

devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
goreleaser = (import goreleaser-nur {
pkgs = pkgs;
});
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
go-task
neovim
goreleaser.goreleaser-pro
neofetch
glow
];
};
});
};
}
1 change: 0 additions & 1 deletion machines/shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
curl
git
jq
neofetch
neovim
unzip
wget
Expand Down
1 change: 1 addition & 0 deletions modules/direnv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ in
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
config = {
global = { load_dotenv = true; };
whitelist = {
Expand Down
5 changes: 4 additions & 1 deletion modules/git.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{ ... }: {
{ pkgs, ... }: {
home.packages = with pkgs; [
git-lfs
];
programs.git = {
enable = true;
delta.enable = true;
Expand Down
4 changes: 0 additions & 4 deletions modules/pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@
entr
fd
ffmpeg_6-full
git-lfs
go-task
graphviz
htmltest
httpstat
hugo
hyperfine
inetutils
jq
moreutils
ncdu
neofetch
netcat-gnu
nmap
nodejs
Expand Down

0 comments on commit 492b170

Please sign in to comment.