Skip to content

Commit

Permalink
build: remove taskfile, using nix-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Mar 22, 2024
1 parent db2aa80 commit 6576a22
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 61 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ for several machines and VMs I use.
To apply updates, simply run:

```bash
task update apply
dot-sync
```

# Clean up

```sh
nix-collect-garbage
nix-collect-garbage -d
```
51 changes: 0 additions & 51 deletions Taskfile.yaml

This file was deleted.

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.

23 changes: 21 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,27 @@
{
default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
go-task
neofetch
(writeScriptBin "dot-release" ''
git tag -m "$(date +%Y.%m.%d)" "$(date +%Y.%m.%d)"
git push --tags
goreleaser release --clean
'')
(writeScriptBin "dot-sync" ''
git pull --rebase origin main
nix flake update
nix-apply
nix-collect-garbage -d
nix-apply
'')
(writeScriptBin "nix-apply" ''
if test $(uname -s) == "Linux"; then
sudo nixos-rebuild switch --flake .#
fi
if test $(uname -s) == "Darwin"; then
nix build "./#darwinConfigurations.$(hostname | cut -f1 -d'.').system"
./result/sw/bin/darwin-rebuild switch --flake .
fi
'')
];
};
});
Expand Down

0 comments on commit 6576a22

Please sign in to comment.