uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
55
nixos/modules/services/networking/nar-serve.nix
Normal file
55
nixos/modules/services/networking/nar-serve.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.nar-serve;
|
||||
in
|
||||
{
|
||||
meta = {
|
||||
maintainers = [ maintainers.rizary ];
|
||||
};
|
||||
options = {
|
||||
services.nar-serve = {
|
||||
enable = mkEnableOption "Serve NAR file contents via HTTP";
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8383;
|
||||
description = ''
|
||||
Port number where nar-serve will listen on.
|
||||
'';
|
||||
};
|
||||
|
||||
cacheURL = mkOption {
|
||||
type = types.str;
|
||||
default = "https://cache.nixos.org/";
|
||||
description = ''
|
||||
Binary cache URL to connect to.
|
||||
|
||||
The URL format is compatible with the nix remote url style, such as:
|
||||
- http://, https:// for binary caches via HTTP or HTTPS
|
||||
- s3:// for binary caches stored in Amazon S3
|
||||
- gs:// for binary caches stored in Google Cloud Storage
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.nar-serve = {
|
||||
description = "NAR server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
environment.PORT = toString cfg.port;
|
||||
environment.NAR_CACHE_URL = cfg.cacheURL;
|
||||
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
ExecStart = "${pkgs.nar-serve}/bin/nar-serve";
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue