-
Notifications
You must be signed in to change notification settings - Fork 101
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 support #31
Add nix support #31
Conversation
Just ignore all |
f3e6a1f
to
c38770d
Compare
33fe780
to
ac5e1fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide a docs for how to use and update them?
更新 flake.nix 版本号修改第 15 行 ...
let
pkgs = import nixpkgs { inherit system; };
inherit (pkgs.lib) licenses;
name = "crproxy";
version = "v0.13.0"; # 修改这个地方为计划发布的版本
in
... 更新
|
nixos 使用方法在 nixos 配置的 flake.nix 中加入 inputs = {
...
crproxy = {
url = "github:DaoCloud/crproxy/v0.13.0"; # 这里版本号可改
inputs.nixpkgs.follows = "nixpkgs";
};
...
};
outputs = {crproxy, ...}: {
nixosConfigurations.gpd = nixpkgs.lib.nixosSystem {
...
modules = [
crproxy.nixosModules.crproxy
{
services.crproxy.enable = true;
}
];
...
};
}; |
https://github.com/search?q=repo%3ANixOS%2Fnixpkgs%20buildGoModule%20AND%20fetchFromGitHub&type=code 我看 nixpkgs 里面, buildGoModule 都是配合 fetchFromGitHub 一起使用的是不是和其保持一致比较好 |
我研究一下这个是不是分成两个 nix 文件比较好, 一个是安装的, 一个是提供服务的 |
可以考虑使用 fetchFromGithub,参考 https://github.com/NixOS/nixpkgs/blob/b61ee8759e6365240d902e2729fed98adaf92ef2/pkgs/by-name/cr/crproxy/package.nix 需要注意的是,未来 nixos 及 nix 包管理器会使用 flake 特性,flake 完全可以跟着对应版本的代码来配置,单独再 fetchFromGithub 的意义也不大了 nixpkg 我已经加入了 crproxy,等 merge NixOS/nixpkgs#356098
只要设置了 |
dc5d74f
to
625acde
Compare
先不提交了,重点考虑官方 nixpkgs |
crproxy can used in nixos
releated issue #30