From b83544656339f4f19d1ecff4608f75da82188780 Mon Sep 17 00:00:00 2001 From: Pavel Platto Date: Tue, 11 Oct 2016 23:58:54 +0200 Subject: neo4j: 2.1.3 -> 3.0.6 --- nixos/modules/services/databases/neo4j.nix | 92 ++++++++++++++---------------- 1 file changed, 43 insertions(+), 49 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix index 146a604adb2f..7b51f1af6899 100644 --- a/nixos/modules/services/databases/neo4j.nix +++ b/nixos/modules/services/databases/neo4j.nix @@ -5,34 +5,34 @@ with lib; let cfg = config.services.neo4j; - serverConfig = pkgs.writeText "neo4j-server.properties" '' - org.neo4j.server.database.location=${cfg.dataDir}/data/graph.db - org.neo4j.server.webserver.address=${cfg.listenAddress} - org.neo4j.server.webserver.port=${toString cfg.port} + serverConfig = pkgs.writeText "neo4j.conf" '' + dbms.directories.data=${cfg.dataDir}/data + dbms.directories.certificates=${cfg.certDir} + dbms.directories.logs=${cfg.dataDir}/logs + dbms.directories.plugins=${cfg.dataDir}/plugins + dbms.connector.http.type=HTTP + dbms.connector.http.enabled=true + dbms.connector.http.address=${cfg.listenAddress}:${toString cfg.port} + ${optionalString cfg.enableBolt '' + dbms.connector.bolt.type=BOLT + dbms.connector.bolt.enabled=true + dbms.connector.bolt.tls_level=OPTIONAL + dbms.connector.bolt.address=${cfg.listenAddress}:${toString cfg.boltPort} + ''} ${optionalString cfg.enableHttps '' - org.neo4j.server.webserver.https.enabled=true - org.neo4j.server.webserver.https.port=${toString cfg.httpsPort} - org.neo4j.server.webserver.https.cert.location=${cfg.cert} - org.neo4j.server.webserver.https.key.location=${cfg.key} - org.neo4j.server.webserver.https.keystore.location=${cfg.dataDir}/data/keystore + dbms.connector.https.type=HTTP + dbms.connector.https.enabled=true + dbms.connector.https.encryption=TLS + dbms.connector.https.address=${cfg.listenAddress}:${toString cfg.httpsPort} ''} - org.neo4j.server.webadmin.rrdb.location=${cfg.dataDir}/data/rrd - org.neo4j.server.webadmin.data.uri=/db/data/ - org.neo4j.server.webadmin.management.uri=/db/manage/ - org.neo4j.server.db.tuning.properties=${cfg.package}/share/neo4j/conf/neo4j.properties - org.neo4j.server.manage.console_engines=shell + dbms.shell.enabled=true ${cfg.extraServerConfig} ''; - loggingConfig = pkgs.writeText "logging.properties" cfg.loggingConfig; - wrapperConfig = pkgs.writeText "neo4j-wrapper.conf" '' - wrapper.java.additional=-Dorg.neo4j.server.properties=${serverConfig} - wrapper.java.additional=-Djava.util.logging.config.file=${loggingConfig} - wrapper.java.additional=-XX:+UseConcMarkSweepGC - wrapper.java.additional=-XX:+CMSClassUnloadingEnabled - wrapper.pidfile=${cfg.dataDir}/neo4j-server.pid - wrapper.name=neo4j + dbms.jvm.additional=-Dunsupported.dbms.udc.source=tarball + dbms.jvm.additional=-XX:+UseConcMarkSweepGC + dbms.jvm.additional=-XX:+CMSClassUnloadingEnabled ''; in { @@ -65,6 +65,18 @@ in { type = types.int; }; + enableBolt = mkOption { + description = "Enable bolt for Neo4j."; + default = true; + type = types.bool; + }; + + boltPort = mkOption { + description = "Neo4j port to listen for BOLT traffic."; + default = 7687; + type = types.int; + }; + enableHttps = mkOption { description = "Enable https for Neo4j."; default = false; @@ -77,15 +89,9 @@ in { type = types.int; }; - cert = mkOption { - description = "Neo4j https certificate."; - default = "${cfg.dataDir}/conf/ssl/neo4j.cert"; - type = types.path; - }; - - key = mkOption { - description = "Neo4j https certificate key."; - default = "${cfg.dataDir}/conf/ssl/neo4j.key"; + certDir = mkOption { + description = "Neo4j TLS certificates directory."; + default = "${cfg.dataDir}/certificates"; type = types.path; }; @@ -95,26 +101,11 @@ in { type = types.path; }; - loggingConfig = mkOption { - description = "Neo4j logging configuration."; - default = '' - handlers=java.util.logging.ConsoleHandler - .level=INFO - org.neo4j.server.level=INFO - - java.util.logging.ConsoleHandler.level=INFO - java.util.logging.ConsoleHandler.formatter=org.neo4j.server.logging.SimpleConsoleFormatter - java.util.logging.ConsoleHandler.filter=org.neo4j.server.logging.NeoLogFilter - ''; - type = types.lines; - }; - extraServerConfig = mkOption { description = "Extra configuration for neo4j server."; default = ""; type = types.lines; }; - }; ###### implementation @@ -124,14 +115,18 @@ in { description = "Neo4j Daemon"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; - environment = { NEO4J_INSTANCE = cfg.dataDir; }; + environment = { + NEO4J_HOME = "${cfg.package}/share/neo4j"; + NEO4J_CONF = "${cfg.dataDir}/conf"; + }; serviceConfig = { ExecStart = "${cfg.package}/bin/neo4j console"; User = "neo4j"; PermissionsStartOnly = true; }; preStart = '' - mkdir -m 0700 -p ${cfg.dataDir}/{data/graph.db,conf} + mkdir -m 0700 -p ${cfg.dataDir}/{data/graph.db,conf,logs} + ln -fs ${serverConfig} ${cfg.dataDir}/conf/neo4j.conf ln -fs ${wrapperConfig} ${cfg.dataDir}/conf/neo4j-wrapper.conf if [ "$(id -u)" = 0 ]; then chown -R neo4j ${cfg.dataDir}; fi ''; @@ -146,5 +141,4 @@ in { home = cfg.dataDir; }; }; - } -- cgit 1.4.1 From f3876cbba0fe8eb5137c58560de40788c40f17de Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Sun, 16 Oct 2016 17:54:49 +0200 Subject: nixos/atftpd: various improvements * Add extraOptions option, to pass arbitrary command line options to atftp. Especially useful to specify which address to bind to (--bind-addres ...). * Improve descriptions (fix a typo, document default bind address, don't repeat service name in systemd description + capitalize) * Change default server directory from /var/empty to /srv/tftp, and change types.str to types.path. --- nixos/modules/services/networking/atftpd.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/networking/atftpd.nix b/nixos/modules/services/networking/atftpd.nix index d875ddc63528..e7fd48c99a85 100644 --- a/nixos/modules/services/networking/atftpd.nix +++ b/nixos/modules/services/networking/atftpd.nix @@ -20,13 +20,27 @@ in default = false; type = types.bool; description = '' - Whenever to enable the atftpd TFTP server. + Whether to enable the atftpd TFTP server. By default, the server + binds to address 0.0.0.0. + ''; + }; + + extraOptions = mkOption { + default = []; + type = types.listOf types.str; + example = literalExample '' + [ "--bind-address 192.168.9.1" + "--verbose=7" + ] + ''; + description = '' + Extra command line arguments to pass to atftp. ''; }; root = mkOption { - default = "/var/empty"; - type = types.str; + default = "/srv/tftp"; + type = types.path; description = '' Document root directory for the atftpd. ''; @@ -39,11 +53,11 @@ in config = mkIf cfg.enable { systemd.services.atftpd = { - description = "atftpd TFTP server"; + description = "TFTP Server"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; # runs as nobody - serviceConfig.ExecStart = "${pkgs.atftp}/sbin/atftpd --daemon --no-fork --bind-address 0.0.0.0 ${cfg.root}"; + serviceConfig.ExecStart = "${pkgs.atftp}/sbin/atftpd --daemon --no-fork ${lib.concatStringsSep " " cfg.extraOptions} ${cfg.root}"; }; }; -- cgit 1.4.1 From 928341132e8b6b8cb54d0bed7ffc7cde90a14244 Mon Sep 17 00:00:00 2001 From: Ryan Trinkle Date: Wed, 19 Oct 2016 11:06:07 -0400 Subject: openfire: fix service expression openfire is not in scope --- nixos/modules/services/networking/openfire.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/networking/openfire.nix b/nixos/modules/services/networking/openfire.nix index ed91b45ec945..454b504eda21 100644 --- a/nixos/modules/services/networking/openfire.nix +++ b/nixos/modules/services/networking/openfire.nix @@ -47,7 +47,7 @@ with lib; export HOME=/tmp mkdir /var/log/openfire || true mkdir /etc/openfire || true - for i in ${openfire}/conf.inst/*; do + for i in ${pkgs.openfire}/conf.inst/*; do if ! test -f /etc/openfire/$(basename $i); then cp $i /etc/openfire/ fi -- cgit 1.4.1 From ee42e000ddbbbd896f504f3929a41178fafe5be7 Mon Sep 17 00:00:00 2001 From: schneefux Date: Mon, 1 Aug 2016 17:24:13 +0200 Subject: znc module: refactor --- nixos/modules/services/networking/znc.nix | 174 +++++++++++++++++++----------- 1 file changed, 112 insertions(+), 62 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/networking/znc.nix b/nixos/modules/services/networking/znc.nix index 196a14dd40ed..676e82aa8937 100644 --- a/nixos/modules/services/networking/znc.nix +++ b/nixos/modules/services/networking/znc.nix @@ -26,53 +26,35 @@ let }; # Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`. + notNull = a: ! isNull a; mkZncConf = confOpts: '' - // Also check http://en.znc.in/wiki/Configuration - - AnonIPLimit = 10 - ConnectDelay = 5 - # Add `LoadModule = x` for each module... + Version = 1.6.3 ${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.modules} - MaxBufferSize = 500 - ProtectWebSessions = true - SSLCertFile = ${cfg.dataDir}/znc.pem - ServerThrottle = 30 - Skin = dark-clouds - StatusPrefix = * - Version = 1.2 - - - AllowIRC = true - AllowWeb = true + + + Port = ${toString confOpts.port} IPv4 = true - IPv6 = false - Port = ${if confOpts.useSSL then "+" else ""}${toString confOpts.port} + IPv6 = true SSL = ${if confOpts.useSSL then "true" else "false"} + ${confOpts.passBlock} Admin = true - Allow = * - AltNick = ${confOpts.nick}_ - AppendTimestamp = false - AutoClearChanBuffer = false - Buffer = 150 - ChanModes = +stn - DenyLoadMod = false - DenySetBindHost = false - Ident = ident - JoinTries = 10 - MaxJoins = 0 - MaxNetworks = 1 - MultiClients = true Nick = ${confOpts.nick} - PrependTimestamp = true - QuitMsg = Quit + AltNick = ${confOpts.nick}_ + Ident = ${confOpts.nick} RealName = ${confOpts.nick} - TimestampFormat = [%H:%M:%S] ${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.userModules} - - ${confOpts.passBlock} + + ${ lib.concatStringsSep "\n" (lib.mapAttrsToList (name: net: '' + + ${concatMapStrings (m: "LoadModule = ${m}\n") net.modules} + Server = ${net.server} ${if net.useSSL then "+" else ""}${toString net.port} + + ${concatMapStrings (c: "\n\n") net.channels} + + '') confOpts.networks) } ${confOpts.extraZncConf} ''; @@ -84,6 +66,62 @@ let else mkZncConf cfg.confOptions; }; + networkOpts = { ... }: { + options = { + server = mkOption { + type = types.str; + example = "chat.freenode.net"; + description = '' + IRC server address. + ''; + }; + + port = mkOption { + type = types.int; + default = 6697; + example = 6697; + description = '' + IRC server port. + ''; + }; + + useSSL = mkOption { + type = types.bool; + default = true; + description = '' + Whether to use SSL to connect to the IRC server. + ''; + }; + + modulePackages = mkOption { + type = types.listOf types.package; + default = []; + example = [ "pkgs.zncModules.push" "pkgs.zncModules.fish" ]; + description = '' + External ZNC modules to build. + ''; + }; + + modules = mkOption { + type = types.listOf types.str; + default = [ "simple_away" ]; + example = literalExample "[ simple_away sasl ]"; + description = '' + ZNC modules to load. + ''; + }; + + channels = mkOption { + type = types.listOf types.str; + default = []; + example = [ "nixos" ]; + description = '' + IRC channels to join. + ''; + }; + }; + }; + in { @@ -111,6 +149,15 @@ in ''; }; + group = mkOption { + default = ""; + example = "users"; + type = types.string; + description = '' + Group to own the ZNCserver process. + ''; + }; + dataDir = mkOption { default = "/var/lib/znc/"; example = "/home/john/.znc/"; @@ -125,27 +172,16 @@ in example = "See: http://wiki.znc.in/Configuration"; type = types.lines; description = '' - The contents of the `znc.conf` file to use when creating it. + Config file as generated with `znc --makeconf` to use for the whole ZNC configuration. If specified, `confOptions` will be ignored, and this value, as-is, will be used. If left empty, a conf file with default values will be used. - Recommended to generate with `znc --makeconf` command. ''; }; - /* TODO: add to the documentation of the current module: - - Values to use when creating a `znc.conf` file. - - confOptions = { - modules = [ "log" ]; - userName = "john"; - nick = "johntron"; - }; - */ confOptions = { modules = mkOption { type = types.listOf types.str; - default = [ "partyline" "webadmin" "adminlog" "log" ]; + default = [ "webadmin" "adminlog" ]; example = [ "partyline" "webadmin" "adminlog" "log" ]; description = '' A list of modules to include in the `znc.conf` file. @@ -154,8 +190,8 @@ in userModules = mkOption { type = types.listOf types.str; - default = [ ]; - example = [ "fish" "push" ]; + default = [ "chansaver" "controlpanel" ]; + example = [ "chansaver" "controlpanel" "fish" "push" ]; description = '' A list of user modules to include in the `znc.conf` file. ''; @@ -166,9 +202,25 @@ in example = "johntron"; type = types.string; description = '' - The user name to use when generating the `znc.conf` file. - This is the user name used by the user logging into the ZNC web admin. + The user name used to log in to the ZNC web admin interface. + ''; + }; + + networks = mkOption { + default = { }; + type = types.loaOf types.optionSet; + description = '' + IRC networks to connect the user to. ''; + options = [ networkOpts ]; + example = { + "freenode" = { + server = "chat.freenode.net"; + port = 6697; + ssl = true; + modules = [ "simple_away" ]; + }; + }; }; nick = mkOption { @@ -176,19 +228,16 @@ in example = "john"; type = types.string; description = '' - The IRC nick to use when generating the `znc.conf` file. + The IRC nick. ''; }; passBlock = mkOption { - default = defaultPassBlock; - example = "Must be the block generated by the `znc --makepass` command."; + example = defaultPassBlock; type = types.string; description = '' - The pass block to use when generating the `znc.conf` file. - This is the password used by the user logging into the ZNC web admin. - This is the block generated by the `znc --makepass` command. - !!! If not specified, please change this after starting the service. !!! + Generate with znc --makepass. + This is the password used to log in to the ZNC web admin interface. ''; }; @@ -206,7 +255,7 @@ in example = true; type = types.bool; description = '' - Indicates whether the ZNC server should use SSL when listening on the specified port. + Indicates whether the ZNC server should use SSL when listening on the specified port. A self-signed certificate will be generated. ''; }; @@ -214,7 +263,7 @@ in default = ""; type = types.lines; description = '' - Extra config to `znc.conf` file + Extra config to `znc.conf` file. ''; }; }; @@ -265,6 +314,7 @@ in after = [ "network.service" ]; serviceConfig = { User = cfg.user; + Group = cfg.group; Restart = "always"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID"; -- cgit 1.4.1 From f1d45add3b8477d2d8cedd93e096472fbce2ac41 Mon Sep 17 00:00:00 2001 From: Bram Duvigneau Date: Sat, 22 Oct 2016 20:12:30 +0000 Subject: brltty: 5.2 -> 5.4 --- nixos/modules/services/hardware/brltty.nix | 2 +- pkgs/tools/misc/brltty/default.nix | 18 ++++++++++++------ pkgs/tools/misc/brltty/systemd.patch | 22 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 pkgs/tools/misc/brltty/systemd.patch (limited to 'nixos/modules') diff --git a/nixos/modules/services/hardware/brltty.nix b/nixos/modules/services/hardware/brltty.nix index 03e530b2c96d..b416ba332222 100644 --- a/nixos/modules/services/hardware/brltty.nix +++ b/nixos/modules/services/hardware/brltty.nix @@ -28,7 +28,7 @@ in { }; serviceConfig = { ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon"; - Type = "simple"; # Change to notidy after next releae + Type = "notify"; TimeoutStartSec = 5; TimeoutStopSec = 10; Restart = "always"; diff --git a/pkgs/tools/misc/brltty/default.nix b/pkgs/tools/misc/brltty/default.nix index 4201fb25f98a..f466da91dffe 100644 --- a/pkgs/tools/misc/brltty/default.nix +++ b/pkgs/tools/misc/brltty/default.nix @@ -1,17 +1,21 @@ -{ stdenv, fetchurl, pkgconfig, alsaSupport, alsaLib ? null, bluez }: +{ stdenv, fetchurl, pkgconfig, alsaSupport, alsaLib ? null, bluez, systemdSupport, systemd ? null }: assert alsaSupport -> alsaLib != null; +assert systemdSupport -> systemd != null; stdenv.mkDerivation rec { - name = "brltty-5.2"; + name = "brltty-5.4"; src = fetchurl { url = "http://brltty.com/archive/${name}.tar.gz"; - sha256 = "1zaab5pxkqrv081n23p3am445d30gk0km4azqdirvcpw9z15q0cz"; + sha256 = "1993brxa76yf7z3ckax0bbmqv6jp8vjwxp19h425v4gpm0m17k7l"; }; + + patches = [ ./systemd.patch ]; - buildInputs = [ pkgconfig alsaLib bluez ] - ++ stdenv.lib.optional alsaSupport alsaLib; + buildInputs = [ pkgconfig bluez ] + ++ stdenv.lib.optional alsaSupport alsaLib + ++ stdenv.lib.optional systemdSupport systemd; meta = { description = "Access software for a blind person using a braille display"; @@ -27,7 +31,9 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.all; }; - patchPhase = '' + preConfigurePhases = [ "preConfigure" ]; + + preConfigure = '' substituteInPlace configure --replace /sbin/ldconfig ldconfig ''; } diff --git a/pkgs/tools/misc/brltty/systemd.patch b/pkgs/tools/misc/brltty/systemd.patch new file mode 100644 index 000000000000..24a0d617b306 --- /dev/null +++ b/pkgs/tools/misc/brltty/systemd.patch @@ -0,0 +1,22 @@ +diff --git a/config.mk.in b/config.mk.in +index 5093b9c..b707bd4 100644 +--- a/config.mk.in ++++ b/config.mk.in +@@ -235,7 +235,7 @@ TUNE_OBJECTS = tune.$O notes.$O $(BEEP_OBJECTS) $(PCM_OBJECTS) $(MIDI_OBJECTS) $ + ASYNC_OBJECTS = async_handle.$O async_data.$O async_wait.$O async_alarm.$O async_task.$O async_io.$O async_event.$O async_signal.$O thread.$O + BASE_OBJECTS = log.$O addresses.$O file.$O device.$O parse.$O variables.$O datafile.$O unicode.$O $(CHARSET_OBJECTS) timing.$O $(ASYNC_OBJECTS) queue.$O lock.$O $(DYNLD_OBJECTS) $(PORTS_OBJECTS) $(SYSTEM_OBJECTS) + OPTIONS_OBJECTS = options.$O $(PARAMS_OBJECTS) +-PROGRAM_OBJECTS = program.$O $(PGMPATH_OBJECTS) $(SERVICE_OBJECTS) $(SERVICE_LIBS) pid.$O $(OPTIONS_OBJECTS) $(BASE_OBJECTS) ++PROGRAM_OBJECTS = program.$O $(PGMPATH_OBJECTS) $(SERVICE_OBJECTS) pid.$O $(OPTIONS_OBJECTS) $(BASE_OBJECTS) + + CC = @CC@ + CPPFLAGS = -I$(BLD_DIR) -I$(SRC_DIR) -I$(BLD_TOP:/=)/$(PGM_DIR) -I$(SRC_TOP:/=)/$(PGM_DIR) -I$(SRC_TOP:/=)/$(HDR_DIR) -I$(BLD_TOP:/=) -I$(SRC_TOP:/=) @CPPFLAGS@ @DEFS@ +@@ -248,7 +248,7 @@ LIBCXXFLAGS = $(CXXFLAGS) @LIBCXXFLAGS@ + + LD = @LD@ + LDFLAGS = @LDFLAGS@ +-LDLIBS = $(ICU_LIBS) $(POLKIT_LIBS) $(SYSTEM_LIBS) @LIBS@ ++LDLIBS = $(ICU_LIBS) $(POLKIT_LIBS) $(SYSTEM_LIBS) $(SERVICE_LIBS) @LIBS@ + + MKOBJ = @MKOBJ@ + MKMOD = @MKMOD@ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d8a6c2e233e8..af0ac7606f96 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -652,6 +652,7 @@ in brltty = callPackage ../tools/misc/brltty { alsaSupport = (!stdenv.isDarwin); + systemdSupport = stdenv.isLinux; }; bro = callPackage ../applications/networking/ids/bro { }; -- cgit 1.4.1 From 8b7e3c3537da9ea6f254365cd582c71830f0211e Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Sun, 23 Oct 2016 07:45:30 -0200 Subject: oblogout: init at 2009-11-18 --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/oblogout.nix | 160 +++++++++++++++++++++++ pkgs/tools/X11/oblogout/default.nix | 36 +++++ pkgs/tools/X11/oblogout/oblogout-0.3-fixes.patch | 66 ++++++++++ pkgs/top-level/all-packages.nix | 2 + 5 files changed, 265 insertions(+) create mode 100644 nixos/modules/programs/oblogout.nix create mode 100644 pkgs/tools/X11/oblogout/default.nix create mode 100644 pkgs/tools/X11/oblogout/oblogout-0.3-fixes.patch (limited to 'nixos/modules') diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index a4ef5a985e9e..2daa0854fa4e 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -77,6 +77,7 @@ ./programs/man.nix ./programs/mosh.nix ./programs/nano.nix + ./programs/oblogout.nix ./programs/screen.nix ./programs/shadow.nix ./programs/shell.nix diff --git a/nixos/modules/programs/oblogout.nix b/nixos/modules/programs/oblogout.nix new file mode 100644 index 000000000000..79a8ddb7ce37 --- /dev/null +++ b/nixos/modules/programs/oblogout.nix @@ -0,0 +1,160 @@ +# Global configuration for oblogout. + +{ config, lib, pkgs, ... }: + +with lib; + +let cfg = config.programs.oblogout; + +in +{ + ###### interface + + options = { + + programs.oblogout = { + + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to install OBLogout and create /etc/oblogout.conf. + See ${pkgs.oblogout}/share/doc/README. + ''; + }; + + opacity = mkOption { + type = types.int; + default = 70; + description = '' + ''; + }; + + bgcolor = mkOption { + type = types.str; + default = "black"; + description = '' + ''; + }; + + buttontheme = mkOption { + type = types.str; + default = "simplistic"; + description = '' + ''; + }; + + buttons = mkOption { + type = types.str; + default = "cancel, logout, restart, shutdown, suspend, hibernate"; + description = '' + ''; + }; + + cancel = mkOption { + type = types.str; + default = "Escape"; + description = '' + ''; + }; + + shutdown = mkOption { + type = types.str; + default = "S"; + description = '' + ''; + }; + + restart = mkOption { + type = types.str; + default = "R"; + description = '' + ''; + }; + + suspend = mkOption { + type = types.str; + default = "U"; + description = '' + ''; + }; + + logout = mkOption { + type = types.str; + default = "L"; + description = '' + ''; + }; + + lock = mkOption { + type = types.str; + default = "K"; + description = '' + ''; + }; + + hibernate = mkOption { + type = types.str; + default = "H"; + description = '' + ''; + }; + + clogout = mkOption { + type = types.str; + default = "openbox --exit"; + description = '' + ''; + }; + + clock = mkOption { + type = types.str; + default = ""; + description = '' + ''; + }; + + cswitchuser = mkOption { + type = types.str; + default = ""; + description = '' + ''; + }; + }; + }; + + ###### implementation + + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.oblogout ]; + + environment.etc."oblogout.conf".text = '' + [settings] + usehal = false + + [looks] + opacity = ${toString cfg.opacity} + bgcolor = ${cfg.bgcolor} + buttontheme = ${cfg.buttontheme} + buttons = ${cfg.buttons} + + [shortcuts] + cancel = ${cfg.cancel} + shutdown = ${cfg.shutdown} + restart = ${cfg.restart} + suspend = ${cfg.suspend} + logout = ${cfg.logout} + lock = ${cfg.lock} + hibernate = ${cfg.hibernate} + + [commands] + shutdown = systemctl poweroff + restart = systemctl reboot + suspend = systemctl suspend + hibernate = systemctl hibernate + logout = ${cfg.clogout} + lock = ${cfg.clock} + switchuser = ${cfg.cswitchuser} + ''; + }; +} diff --git a/pkgs/tools/X11/oblogout/default.nix b/pkgs/tools/X11/oblogout/default.nix new file mode 100644 index 000000000000..26bb32b17b0c --- /dev/null +++ b/pkgs/tools/X11/oblogout/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, intltool, file, pythonPackages, cairo }: + +pythonPackages.buildPythonApplication rec { + name = "oblogout-unstable-${version}"; + version = "2009-11-18"; + + src = fetchFromGitHub { + owner = "nikdoof"; + repo = "oblogout"; + rev = "ee023158c03dee720a1af9b1307b14ed5a95f5a0"; + sha256 = "0nj87q94idb5ki4wnb2xipfgc6k6clr3rmm4xxh46b58z4zhhbmj"; + }; + + nativeBuildInputs = [ intltool file pythonPackages.distutils_extra ]; + + buildInputs = [ cairo ]; + + propagatedBuildInputs = [ pythonPackages.pygtk pythonPackages.pillow pythonPackages.dbus-python ]; + + patches = [ ./oblogout-0.3-fixes.patch ]; + + postPatch = '' + substituteInPlace data/oblogout --replace sys.prefix \"$out/${pythonPackages.python.sitePackages}\" + substituteInPlace oblogout/__init__.py --replace sys.prefix \"$out\" + mkdir -p $out/share/doc + cp -a README $out/share/doc + ''; + + meta = { + description = "Openbox logout script"; + homepage = "https://launchpad.net/oblogout"; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.romildo ]; + }; +} diff --git a/pkgs/tools/X11/oblogout/oblogout-0.3-fixes.patch b/pkgs/tools/X11/oblogout/oblogout-0.3-fixes.patch new file mode 100644 index 000000000000..c58103c6d407 --- /dev/null +++ b/pkgs/tools/X11/oblogout/oblogout-0.3-fixes.patch @@ -0,0 +1,66 @@ +diff --git a/data/oblogout b/data/oblogout +index 8058c4a..dfe5285 100755 +--- a/data/oblogout ++++ b/data/oblogout +@@ -77,8 +77,10 @@ def main(argv = None): + config = 'data/oblogout.conf' + elif os.path.isfile('%s/.config/oblogout.conf' % os.getenv("HOME")): + config = '%s/.config/oblogout.conf' % os.getenv("HOME") +- else: ++ elif os.path.isfile('/etc/oblogout.conf'): + config = '/etc/oblogout.conf' ++ else: ++ config = sys.prefix + '/etc/oblogout.conf' + + # Check config in local path, if it exists pass it on + if not os.path.isfile(config): +diff --git a/data/oblogout.conf b/data/oblogout.conf +index 810872c..b1c1009 100644 +--- a/data/oblogout.conf ++++ b/data/oblogout.conf +@@ -1,11 +1,11 @@ + [settings] +-usehal = true ++usehal = false + + [looks] + opacity = 70 + bgcolor = black + buttontheme = simplistic +-buttons = cancel, logout, restart, shutdown, suspend, lock ++buttons = cancel, logout, restart, shutdown, suspend + + [shortcuts] + cancel = Escape +@@ -17,11 +17,11 @@ lock = K + hibernate = H + + [commands] +-shutdown = shutdown -h now +-restart = reboot +-suspend = pmi action suspend +-hibernate = pmi action hibernate +-safesuspend = safesuspend +-lock = gnome-screensaver-command -l +-switchuser = gdm-control --switch-user ++shutdown = systemctl poweroff ++restart = systemctl reboot ++suspend = systemctl suspend ++hibernate = systemctl hibernate ++# safesuspend = safesuspend ++# lock = gnome-screensaver-command -l ++# switchuser = gdm-control --switch-user + logout = openbox --exit +diff --git a/oblogout/__init__.py b/oblogout/__init__.py +index b9e4e01..12f521f 100644 +--- a/oblogout/__init__.py ++++ b/oblogout/__init__.py +@@ -138,7 +138,7 @@ class OpenboxLogout(): + self.logger.debug("Rendering Fade") + # Convert Pixbuf to PIL Image + wh = (pb.get_width(),pb.get_height()) +- pilimg = Image.fromstring("RGB", wh, pb.get_pixels()) ++ pilimg = Image.frombytes("RGB", wh, pb.get_pixels()) + + pilimg = pilimg.point(lambda p: (p * self.opacity) / 255 ) + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6257f7a4c182..2744973948a0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13940,6 +13940,8 @@ in inherit (gnome2) libglade; }; + oblogout = callPackage ../tools/X11/oblogout { }; + obs-studio = qt5.callPackage ../applications/video/obs-studio { alsaSupport = stdenv.isLinux; pulseaudioSupport = config.pulseaudio or true; -- cgit 1.4.1 From 1e3f622dbd8999e37876783f8afa0746b2ddd987 Mon Sep 17 00:00:00 2001 From: Kranium Gikos Mendoza Date: Sun, 23 Oct 2016 11:55:23 +0000 Subject: openldap: set configDir as null fixes an error #19794 with this new option f3404b7 when using plain configuration files --- nixos/modules/services/databases/openldap.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix index 875ed0f39db8..54556597b74e 100644 --- a/nixos/modules/services/databases/openldap.nix +++ b/nixos/modules/services/databases/openldap.nix @@ -55,7 +55,7 @@ in configDir = mkOption { type = types.path; - default = ""; + default = null; description = "Use this optional config directory instead of using slapd.conf"; example = "/var/db/slapd.d"; }; @@ -103,7 +103,7 @@ in mkdir -p ${cfg.dataDir} chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir} ''; - serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -h \"${concatStringsSep " " cfg.urlList}\" ${if cfg.configDir == "" then "-f "+configFile else "-F "+cfg.configDir}"; + serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -h \"${concatStringsSep " " cfg.urlList}\" ${if cfg.configDir == null then "-f "+configFile else "-F "+cfg.configDir}"; }; users.extraUsers.openldap = -- cgit 1.4.1 From eb3f23d9bafbaad93aa0a52bc8caf84b3b7b9b76 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Sun, 23 Oct 2016 15:58:37 +0200 Subject: openldap: apply correct type for configDir null is not a path --- nixos/modules/services/databases/openldap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix index 54556597b74e..b8e6c0cec3dc 100644 --- a/nixos/modules/services/databases/openldap.nix +++ b/nixos/modules/services/databases/openldap.nix @@ -54,7 +54,7 @@ in }; configDir = mkOption { - type = types.path; + type = types.nullOr types.path; default = null; description = "Use this optional config directory instead of using slapd.conf"; example = "/var/db/slapd.d"; -- cgit 1.4.1 From 645ff13a4be67718b624c5b15f316922399cc3dd Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sun, 23 Oct 2016 17:24:17 +0200 Subject: nixos autoUpgrade: fix use of startAt `startAt = ""` as in `startAt = optionalString false ...` results in an invalid timer unit (due to "" being promoted to a singleton list and not filtered out). Ref: c9941c4b5ef7acc1cb8d734acb383410d99c01ba --- nixos/modules/installer/tools/auto-upgrade.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/installer/tools/auto-upgrade.nix b/nixos/modules/installer/tools/auto-upgrade.nix index b21b80c666aa..dfb43d1a1db9 100644 --- a/nixos/modules/installer/tools/auto-upgrade.nix +++ b/nixos/modules/installer/tools/auto-upgrade.nix @@ -84,7 +84,7 @@ let cfg = config.system.autoUpgrade; in ${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags} ''; - startAt = optionalString cfg.enable cfg.dates; + startAt = optional cfg.enable cfg.dates; }; }; -- cgit 1.4.1 From 4c41c412a0c6353e6a49b484783b4c925064718c Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sun, 23 Oct 2016 17:26:18 +0200 Subject: nix gc service: fix use of startAt `startAt = ""` as in `startAt = optionalString false ...` results in an invalid timer unit (due to "" being promoted to a singleton list and not filtered out). Ref: c9941c4b5ef7acc1cb8d734acb383410d99c01ba --- nixos/modules/services/misc/nix-gc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/misc/nix-gc.nix b/nixos/modules/services/misc/nix-gc.nix index 5c13da6e83dd..304168c65b0b 100644 --- a/nixos/modules/services/misc/nix-gc.nix +++ b/nixos/modules/services/misc/nix-gc.nix @@ -53,7 +53,7 @@ in systemd.services.nix-gc = { description = "Nix Garbage Collector"; script = "exec ${config.nix.package.out}/bin/nix-collect-garbage ${cfg.options}"; - startAt = optionalString cfg.automatic cfg.dates; + startAt = optional cfg.automatic cfg.dates; }; }; -- cgit 1.4.1 From b67561939154eab53d10943f2eb255b9822194d3 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sun, 23 Oct 2016 19:33:41 +0200 Subject: nixos: use types.lines for extraConfig --- nixos/modules/services/audio/mpd.nix | 2 +- nixos/modules/services/backup/bacula.nix | 1 + nixos/modules/services/hardware/tlp.nix | 2 +- nixos/modules/services/mail/dovecot.nix | 2 +- nixos/modules/services/misc/bepasty.nix | 2 +- nixos/modules/services/misc/octoprint.nix | 2 +- nixos/modules/services/misc/redmine.nix | 2 +- nixos/modules/services/monitoring/bosun.nix | 2 +- nixos/modules/services/monitoring/graphite.nix | 2 +- nixos/modules/services/monitoring/munin.nix | 1 + nixos/modules/services/monitoring/zabbix-agent.nix | 1 + nixos/modules/services/network-filesystems/xtreemfs.nix | 5 +++++ nixos/modules/services/networking/bind.nix | 1 + nixos/modules/services/networking/chrony.nix | 1 + nixos/modules/services/networking/cntlm.nix | 1 + nixos/modules/services/networking/ddclient.nix | 2 +- nixos/modules/services/networking/dhcpd.nix | 1 + nixos/modules/services/networking/hostapd.nix | 2 +- nixos/modules/services/networking/kippo.nix | 2 +- nixos/modules/services/networking/murmur.nix | 2 +- nixos/modules/services/networking/prayer.nix | 1 + nixos/modules/services/networking/prosody.nix | 1 + nixos/modules/services/networking/smokeping.nix | 2 +- nixos/modules/services/networking/unbound.nix | 2 +- nixos/modules/services/networking/xinetd.nix | 2 +- nixos/modules/services/web-servers/apache-httpd/mediawiki.nix | 1 + nixos/modules/services/web-servers/apache-httpd/moodle.nix | 1 + nixos/modules/services/web-servers/apache-httpd/wordpress.nix | 1 + nixos/modules/services/x11/display-managers/sddm.nix | 2 +- 29 files changed, 33 insertions(+), 16 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index 85e0a7d2ac4e..5ec2e2c26232 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -49,7 +49,7 @@ in { }; extraConfig = mkOption { - type = types.str; + type = types.lines; default = ""; description = '' Extra directives added to to the end of MPD's configuration file, diff --git a/nixos/modules/services/backup/bacula.nix b/nixos/modules/services/backup/bacula.nix index ef8e5e55edef..340b0cf07234 100644 --- a/nixos/modules/services/backup/bacula.nix +++ b/nixos/modules/services/backup/bacula.nix @@ -340,6 +340,7 @@ in { extraConfig = mkOption { default = ""; + type = types.lines; description = '' Extra configuration for Bacula Director Daemon. ''; diff --git a/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix index 281d02a8c65e..f36a9e7b4596 100644 --- a/nixos/modules/services/hardware/tlp.nix +++ b/nixos/modules/services/hardware/tlp.nix @@ -40,7 +40,7 @@ in }; extraConfig = mkOption { - type = types.str; + type = types.lines; default = ""; description = "Additional configuration variables for TLP"; }; diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index e79d5dadd828..4c9df935debe 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -111,7 +111,7 @@ in }; extraConfig = mkOption { - type = types.str; + type = types.lines; default = ""; example = "mail_debug = yes"; description = "Additional entries to put verbatim into Dovecot's config file."; diff --git a/nixos/modules/services/misc/bepasty.nix b/nixos/modules/services/misc/bepasty.nix index 5bda73ab64f0..52719222db66 100644 --- a/nixos/modules/services/misc/bepasty.nix +++ b/nixos/modules/services/misc/bepasty.nix @@ -53,7 +53,7 @@ in }; extraConfig = mkOption { - type = types.str; + type = types.lines; description = '' Extra configuration for bepasty server to be appended on the configuration. diff --git a/nixos/modules/services/misc/octoprint.nix b/nixos/modules/services/misc/octoprint.nix index c2b3f63be7d4..516ca80a3374 100644 --- a/nixos/modules/services/misc/octoprint.nix +++ b/nixos/modules/services/misc/octoprint.nix @@ -73,7 +73,7 @@ in }; extraConfig = mkOption { - type = types.attrs; + type = types.lines; default = {}; description = "Extra options which are added to OctoPrint's YAML configuration file."; }; diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix index 7c9483911f21..e3f1ec67cbb3 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -71,7 +71,7 @@ in { }; extraConfig = mkOption { - type = types.str; + type = types.lines; default = ""; description = "Extra configuration in configuration.yml"; }; diff --git a/nixos/modules/services/monitoring/bosun.nix b/nixos/modules/services/monitoring/bosun.nix index 9a1e790d3ab6..496838a131ba 100644 --- a/nixos/modules/services/monitoring/bosun.nix +++ b/nixos/modules/services/monitoring/bosun.nix @@ -107,7 +107,7 @@ in { }; extraConfig = mkOption { - type = types.string; + type = types.lines; default = ""; description = '' Extra configuration options for Bosun. You should describe your diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix index 1de3320dc42c..b8be9296bc97 100644 --- a/nixos/modules/services/monitoring/graphite.nix +++ b/nixos/modules/services/monitoring/graphite.nix @@ -167,7 +167,7 @@ in { CACHE_TYPE: 'filesystem' CACHE_DIR: '/tmp/graphite-api-cache' ''; - type = types.str; + type = types.lines; }; }; diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix index aaa041ad4cd6..57df16b58d9c 100644 --- a/nixos/modules/services/monitoring/munin.nix +++ b/nixos/modules/services/monitoring/munin.nix @@ -100,6 +100,7 @@ in extraConfig = mkOption { default = ""; + type = types.lines; description = '' munin-node.conf extra configuration. See diff --git a/nixos/modules/services/monitoring/zabbix-agent.nix b/nixos/modules/services/monitoring/zabbix-agent.nix index a943075be0c4..88a63b4bf161 100644 --- a/nixos/modules/services/monitoring/zabbix-agent.nix +++ b/nixos/modules/services/monitoring/zabbix-agent.nix @@ -53,6 +53,7 @@ in extraConfig = mkOption { default = ""; + type = types.lines; description = '' Configuration that is injected verbatim into the configuration file. ''; diff --git a/nixos/modules/services/network-filesystems/xtreemfs.nix b/nixos/modules/services/network-filesystems/xtreemfs.nix index b051214e1d08..0c6714563d8a 100644 --- a/nixos/modules/services/network-filesystems/xtreemfs.nix +++ b/nixos/modules/services/network-filesystems/xtreemfs.nix @@ -153,6 +153,7 @@ in ''; }; extraConfig = mkOption { + type = types.lines; default = ""; example = '' # specify whether SSL is required @@ -173,6 +174,7 @@ in replication = { enable = mkEnableOption "XtreemFS DIR replication plugin"; extraConfig = mkOption { + type = types.lines; example = '' # participants of the replication including this replica babudb.repl.participant.0 = 192.168.0.10 @@ -269,6 +271,7 @@ in ''; }; extraConfig = mkOption { + type = types.lines; example = '' osd_check_interval = 300 no_atime = true @@ -307,6 +310,7 @@ in replication = { enable = mkEnableOption "XtreemFS MRC replication plugin"; extraConfig = mkOption { + type = types.lines; example = '' # participants of the replication including this replica babudb.repl.participant.0 = 192.168.0.10 @@ -385,6 +389,7 @@ in ''; }; extraConfig = mkOption { + type = types.lines; example = '' local_clock_renewal = 0 remote_time_sync = 30000 diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix index 41d7128ec31e..72110e625766 100644 --- a/nixos/modules/services/networking/bind.nix +++ b/nixos/modules/services/networking/bind.nix @@ -113,6 +113,7 @@ in }; extraConfig = mkOption { + type = types.lines; default = ""; description = " Extra lines to be added verbatim to the generated named configuration file. diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix index a38142b4a08f..d40865ebbd5b 100644 --- a/nixos/modules/services/networking/chrony.nix +++ b/nixos/modules/services/networking/chrony.nix @@ -51,6 +51,7 @@ in }; extraConfig = mkOption { + type = types.lines; default = ""; description = '' Extra configuration directives that should be added to diff --git a/nixos/modules/services/networking/cntlm.nix b/nixos/modules/services/networking/cntlm.nix index 76c0fd7d0ea3..890ff5084078 100644 --- a/nixos/modules/services/networking/cntlm.nix +++ b/nixos/modules/services/networking/cntlm.nix @@ -61,6 +61,7 @@ in }; extraConfig = mkOption { + type = types.lines; default = ""; description = "Verbatim contents of cntlm.conf."; }; diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix index e74d68cad902..5050ecbd7492 100644 --- a/nixos/modules/services/networking/ddclient.nix +++ b/nixos/modules/services/networking/ddclient.nix @@ -89,7 +89,7 @@ in extraConfig = mkOption { default = ""; - type = str; + type = lines; description = '' Extra configuration. Contents will be added verbatim to the configuration file. ''; diff --git a/nixos/modules/services/networking/dhcpd.nix b/nixos/modules/services/networking/dhcpd.nix index 36b4c5d5c1ef..d2cd00e74a1f 100644 --- a/nixos/modules/services/networking/dhcpd.nix +++ b/nixos/modules/services/networking/dhcpd.nix @@ -47,6 +47,7 @@ in }; extraConfig = mkOption { + type = types.lines; default = ""; example = '' option subnet-mask 255.255.255.0; diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index 287964aab072..51f95af48029 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -140,7 +140,7 @@ in ieee80211n=1 ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40] ''; - type = types.string; + type = types.lines; description = "Extra configuration options to put in hostapd.conf."; }; }; diff --git a/nixos/modules/services/networking/kippo.nix b/nixos/modules/services/networking/kippo.nix index 1e7f7437b8a1..834de4fdc09f 100644 --- a/nixos/modules/services/networking/kippo.nix +++ b/nixos/modules/services/networking/kippo.nix @@ -46,7 +46,7 @@ rec { }; extraConfig = mkOption { default = ""; - type = types.string; + type = types.lines; description = ''Extra verbatim configuration added to the end of kippo.cfg.''; }; }; diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix index 134544cda681..81f968ae9fe1 100644 --- a/nixos/modules/services/networking/murmur.nix +++ b/nixos/modules/services/networking/murmur.nix @@ -230,7 +230,7 @@ in }; extraConfig = mkOption { - type = types.str; + type = types.lines; default = ""; description = "Extra configuration to put into mumur.ini."; }; diff --git a/nixos/modules/services/networking/prayer.nix b/nixos/modules/services/networking/prayer.nix index cb8fe6bf4fe9..9d63f549b23a 100644 --- a/nixos/modules/services/networking/prayer.nix +++ b/nixos/modules/services/networking/prayer.nix @@ -56,6 +56,7 @@ in }; extraConfig = mkOption { + type = types.lines; default = "" ; description = '' Extra configuration. Contents will be added verbatim to the configuration file. diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index 247c4f1efb07..5682b506344c 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -195,6 +195,7 @@ in }; extraConfig = mkOption { + type = types.lines; default = ''''; description = "Additional prosody configuration"; }; diff --git a/nixos/modules/services/networking/smokeping.nix b/nixos/modules/services/networking/smokeping.nix index cc373ae892ac..0c1f8d8cdb91 100644 --- a/nixos/modules/services/networking/smokeping.nix +++ b/nixos/modules/services/networking/smokeping.nix @@ -244,7 +244,7 @@ in description = "Target configuration"; }; extraConfig = mkOption { - type = types.string; + type = types.lines; default = ""; description = "Any additional customization not already included."; }; diff --git a/nixos/modules/services/networking/unbound.nix b/nixos/modules/services/networking/unbound.nix index 6375ebee3209..f3a04d97c98e 100644 --- a/nixos/modules/services/networking/unbound.nix +++ b/nixos/modules/services/networking/unbound.nix @@ -79,7 +79,7 @@ in extraConfig = mkOption { default = ""; - type = types.str; + type = types.lines; description = '' Extra unbound config. See unbound.conf8 diff --git a/nixos/modules/services/networking/xinetd.nix b/nixos/modules/services/networking/xinetd.nix index 270122ee659c..002245027804 100644 --- a/nixos/modules/services/networking/xinetd.nix +++ b/nixos/modules/services/networking/xinetd.nix @@ -124,7 +124,7 @@ in }; extraConfig = mkOption { - type = types.string; + type = types.lines; default = ""; description = "Extra configuration-lines added to the section of the service."; }; diff --git a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix index 4f9e9f52f9e0..1ed489bcb095 100644 --- a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix +++ b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix @@ -288,6 +288,7 @@ in }; extraConfig = mkOption { + type = types.lines; default = ""; example = '' diff --git a/nixos/modules/services/web-servers/apache-httpd/moodle.nix b/nixos/modules/services/web-servers/apache-httpd/moodle.nix index aa00e89967db..d525348d5c7e 100644 --- a/nixos/modules/services/web-servers/apache-httpd/moodle.nix +++ b/nixos/modules/services/web-servers/apache-httpd/moodle.nix @@ -164,6 +164,7 @@ in extraConfig = mkOption { + type = types.lines; default = ""; example = '' diff --git a/nixos/modules/services/web-servers/apache-httpd/wordpress.nix b/nixos/modules/services/web-servers/apache-httpd/wordpress.nix index 2315c4729aec..32dd4439675a 100644 --- a/nixos/modules/services/web-servers/apache-httpd/wordpress.nix +++ b/nixos/modules/services/web-servers/apache-httpd/wordpress.nix @@ -212,6 +212,7 @@ in example = "[ \"en_GB\" \"de_DE\" ];"; }; extraConfig = mkOption { + type = types.lines; default = ""; example = '' diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix index c79893e77aa6..36daf55a36a5 100644 --- a/nixos/modules/services/x11/display-managers/sddm.nix +++ b/nixos/modules/services/x11/display-managers/sddm.nix @@ -86,7 +86,7 @@ in }; extraConfig = mkOption { - type = types.str; + type = types.lines; default = ""; example = '' [Autologin] -- cgit 1.4.1 From 7c6a4e6c3547423f3308b2987b42a126308d48c3 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sun, 23 Oct 2016 19:47:28 +0200 Subject: nixos/octoprint: fixup extraConfig --- nixos/modules/services/misc/octoprint.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/misc/octoprint.nix b/nixos/modules/services/misc/octoprint.nix index 516ca80a3374..c2b3f63be7d4 100644 --- a/nixos/modules/services/misc/octoprint.nix +++ b/nixos/modules/services/misc/octoprint.nix @@ -73,7 +73,7 @@ in }; extraConfig = mkOption { - type = types.lines; + type = types.attrs; default = {}; description = "Extra options which are added to OctoPrint's YAML configuration file."; }; -- cgit 1.4.1 From d03dbfcbb83f3ab3c7619fc212cd81cfd9950f49 Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Mon, 17 Oct 2016 16:13:49 +0200 Subject: nixos/tftpd: mention that it runs as an xinetd service --- nixos/modules/services/networking/tftpd.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'nixos/modules') diff --git a/nixos/modules/services/networking/tftpd.nix b/nixos/modules/services/networking/tftpd.nix index 9b3cc6b8ec4f..a41d2491a11e 100644 --- a/nixos/modules/services/networking/tftpd.nix +++ b/nixos/modules/services/networking/tftpd.nix @@ -13,6 +13,7 @@ with lib; default = false; description = '' Whether to enable tftpd, a Trivial File Transfer Protocol server. + The server will be run as an xinetd service. ''; }; -- cgit 1.4.1 From cd1b09af5d85820926b9ce447ab678f13826eb85 Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Mon, 17 Oct 2016 16:14:08 +0200 Subject: nixos/tftpd: change default dir from /home/tftp to /srv/tftp /home is for real users. /srv is recommended by FHS (although there is no consensus for what to name subdirs under /srv). --- nixos/modules/services/networking/tftpd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/networking/tftpd.nix b/nixos/modules/services/networking/tftpd.nix index a41d2491a11e..c9c0a2b321d5 100644 --- a/nixos/modules/services/networking/tftpd.nix +++ b/nixos/modules/services/networking/tftpd.nix @@ -19,7 +19,7 @@ with lib; services.tftpd.path = mkOption { type = types.path; - default = "/home/tftp"; + default = "/srv/tftp"; description = '' Where the tftp server files are stored. ''; -- cgit 1.4.1