tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos: rename service 'ubuntu-fan' as 'fan'
Charles Strahan
10 years ago
648973d6
1be2b63d
+10
-10
3 changed files
expand all
collapse all
unified
split
nixos
modules
module-list.nix
services
networking
fan.nix
pkgs
os-specific
linux
fanctl
default.nix
+1
-1
nixos/modules/module-list.nix
···
279
./services/networking/dnsmasq.nix
280
./services/networking/docker-registry-server.nix
281
./services/networking/ejabberd.nix
0
282
./services/networking/firefox/sync-server.nix
283
./services/networking/firewall.nix
284
./services/networking/flashpolicyd.nix
···
344
./services/networking/tlsdated.nix
345
./services/networking/tox-bootstrapd.nix
346
./services/networking/tvheadend.nix
347
-
./services/networking/ubuntu-fan.nix
348
./services/networking/unbound.nix
349
./services/networking/unifi.nix
350
./services/networking/vsftpd.nix
···
279
./services/networking/dnsmasq.nix
280
./services/networking/docker-registry-server.nix
281
./services/networking/ejabberd.nix
282
+
./services/networking/fan.nix
283
./services/networking/firefox/sync-server.nix
284
./services/networking/firewall.nix
285
./services/networking/flashpolicyd.nix
···
345
./services/networking/tlsdated.nix
346
./services/networking/tox-bootstrapd.nix
347
./services/networking/tvheadend.nix
0
348
./services/networking/unbound.nix
349
./services/networking/unifi.nix
350
./services/networking/vsftpd.nix
+7
-7
nixos/modules/services/networking/ubuntu-fan.nix
nixos/modules/services/networking/fan.nix
···
4
5
let
6
7
-
cfg = config.networking.ubuntu-fan;
8
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
9
10
in
···
15
16
options = {
17
18
-
networking.ubuntu-fan = {
19
20
-
enable = mkEnableOption "Ubuntu FAN Networking";
21
22
};
23
···
30
31
environment.systemPackages = [ pkgs.fanctl ];
32
33
-
systemd.services.ubuntu-fan = {
34
-
description = "Ubuntu FAN Networking";
35
wantedBy = [ "multi-user.target" ];
36
after = [ "network-online.target" ];
37
before = [ "docker.service" ];
···
40
if [ ! -f /proc/sys/net/fan/version ]; then
41
${modprobe} ipip
42
if [ ! -f /proc/sys/net/fan/version ]; then
43
-
echo "The Ubuntu Fan Networking patches have not been applied to this kernel!" 1>&2
44
exit 1
45
fi
46
fi
47
48
-
mkdir -p /var/lib/ubuntu-fan
49
'';
50
serviceConfig = {
51
Type = "oneshot";
···
4
5
let
6
7
+
cfg = config.networking.fan;
8
modprobe = "${config.system.sbin.modprobe}/sbin/modprobe";
9
10
in
···
15
16
options = {
17
18
+
networking.fan = {
19
20
+
enable = mkEnableOption "FAN Networking";
21
22
};
23
···
30
31
environment.systemPackages = [ pkgs.fanctl ];
32
33
+
systemd.services.fan = {
34
+
description = "FAN Networking";
35
wantedBy = [ "multi-user.target" ];
36
after = [ "network-online.target" ];
37
before = [ "docker.service" ];
···
40
if [ ! -f /proc/sys/net/fan/version ]; then
41
${modprobe} ipip
42
if [ ! -f /proc/sys/net/fan/version ]; then
43
+
echo "The Fan Networking patches have not been applied to this kernel!" 1>&2
44
exit 1
45
fi
46
fi
47
48
+
mkdir -p /var/lib/fan-networking
49
'';
50
serviceConfig = {
51
Type = "oneshot";
+2
-2
pkgs/os-specific/linux/fanctl/default.nix
···
17
# if that files does not exist, dnsmasq subsequently fails,
18
# so we'll use /dev/null.
19
#
20
-
# Also, make sure /var/lib/ubuntu-fan exists before starting dnsmasq.
21
buildPhase = ''
22
substituteInPlace fanctl \
23
--replace '--conf-file= ' \
···
26
'/var/lib/ubuntu-fan'
27
28
sed -i '/dnsmasq -u/i \
29
-
mkdir -p /var/lib/ubuntu-fan' fanctl
30
'';
31
32
installPhase = ''
···
17
# if that files does not exist, dnsmasq subsequently fails,
18
# so we'll use /dev/null.
19
#
20
+
# Also, make sure /var/lib/fan-networking exists before starting dnsmasq.
21
buildPhase = ''
22
substituteInPlace fanctl \
23
--replace '--conf-file= ' \
···
26
'/var/lib/ubuntu-fan'
27
28
sed -i '/dnsmasq -u/i \
29
+
mkdir -p /var/lib/fan-networking' fanctl
30
'';
31
32
installPhase = ''