From 83265a850dea2824456db1debf902520db1a536d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 14 May 2021 16:34:18 +0200 Subject: sway: Install the wallpapers by default and use them on NixOS Size impact: $ du -sh $(nix-build -A sway-unwrapped) 5.9M /nix/store/d07zcpybgpdj8xhn9n4qb04lgm453ia1-sway-unwrapped-1.6 nix@sessel:/var/tmp/michael/nixpkgs$ du -sh $(nix-build -A sway-unwrapped)/share/backgrounds 4.9M /nix/store/d07zcpybgpdj8xhn9n4qb04lgm453ia1-sway-unwrapped-1.6/share/backgrounds --- nixos/modules/programs/sway.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix index 2b69851b340b4..068788cfd14e1 100644 --- a/nixos/modules/programs/sway.nix +++ b/nixos/modules/programs/sway.nix @@ -119,6 +119,8 @@ in { ]; environment = { systemPackages = [ swayPackage ] ++ cfg.extraPackages; + # Needed for the default wallpaper: + pathsToLink = [ "/share/backgrounds/sway" ]; etc = { "sway/config".source = mkOptionDefault "${swayPackage}/etc/sway/config"; "sway/config.d/nixos.conf".source = pkgs.writeText "nixos.conf" '' -- cgit 1.4.1 From afd62c277375f6962d305b27c0092f99b10c7819 Mon Sep 17 00:00:00 2001 From: Poscat Date: Sat, 16 Oct 2021 09:52:18 +0800 Subject: nixos/dovecot: use the count backend for quota plugin --- nixos/modules/services/mail/dovecot.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index 223f3bef77dbb..c39827c5b867d 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -103,11 +103,12 @@ let plugin { quota_rule = *:storage=${cfg.quotaGlobalPerUser} - quota = maildir:User quota # per virtual mail user quota # BUG/FIXME broken, we couldn't get this working + quota = count:User quota # per virtual mail user quota quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full" quota_grace = 10%% + quota_vsizes = yes } '' ) -- cgit 1.4.1 From 6a1fdd60e6e74f7ae85a647eb7552fd9591640ab Mon Sep 17 00:00:00 2001 From: GTrunSec Date: Wed, 17 Nov 2021 15:42:05 -0800 Subject: nixos/nomad: add flag of plugin-dir --- nixos/modules/services/networking/nomad.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index 3bd15bd5c808d..43333af5e2fea 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -51,7 +51,7 @@ in extraSettingsPaths = mkOption { type = types.listOf types.path; - default = []; + default = [ ]; description = '' Additional settings paths used to configure nomad. These can be files or directories. ''; @@ -60,9 +60,21 @@ in ''; }; + extraSettingsPlugins = mkOption { + type = types.listOf (types.either types.package types.path); + default = [ ]; + description = '' + Additional plugins dir used to configure nomad. + ''; + example = literalExpression '' + [ "" "pkgs."] + ''; + }; + + settings = mkOption { type = format.type; - default = {}; + default = { }; description = '' Configuration for Nomad. See the documentation for supported values. @@ -128,7 +140,8 @@ in DynamicUser = cfg.dropPrivileges; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" + - concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths; + concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths + + concatMapStrings (path: " -plugin-dir=${path}/bin") cfg.extraSettingsPlugins; KillMode = "process"; KillSignal = "SIGINT"; LimitNOFILE = 65536; -- cgit 1.4.1 From 4639589f8830c5a9e728d716c942fa5e24f0aeaa Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Fri, 19 Nov 2021 20:01:24 -0800 Subject: nixos/sabnzbd: add package option --- nixos/modules/services/networking/sabnzbd.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/services/networking/sabnzbd.nix b/nixos/modules/services/networking/sabnzbd.nix index 43566dfd25c5f..54eeba1a9ec17 100644 --- a/nixos/modules/services/networking/sabnzbd.nix +++ b/nixos/modules/services/networking/sabnzbd.nix @@ -17,6 +17,13 @@ in services.sabnzbd = { enable = mkEnableOption "the sabnzbd server"; + package = mkOption { + type = types.package; + default = pkgs.sabnzbd; + defaultText = "pkgs.sabnzbd"; + description = "The sabnzbd executable package run by the service."; + }; + configFile = mkOption { type = types.path; default = "/var/lib/sabnzbd/sabnzbd.ini"; @@ -63,7 +70,7 @@ in GuessMainPID = "no"; User = "${cfg.user}"; Group = "${cfg.group}"; - ExecStart = "${sabnzbd}/bin/sabnzbd -d -f ${cfg.configFile}"; + ExecStart = "${lib.getBin cfg.package}/bin/sabnzbd -d -f ${cfg.configFile}"; }; }; }; -- cgit 1.4.1 From 427941d7377ff2762305f36479fb4365ad2abe68 Mon Sep 17 00:00:00 2001 From: Goldstein Date: Thu, 9 Sep 2021 14:44:25 +0300 Subject: nixos/clickhouse: add package option Consistent with other services and helps to work around #130101 --- nixos/modules/services/databases/clickhouse.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/databases/clickhouse.nix b/nixos/modules/services/databases/clickhouse.nix index f2f4e9d25542d..3a161d56107eb 100644 --- a/nixos/modules/services/databases/clickhouse.nix +++ b/nixos/modules/services/databases/clickhouse.nix @@ -13,6 +13,15 @@ with lib; enable = mkEnableOption "ClickHouse database server"; + package = mkOption { + type = types.package; + default = pkgs.clickhouse; + defaultText = "pkgs.clickhouse"; + description = '' + ClickHouse package to use. + ''; + }; + }; }; @@ -45,21 +54,21 @@ with lib; AmbientCapabilities = "CAP_SYS_NICE"; StateDirectory = "clickhouse"; LogsDirectory = "clickhouse"; - ExecStart = "${pkgs.clickhouse}/bin/clickhouse-server --config-file=${pkgs.clickhouse}/etc/clickhouse-server/config.xml"; + ExecStart = "${cfg.package}/bin/clickhouse-server --config-file=${cfg.package}/etc/clickhouse-server/config.xml"; }; }; environment.etc = { "clickhouse-server/config.xml" = { - source = "${pkgs.clickhouse}/etc/clickhouse-server/config.xml"; + source = "${cfg.package}/etc/clickhouse-server/config.xml"; }; "clickhouse-server/users.xml" = { - source = "${pkgs.clickhouse}/etc/clickhouse-server/users.xml"; + source = "${cfg.package}/etc/clickhouse-server/users.xml"; }; }; - environment.systemPackages = [ pkgs.clickhouse ]; + environment.systemPackages = [ cfg.package ]; # startup requires a `/etc/localtime` which only if exists if `time.timeZone != null` time.timeZone = mkDefault "UTC"; -- cgit 1.4.1 From 03e8e5848be209ddffa968ebe9de4dafb76bbf4e Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 21 Nov 2021 23:02:31 +0200 Subject: nixos/tests/installer: increase memorySize to 3G and increase the memory flags too --- nixos/tests/installer.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nixos') diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 1ff3dc76f4b62..0748a74ee1763 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -76,8 +76,8 @@ let def assemble_qemu_flags(): flags = "-cpu max" ${if (system == "x86_64-linux" || system == "i686-linux") - then ''flags += " -m 1024"'' - else ''flags += " -m 768 -enable-kvm -machine virt,gic-version=host"'' + then ''flags += " -m 1500"'' + else ''flags += " -m 1000 -enable-kvm -machine virt,gic-version=host"'' } return flags @@ -288,7 +288,7 @@ let # builds stuff in the VM, needs more juice virtualisation.diskSize = 8 * 1024; virtualisation.cores = 8; - virtualisation.memorySize = 2048; + virtualisation.memorySize = 3096; # Use a small /dev/vdb as the root disk for the # installer. This ensures the target disk (/dev/vda) is -- cgit 1.4.1