nixos: rename service 'ubuntu-fan' as 'fan'
This commit is contained in:
parent
1be2b63d27
commit
648973d641
@ -279,6 +279,7 @@
|
||||
./services/networking/dnsmasq.nix
|
||||
./services/networking/docker-registry-server.nix
|
||||
./services/networking/ejabberd.nix
|
||||
./services/networking/fan.nix
|
||||
./services/networking/firefox/sync-server.nix
|
||||
./services/networking/firewall.nix
|
||||
./services/networking/flashpolicyd.nix
|
||||
@ -344,7 +345,6 @@
|
||||
./services/networking/tlsdated.nix
|
||||
./services/networking/tox-bootstrapd.nix
|
||||
./services/networking/tvheadend.nix
|
||||
./services/networking/ubuntu-fan.nix
|
||||
./services/networking/unbound.nix
|
||||
./services/networking/unifi.nix
|
||||
./services/networking/vsftpd.nix
|
||||
|
@ -4,7 +4,7 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.networking.ubuntu-fan;
|
||||
cfg = config.networking.fan;
|
||||
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
|
||||
|
||||
in
|
||||
@ -15,9 +15,9 @@ in
|
||||
|
||||
options = {
|
||||
|
||||
networking.ubuntu-fan = {
|
||||
networking.fan = {
|
||||
|
||||
enable = mkEnableOption "Ubuntu FAN Networking";
|
||||
enable = mkEnableOption "FAN Networking";
|
||||
|
||||
};
|
||||
|
||||
@ -30,8 +30,8 @@ in
|
||||
|
||||
environment.systemPackages = [ pkgs.fanctl ];
|
||||
|
||||
systemd.services.ubuntu-fan = {
|
||||
description = "Ubuntu FAN Networking";
|
||||
systemd.services.fan = {
|
||||
description = "FAN Networking";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
before = [ "docker.service" ];
|
||||
@ -40,12 +40,12 @@ in
|
||||
if [ ! -f /proc/sys/net/fan/version ]; then
|
||||
${modprobe} ipip
|
||||
if [ ! -f /proc/sys/net/fan/version ]; then
|
||||
echo "The Ubuntu Fan Networking patches have not been applied to this kernel!" 1>&2
|
||||
echo "The Fan Networking patches have not been applied to this kernel!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p /var/lib/ubuntu-fan
|
||||
mkdir -p /var/lib/fan-networking
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
# if that files does not exist, dnsmasq subsequently fails,
|
||||
# so we'll use /dev/null.
|
||||
#
|
||||
# Also, make sure /var/lib/ubuntu-fan exists before starting dnsmasq.
|
||||
# Also, make sure /var/lib/fan-networking exists before starting dnsmasq.
|
||||
buildPhase = ''
|
||||
substituteInPlace fanctl \
|
||||
--replace '--conf-file= ' \
|
||||
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
'/var/lib/ubuntu-fan'
|
||||
|
||||
sed -i '/dnsmasq -u/i \
|
||||
mkdir -p /var/lib/ubuntu-fan' fanctl
|
||||
mkdir -p /var/lib/fan-networking' fanctl
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
Loading…
Reference in New Issue
Block a user