diff --git a/modules/installer/tools/nixos-option.sh b/modules/installer/tools/nixos-option.sh index 47abac7fddd0..4cc6ae64bdc0 100644 --- a/modules/installer/tools/nixos-option.sh +++ b/modules/installer/tools/nixos-option.sh @@ -207,7 +207,7 @@ if $generate; then # Generate a template configuration file where the user has to # fill the gaps. - cat < "$NIXOS_CONFIG" \ + cat < "$NIXOS_CONFIG" # Edit this configuration file to define what should be installed on # the system. Help is available in the configuration.nix(5) man page # or the NixOS manual available on virtual console 8 (Alt+F8). diff --git a/modules/module-list.nix b/modules/module-list.nix index 40f1d1e8676a..a61cbbea4690 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -82,6 +82,7 @@ ./services/hardware/sane.nix ./services/hardware/udev.nix ./services/hardware/udisks.nix + ./services/hardware/udisks2.nix ./services/hardware/upower.nix ./services/hardware/thinkfan.nix ./services/logging/klogd.nix @@ -131,6 +132,7 @@ ./services/networking/ejabberd.nix ./services/networking/firewall.nix ./services/networking/flashpolicyd.nix + ./services/networking/freenet.nix ./services/networking/git-daemon.nix ./services/networking/gnunet.nix ./services/networking/gogoclient.nix diff --git a/modules/services/amqp/rabbitmq.nix b/modules/services/amqp/rabbitmq.nix index 88d6dc588d60..4afbafdd0856 100644 --- a/modules/services/amqp/rabbitmq.nix +++ b/modules/services/amqp/rabbitmq.nix @@ -73,6 +73,7 @@ in environment.HOME = "/var/lib/rabbitmq"; environment.RABBITMQ_NODE_IP_ADDRESS = cfg.listenAddress; + environment.SYS_PREFIX = ""; exec = '' diff --git a/modules/services/hardware/udisks2.nix b/modules/services/hardware/udisks2.nix new file mode 100644 index 000000000000..eae4172ccb3e --- /dev/null +++ b/modules/services/hardware/udisks2.nix @@ -0,0 +1,53 @@ +# Udisks daemon. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + ###### interface + + options = { + + services.udisks2 = { + + enable = mkOption { + default = false; + description = '' + Whether to enable Udisks, a DBus service that allows + applications to query and manipulate storage devices. + ''; + }; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.udisks2.enable { + + environment.systemPackages = [ pkgs.udisks2 ]; + + services.dbus.packages = [ pkgs.udisks2 ]; + + system.activationScripts.udisks2 = + '' + mkdir -m 0755 -p /var/lib/udisks2 + ''; + + #services.udev.packages = [ pkgs.udisks2 ]; + + systemd.services.udisks2 = { + description = "Udisks2 service"; + serviceConfig = { + Type = "dbus"; + BusName = "org.freedesktop.UDisks2"; + ExecStart = "${pkgs.udisks2}/lib/udisks2/udisksd --no-debug"; + }; + }; + }; + +} diff --git a/modules/services/networking/freenet.nix b/modules/services/networking/freenet.nix new file mode 100644 index 000000000000..4087fe524d05 --- /dev/null +++ b/modules/services/networking/freenet.nix @@ -0,0 +1,63 @@ +# NixOS module for Transmission BitTorrent daemon + +{ config, pkgs, ... }: + +with pkgs.lib; + +let + + cfg = config.services.freenet; + varDir = "/var/lib/freenet"; + +in + +{ + + ### configuration + + options = { + + services.freenet = { + + enable = mkOption { + type = types.uniq types.bool; + default = false; + description = "Enable the Freenet daemon"; + }; + + nice = mkOption { + type = types.uniq types.int; + default = 10; + description = "Set the nice level for the Freenet daemon"; + }; + + }; + + }; + + ### implementation + + config = mkIf cfg.enable { + + systemd.services.freenet = { + description = "Freenet daemon"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig.ExecStart = "${pkgs.freenet}/bin/freenet"; + serviceConfig.User = "freenet"; + serviceConfig.UMask = "0007"; + serviceConfig.WorkingDirectory = varDir; + serviceConfig.Nice = cfg.nice; + }; + + users.extraUsers.freenet = { + group = "freenet"; + description = "Psyced daemon user"; + home = varDir; + createHome = true; + }; + + users.extraGroups.freenet = {}; + }; + +} diff --git a/modules/services/scheduling/fcron.nix b/modules/services/scheduling/fcron.nix index 812af1edfc0d..95ff918eb6d7 100644 --- a/modules/services/scheduling/fcron.nix +++ b/modules/services/scheduling/fcron.nix @@ -101,7 +101,9 @@ in jobs.fcron = { description = "fcron daemon"; - startOn = "startup and filesystem"; + startOn = "startup"; + + after = [ "local-fs.target" ]; environment = { PATH = "/run/current-system/sw/bin"; diff --git a/modules/services/x11/desktop-managers/xfce.nix b/modules/services/x11/desktop-managers/xfce.nix index c7622ddb02fe..6c6e4ffce0a1 100644 --- a/modules/services/x11/desktop-managers/xfce.nix +++ b/modules/services/x11/desktop-managers/xfce.nix @@ -84,7 +84,7 @@ in ''; # Enable helpful DBus services. - services.udisks.enable = true; + services.udisks2.enable = true; services.upower.enable = config.powerManagement.enable; }; diff --git a/modules/system/boot/loader/grub/install-grub.pl b/modules/system/boot/loader/grub/install-grub.pl index f06527aaaec2..738714ba7148 100644 --- a/modules/system/boot/loader/grub/install-grub.pl +++ b/modules/system/boot/loader/grub/install-grub.pl @@ -194,7 +194,7 @@ $conf .= "$extraEntries\n" unless $extraEntriesBeforeNixOS; $conf =~ s/\@bootRoot\@/$bootRoot/g; # Add entries for all previous generations of the system profile. -$conf .= "submenu \"NixOS - Old configurations\" {\n" if $grubVersion == 2; +$conf .= "submenu \"NixOS - All configurations\" {\n" if $grubVersion == 2; sub nrFromGen { my ($x) = @_; $x =~ /system-(.*)-link/; return $1; } diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index 90ca49cdb1f1..7738be28b42a 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -277,7 +277,7 @@ in script = '' # Set the static DNS configuration, if given. - cat | ${pkgs.openresolv}/sbin/resolvconf -m -1 -a static <