Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nix flake for dev shell #3702

Merged
merged 5 commits into from
May 13, 2024
Merged

Conversation

6543
Copy link
Member

@6543 6543 commented May 13, 2024

To try it you need nix installed nix-daemon running and your user has to be member of the nix-users group. Or use NixOS.

then by just:

nix develop -c $SHELL

a dedicated development environment with all needed packages will be created.

@6543 6543 added the devx label May 13, 2024
@6543 6543 requested a review from qwerty287 May 13, 2024 16:01
flake.nix Show resolved Hide resolved
@6543
Copy link
Member Author

6543 commented May 13, 2024

@qwerty287 anything else :) - I kind a need it if i want to dev on my nixos laptop 😅

Copy link
Contributor

@qwerty287 qwerty287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No looks good :) (I didn't test it)

@6543 6543 merged commit a700b58 into woodpecker-ci:main May 13, 2024
5 of 7 checks passed
@6543 6543 deleted the add-dev-flake branch May 13, 2024 18:11
@woodpecker-bot
Copy link
Collaborator

@qwerty287
Copy link
Contributor

However, I don't really like having a new config file for every environment. We now have vscode, gitpod, nixos and the "regular" stuff like go install... I don't really like having so many different files doing more or less the same, and one unified file format used by every tool would be pretty nice, but I guess that would be a case of https://xkcd.com/927/...

(Yes, I know that they are all different. VS Code is about installing the extensions there, NixOS about the packages, and Gitpod about a full environment directly usable. Still I don't like it.)

@woodpecker-bot woodpecker-bot mentioned this pull request May 13, 2024
1 task
@6543
Copy link
Member Author

6543 commented May 13, 2024

well i do understand but I would argue that the devs who use the specific thing should just maintain it - and if it's not used we can remove it at some point e.g. wen it not got touched for ~6months or so

@6543
Copy link
Member Author

6543 commented May 13, 2024

in this case if flake.lock is not updated ...

@qwerty287
Copy link
Contributor

Yeah I agree in general but that's not that easy to determine for every environment. A file can be years old and still work flawlessly.
Also, there's no central place where these files are listed. A file in the root dir is seen by everyone, but if you move that to e.g. .github/, that's completely different and the file will more likely be overseen.

Maybe we could use something like codeowners to define maintainers for files if they're external contributors so we also have a list of files like this we could check, but this solution is also not ideal.

@xoxys
Copy link
Member

xoxys commented May 13, 2024

I don't really see why those files have to live in this repo. I have just created a .localdev folder in my local woodpecker repo copy and excluded it in my global gitignore. This folder holds whatever is needed for me to develop woodpecker.

@6543
Copy link
Member Author

6543 commented May 13, 2024

because this is a source of truth other who use nix can also revere too - and it does not hurt at all

@qwerty287
Copy link
Contributor

Maybe we could use a separate repo where we collect files like this and then link to it from the docs? This way we also don't have to do it for every single repo

@6543
Copy link
Member Author

6543 commented May 14, 2024

Well this kind a file is ment to be served from the source code repo, if done otherwhise all the tooling around it do not work

6543 added a commit to 6543-forks/woodpecker that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants