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
50
nixos/modules/services/networking/mullvad-vpn.nix
Normal file
50
nixos/modules/services/networking/mullvad-vpn.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.mullvad-vpn;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.services.mullvad-vpn.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
This option enables Mullvad VPN daemon.
|
||||
This sets <option>networking.firewall.checkReversePath</option> to "loose", which might be undesirable for security.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.kernelModules = [ "tun" ];
|
||||
|
||||
# mullvad-daemon writes to /etc/iproute2/rt_tables
|
||||
networking.iproute2.enable = true;
|
||||
|
||||
# See https://github.com/NixOS/nixpkgs/issues/113589
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
|
||||
systemd.services.mullvad-daemon = {
|
||||
description = "Mullvad VPN daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network.target" ];
|
||||
after = [
|
||||
"network-online.target"
|
||||
"NetworkManager.service"
|
||||
"systemd-resolved.service"
|
||||
];
|
||||
path = [
|
||||
pkgs.iproute2
|
||||
# Needed for ping
|
||||
"/run/wrappers"
|
||||
];
|
||||
startLimitBurst = 5;
|
||||
startLimitIntervalSec = 20;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.mullvad-vpn}/bin/mullvad-daemon -v --disable-stdout-timestamps";
|
||||
Restart = "always";
|
||||
RestartSec = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ ymarkus ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue