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
62
nixos/modules/services/networking/ngircd.nix
Normal file
62
nixos/modules/services/networking/ngircd.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.ngircd;
|
||||
|
||||
configFile = pkgs.stdenv.mkDerivation {
|
||||
name = "ngircd.conf";
|
||||
|
||||
text = cfg.config;
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
buildCommand = ''
|
||||
echo -n "$text" > $out
|
||||
${cfg.package}/sbin/ngircd --config $out --configtest
|
||||
'';
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
services.ngircd = {
|
||||
enable = mkEnableOption "the ngircd IRC server";
|
||||
|
||||
config = mkOption {
|
||||
description = "The ngircd configuration (see ngircd.conf(5)).";
|
||||
|
||||
type = types.lines;
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
description = "The ngircd package.";
|
||||
|
||||
type = types.package;
|
||||
|
||||
default = pkgs.ngircd;
|
||||
defaultText = literalExpression "pkgs.ngircd";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
#!!! TODO: Use ExecReload (see https://github.com/NixOS/nixpkgs/issues/1988)
|
||||
systemd.services.ngircd = {
|
||||
description = "The ngircd IRC server";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig.ExecStart = "${cfg.package}/sbin/ngircd --config ${configFile} --nodaemon";
|
||||
|
||||
serviceConfig.User = "ngircd";
|
||||
};
|
||||
|
||||
users.users.ngircd = {
|
||||
isSystemUser = true;
|
||||
group = "ngircd";
|
||||
description = "ngircd user.";
|
||||
};
|
||||
users.groups.ngircd = {};
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue