diff options
author | Philipp Steinpass <philipp@xndr.de> | 2018-04-29 20:36:06 +0200 |
---|---|---|
committer | Philipp Steinpass <philipp@xndr.de> | 2018-05-11 13:54:00 +0200 |
commit | c3dba0b7a79c780ac8359f00d65af29930c7ae20 (patch) | |
tree | a65aeecdd96c1037cd8836a70c56ac390b701dc1 /nixos/modules/services/networking/gnunet.nix | |
parent | 79dcdce63387d8b0c624abbc00d00acaa7912a43 (diff) |
nixos/gnunet: create switch for package.
Diffstat (limited to 'nixos/modules/services/networking/gnunet.nix')
-rw-r--r-- | nixos/modules/services/networking/gnunet.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/gnunet.nix b/nixos/modules/services/networking/gnunet.nix index 02cd53c6fa380..008b09e81a57c 100644 --- a/nixos/modules/services/networking/gnunet.nix +++ b/nixos/modules/services/networking/gnunet.nix @@ -102,6 +102,14 @@ in }; }; + package = mkOption { + type = types.package; + default = pkgs.gnunet; + defaultText = "pkgs.gnunet"; + description = "Overridable attribute of the gnunet package to use."; + example = literalExample "pkgs.gnunet_git"; + }; + extraOptions = mkOption { default = ""; description = '' @@ -130,16 +138,16 @@ in # The user tools that talk to `gnunetd' should come from the same source, # so install them globally. - environment.systemPackages = [ pkgs.gnunet ]; + environment.systemPackages = [ cfg.package ]; systemd.services.gnunet = { description = "GNUnet"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.gnunet pkgs.miniupnpc ]; + path = [ cfg.package pkgs.miniupnpc ]; environment.TMPDIR = "/tmp"; serviceConfig.PrivateTemp = true; - serviceConfig.ExecStart = "${pkgs.gnunet}/lib/gnunet/libexec/gnunet-service-arm -c ${configFile}"; + serviceConfig.ExecStart = "${cfg.package}/lib/gnunet/libexec/gnunet-service-arm -c ${configFile}"; serviceConfig.User = "gnunet"; serviceConfig.UMask = "0007"; serviceConfig.WorkingDirectory = homeDir; |