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/dnsmasq.nix
|
||||||
./services/networking/docker-registry-server.nix
|
./services/networking/docker-registry-server.nix
|
||||||
./services/networking/ejabberd.nix
|
./services/networking/ejabberd.nix
|
||||||
|
./services/networking/fan.nix
|
||||||
./services/networking/firefox/sync-server.nix
|
./services/networking/firefox/sync-server.nix
|
||||||
./services/networking/firewall.nix
|
./services/networking/firewall.nix
|
||||||
./services/networking/flashpolicyd.nix
|
./services/networking/flashpolicyd.nix
|
||||||
@ -344,7 +345,6 @@
|
|||||||
./services/networking/tlsdated.nix
|
./services/networking/tlsdated.nix
|
||||||
./services/networking/tox-bootstrapd.nix
|
./services/networking/tox-bootstrapd.nix
|
||||||
./services/networking/tvheadend.nix
|
./services/networking/tvheadend.nix
|
||||||
./services/networking/ubuntu-fan.nix
|
|
||||||
./services/networking/unbound.nix
|
./services/networking/unbound.nix
|
||||||
./services/networking/unifi.nix
|
./services/networking/unifi.nix
|
||||||
./services/networking/vsftpd.nix
|
./services/networking/vsftpd.nix
|
||||||
|
@ -4,7 +4,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.networking.ubuntu-fan;
|
cfg = config.networking.fan;
|
||||||
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
|
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
|
||||||
|
|
||||||
in
|
in
|
||||||
@ -15,9 +15,9 @@ in
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
networking.ubuntu-fan = {
|
networking.fan = {
|
||||||
|
|
||||||
enable = mkEnableOption "Ubuntu FAN Networking";
|
enable = mkEnableOption "FAN Networking";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = [ pkgs.fanctl ];
|
environment.systemPackages = [ pkgs.fanctl ];
|
||||||
|
|
||||||
systemd.services.ubuntu-fan = {
|
systemd.services.fan = {
|
||||||
description = "Ubuntu FAN Networking";
|
description = "FAN Networking";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
before = [ "docker.service" ];
|
before = [ "docker.service" ];
|
||||||
@ -40,12 +40,12 @@ in
|
|||||||
if [ ! -f /proc/sys/net/fan/version ]; then
|
if [ ! -f /proc/sys/net/fan/version ]; then
|
||||||
${modprobe} ipip
|
${modprobe} ipip
|
||||||
if [ ! -f /proc/sys/net/fan/version ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /var/lib/ubuntu-fan
|
mkdir -p /var/lib/fan-networking
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
# if that files does not exist, dnsmasq subsequently fails,
|
# if that files does not exist, dnsmasq subsequently fails,
|
||||||
# so we'll use /dev/null.
|
# 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 = ''
|
buildPhase = ''
|
||||||
substituteInPlace fanctl \
|
substituteInPlace fanctl \
|
||||||
--replace '--conf-file= ' \
|
--replace '--conf-file= ' \
|
||||||
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||||||
'/var/lib/ubuntu-fan'
|
'/var/lib/ubuntu-fan'
|
||||||
|
|
||||||
sed -i '/dnsmasq -u/i \
|
sed -i '/dnsmasq -u/i \
|
||||||
mkdir -p /var/lib/ubuntu-fan' fanctl
|
mkdir -p /var/lib/fan-networking' fanctl
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user