Compare commits

..

No commits in common. "b00f19626a7ef8bfb065c087370a32aba634d9b2" and "db9627d93457466eef038192e36cb3748e799b36" have entirely different histories.

894 changed files with 8775 additions and 14212 deletions

6
.github/CODEOWNERS vendored
View File

@ -148,6 +148,10 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius @ma27
/pkgs/applications/science/math/R @jbedo
/pkgs/development/r-modules @jbedo
# Ruby
/pkgs/development/interpreters/ruby @marsam
/pkgs/development/ruby-modules @marsam
# Rust
/pkgs/development/compilers/rust @Mic92 @zowoq @winterqt @figsoda
/pkgs/build-support/rust @zowoq @winterqt @figsoda
@ -194,7 +198,7 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000 @ttuegel
# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @thoughtpolice
/pkgs/servers/sql/postgresql @thoughtpolice @marsam
/nixos/modules/services/databases/postgresql.xml @thoughtpolice
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
/nixos/tests/postgresql.nix @thoughtpolice

View File

@ -39,7 +39,7 @@ jobs:
# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests
# Retry the API query this many times
retryCount=5
retryCount=3
# Start with 5 seconds, but double every retry
retryInterval=5
while true; do

View File

@ -512,7 +512,6 @@ To get a sense for what changes are considered mass rebuilds, see [previously me
- Check for unnecessary whitespace with `git diff --check` before committing.
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
See [Squashing Commits](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_squashing) for additional information.
- For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).

View File

@ -6,11 +6,7 @@ It uses Linux' namespaces feature to create temporary lightweight environments w
Accepted arguments are:
- `name`
The name of the environment, and the wrapper executable if `pname` is unset.
- `pname`
The pname of the environment and the wrapper executable.
- `version`
The version of the environment.
The name of the environment and the wrapper executable.
- `targetPkgs`
Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
- `multiPkgs`

View File

@ -235,11 +235,6 @@ rec {
libc = "newlib";
};
microblaze-embedded = {
config = "microblazeel-none-elf";
libc = "newlib";
};
#
# Redox
#

View File

@ -1848,12 +1848,6 @@
githubId = 7745457;
name = "Astavie";
};
astindev = {
email = "astindev@pm.me";
github = "astindev";
githubId = 52360869;
name = "Astin";
};
astro = {
email = "astro@spaceboyz.net";
github = "astro";
@ -2034,12 +2028,6 @@
githubId = 687218;
name = "averelld";
};
avery = {
email = "nixpkgs@avery.cafe";
github = "coolavery";
githubId = 76545554;
name = "Avery";
};
avh4 = {
email = "gruen0aermel@gmail.com";
github = "avh4";
@ -7219,12 +7207,6 @@
githubId = 40209356;
name = "Gabriel Doriath Döhler";
};
gdifolco = {
email = "gautier.difolco@gmail.com";
github = "blackheaven";
githubId = 1362807;
name = "Gautier Di Folco";
};
gdinh = {
email = "nix@contact.dinh.ai";
github = "gdinh";
@ -9915,11 +9897,6 @@
github = "jpagex";
githubId = 635768;
};
jpaju = {
name = "Jaakko Paju";
github = "jpaju";
githubId = 36770267;
};
jpas = {
name = "Jarrod Pas";
email = "jarrod@jarrodpas.com";
@ -12406,6 +12383,11 @@
githubId = 1709273;
name = "Robin Hack";
};
marsam = {
github = "marsam";
githubId = 65531;
name = "Mario Rodas";
};
marsupialgutz = {
email = "mars@possums.xyz";
github = "pupbrained";
@ -16425,16 +16407,6 @@
githubId = 4579165;
name = "Danny Bautista";
};
pyrox0 = {
name = "Pyrox";
email = "pyrox@pyrox.dev";
matrix = "@pyrox:pyrox.dev";
github = "pyrox0";
githubId = 35778371;
keys = [{
fingerprint = "4CA9 72FB ADC8 1416 0F10 3138 FE1D 8A7D 620C 611F";
}];
};
pyxels = {
email = "pyxels.dev@gmail.com";
github = "Pyxels";
@ -17111,12 +17083,6 @@
githubId = 37246692;
name = "Riley Inman";
};
rinx = {
email = "rintaro.okamura@gmail.com";
github = "rinx";
githubId = 1588935;
name = "Rintaro Okamura";
};
riotbib = {
email = "lennart@cope.cool";
github = "riotbib";
@ -20052,6 +20018,16 @@
github = "thefossguy";
githubId = 44400303;
};
thehedgeh0g = {
name = "The Hedgehog";
email = "hedgehog@mrhedgehog.xyz";
matrix = "@mrhedgehog:jupiterbroadcasting.com";
github = "pyrox0";
githubId = 35778371;
keys = [{
fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752";
}];
};
thekostins = {
name = "Konstantin";
email = "anisimovkosta19@gmail.com";
@ -21961,8 +21937,7 @@
};
xgwq = {
name = "XGWQ";
email = "nixos.xgwq@xnee.net";
keys = [{ fingerprint = "6489 9EF2 A256 5C04 7426 686C 8337 A748 74EB E129"; }];
email = "nixos@xnee.de";
matrix = "@xgwq:nerdberg.de";
github = "peterablehmann";
githubId = 36541313;

View File

@ -5,11 +5,11 @@ argparse,,,,,,
basexx,,,,,,
binaryheap,,,,,,vcunat
busted,,,,,,
cassowary,,,,,,alerque
cassowary,,,,,,marsam alerque
cldr,,,,,,alerque
compat53,,,,,,vcunat
commons.nvim,,,,,,mrcjkb
cosmo,,,,,,
cosmo,,,,,,marsam
coxpcall,,,,1.17.0-1,,
cqueues,,,,,,vcunat
cyan,,,,,,

1 name src ref server version luaversion maintainers
5 basexx
6 binaryheap vcunat
7 busted
8 cassowary alerque marsam alerque
9 cldr alerque
10 compat53 vcunat
11 commons.nvim mrcjkb
12 cosmo marsam
13 coxpcall 1.17.0-1
14 cqueues vcunat
15 cyan

View File

@ -46,6 +46,7 @@ with lib.maintainers; {
bazel = {
members = [
mboes
marsam
uri-canva
cbley
olebedev
@ -735,6 +736,7 @@ with lib.maintainers; {
node = {
members = [
lilyinstarlight
marsam
winter
];
scope = "Maintain Node.js runtimes and build tooling.";
@ -904,6 +906,7 @@ with lib.maintainers; {
ruby = {
members = [
marsam
];
scope = "Maintain the Ruby interpreter and related packages.";
shortName = "Ruby";

View File

@ -208,8 +208,6 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `cudaPackages.autoFixElfFiles` has been deprecated for `pkgs.autoFixElfFiles`. Functionality has not changed, but the setuphook has been renamed and moved to the top-level package scope.
- `appimageTools.wrapAppImage` now create the binary at `$out/bin/${pname}` rather than `$out/bin/${pname}-${version}`, which will break downstream workarounds.
- `pdns` was updated to version [v4.9.x](https://doc.powerdns.com/authoritative/changelog/4.9.html), which introduces breaking changes. Check out the [Upgrade Notes](https://doc.powerdns.com/authoritative/upgrading.html#to-4-9-0) for details.
- `unrar` was updated to v7. See [changelog](https://www.rarlab.com/unrar7notes.htm) for more information.
@ -497,8 +495,6 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `boot.initrd.network.ssh.authorizedKeyFiles` is a new option in the initrd ssh daemon module, for adding authorized keys via list of files.
- `appimage`, `appimageTools.wrapAppImage` and `buildFHSEnvBubblewrap` now properly accepts `pname` and `version`.
- Programs written in [Nim](https://nim-lang.org/) are built with libraries selected by lockfiles.
The `nimPackages` and `nim2Packages` sets have been removed.
See https://nixos.org/manual/nixpkgs/unstable#nim for more information.

View File

@ -1,9 +1,4 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
with lib;
let
@ -17,7 +12,9 @@ in
Whether to install Singularity/Apptainer with system-level overriding such as SUID support.
'';
};
package = mkPackageOption pkgs "singularity" { example = "apptainer"; };
package = mkPackageOption pkgs "singularity" {
example = "apptainer";
};
packageOverriden = mkOption {
type = types.nullOr types.package;
default = null;
@ -78,19 +75,17 @@ in
};
config = mkIf cfg.enable {
programs.singularity.packageOverriden = (
cfg.package.override (
optionalAttrs cfg.enableExternalLocalStateDir { externalLocalStateDir = "/var/lib"; }
// optionalAttrs cfg.enableFakeroot {
newuidmapPath = "/run/wrappers/bin/newuidmap";
newgidmapPath = "/run/wrappers/bin/newgidmap";
}
// optionalAttrs cfg.enableSuid {
enableSuid = true;
starterSuidPath = "/run/wrappers/bin/${cfg.package.projectName}-suid";
}
)
);
programs.singularity.packageOverriden = (cfg.package.override (
optionalAttrs cfg.enableExternalLocalStateDir {
externalLocalStateDir = "/var/lib";
} // optionalAttrs cfg.enableFakeroot {
newuidmapPath = "/run/wrappers/bin/newuidmap";
newgidmapPath = "/run/wrappers/bin/newgidmap";
} // optionalAttrs cfg.enableSuid {
enableSuid = true;
starterSuidPath = "/run/wrappers/bin/${cfg.package.projectName}-suid";
}
));
environment.systemPackages = [ cfg.packageOverriden ];
security.wrappers."${cfg.packageOverriden.projectName}-suid" = mkIf cfg.enableSuid {
setuid = true;
@ -102,4 +97,5 @@ in
"d /var/lib/${cfg.packageOverriden.projectName}/mnt/session 0770 root root -"
];
};
}

View File

@ -66,12 +66,6 @@
config = {
virtualisation.docker.daemon.settings = lib.mkIf
(config.hardware.nvidia-container-toolkit.enable &&
(lib.versionAtLeast config.virtualisation.docker.package.version "25")) {
features.cdi = true;
};
hardware.nvidia-container-toolkit.mounts = let
nvidia-driver = config.hardware.nvidia.package;
in (lib.mkMerge [

View File

@ -247,15 +247,14 @@ in
(mkIf (cfg.database.host == "localhost") {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
path = [ config.services.postgresql.package ];
})
{
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
path = [ config.services.postgresql.package ];
script = let
psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} psql ${lib.optionalString (!localDB) "-h ${cfg.database.host} -U ${cfg.database.username} "} ${cfg.database.dbname}";
psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} ${pkgs.postgresql}/bin/psql ${lib.optionalString (!localDB) "-h ${cfg.database.host} -U ${cfg.database.username} "} ${cfg.database.dbname}";
in
''
version="$(${psql} -t <<< "select value from system where name = 'roundcube-version';" || true)"

View File

@ -102,7 +102,7 @@ in
default = {};
description = ''
Generates the conduit.toml configuration file. Refer to
<https://docs.conduit.rs/configuration.html>
<https://gitlab.com/famedly/conduit/-/blob/master/conduit-example.toml>
for details on supported values.
Note that database_path can not be edited because the service's reliance on systemd StateDir.
'';

View File

@ -722,5 +722,5 @@ in
timerConfig.OnCalendar = cfg.dump.interval;
};
};
meta.maintainers = with lib.maintainers; [ srhb ma27 pyrox0 ];
meta.maintainers = with lib.maintainers; [ srhb ma27 thehedgeh0g ];
}

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.apcupsd;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9162;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.artifactory;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9531;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.bind;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9119;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.bird;
inherit (lib)
mkOption
types
concatStringsSep
singleton
;
in
{
port = 9324;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.bitcoin;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9332;

View File

@ -1,14 +1,10 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
logPrefix = "services.prometheus.exporter.blackbox";
cfg = config.services.prometheus.exporters.blackbox;
inherit (lib)
mkOption
types
concatStringsSep
escapeShellArg
;
# This ensures that we can deal with string paths, path types and
# store-path strings with context.

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.buildkite-agent;
inherit (lib)
mkOption
types
concatStringsSep
optionalString
literalExpression
;
in
{
port = 9876;

View File

@ -1,15 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.collectd;
inherit (lib)
mkOption
mkEnableOption
types
optionalString
concatStringsSep
escapeShellArg
;
in
{
port = 9103;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.dmarc;
inherit (lib) mkOption types optionalString;
json = builtins.toJSON {
inherit (cfg) folders port;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.dnsmasq;
inherit (lib)
mkOption
types
concatStringsSep
escapeShellArg
;
in
{
port = 9153;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.domain;
inherit (lib) concatStringsSep;
in
{
port = 9222;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.dovecot;
inherit (lib)
mkOption
types
escapeShellArg
concatStringsSep
;
in
{
port = 9166;

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.flow;
inherit (lib)
mkOption
types
literalExpression
concatStringsSep
optionalString
;
in {
port = 9590;
extraOpts = {

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.fritzbox;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9133;

View File

@ -1,8 +1,8 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.idrac;
inherit (lib) mkOption types;
configFile = if cfg.configurationPath != null
then cfg.configurationPath

View File

@ -1,5 +1,7 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.imap-mailstat;
valueToString = value:
@ -11,15 +13,6 @@ let
else "XXX ${toString value}"
)
);
inherit (lib)
mkOption
types
concatStrings
concatStringsSep
attrValues
mapAttrs
optionalString
;
createConfigFile = accounts:
# unfortunately on toTOML yet
# https://github.com/NixOS/nix/issues/3929

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.influxdb;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9122;

View File

@ -1,15 +1,10 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
logPrefix = "services.prometheus.exporter.ipmi";
cfg = config.services.prometheus.exporters.ipmi;
inherit (lib)
mkOption
types
concatStringsSep
optionals
escapeShellArg
;
in {
port = 9290;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.jitsi;
inherit (lib)
mkOption
types
escapeShellArg
concatStringsSep
;
in
{
port = 9700;

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.json;
inherit (lib)
mkOption
types
escapeShellArg
concatStringsSep
mkRemovedOptionModule
;
in
{
port = 7979;

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.junos-czerwonk;
inherit (lib)
mkOption
types
escapeShellArg
mkIf
concatStringsSep
;
configFile = if cfg.configuration != null then configurationFile else (escapeShellArg cfg.configurationFile);

View File

@ -5,14 +5,10 @@
, ...
}:
with lib;
let
cfg = config.services.prometheus.exporters.kea;
inherit (lib)
mkOption
types
mkRenamedOptionModule
literalExpression
;
in {
imports = [
(mkRenamedOptionModule [ "controlSocketPaths" ] [ "targets" ])

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.keylight;
inherit (lib) concatStringsSep;
in
{
port = 9288;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.knot;
inherit (lib)
mkOption
types
literalExpression
concatStringsSep
;
in {
port = 9433;
extraOpts = {

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.lnd;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9092;

View File

@ -1,19 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.mail;
inherit (lib)
mkOption
types
mapAttrs'
nameValuePair
toLower
filterAttrs
escapeShellArg
literalExpression
mkIf
concatStringsSep
;
configFile = if cfg.configuration != null then configurationFile else (escapeShellArg cfg.configFile);

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.mikrotik;
inherit (lib)
mkOption
types
literalExpression
concatStringsSep
escapeShellArg
;
in
{
port = 9436;

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.minio;
inherit (lib)
mkOption
types
optionalString
concatStringsSep
escapeShellArg
;
in
{
port = 9290;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.modemmanager;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9539;

View File

@ -1,17 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.mongodb;
inherit (lib)
mkOption
types
optionalString
getExe
length
concatStringsSep
concatMapStringsSep
escapeShellArgs
;
in
{
port = 9216;

View File

@ -1,8 +1,11 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.nats;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 7777;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.nextcloud;
inherit (lib)
mkOption
types
escapeShellArg
concatStringsSep
;
in
{
port = 9205;

View File

@ -1,16 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.nginx;
inherit (lib)
mkOption
types
mkMerge
mkRemovedOptionModule
mkRenamedOptionModule
mkIf
concatStringsSep
;
in
{
port = 9113;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.nginxlog;
inherit (lib) mkOption types;
in {
port = 9117;
extraOpts = {

View File

@ -1,15 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.node;
inherit (lib)
mkOption
types
concatStringsSep
concatMapStringsSep
any
optionals
;
collectorIsEnabled = final: any (collector: (final == collector)) cfg.enabledCollectors;
collectorIsDisabled = final: any (collector: (final == collector)) cfg.disabledCollectors;
in

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.nut;
inherit (lib)
mkOption
types
optionalString
concatStringsSep
;
in
{
port = 9199;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.openldap;
inherit (lib) mkOption types concatStringsSep;
in {
port = 9330;
extraOpts = {

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.pgbouncer;
inherit (lib)
mkOption
types
optionals
escapeShellArg
concatStringsSep
;
in
{
port = 9127;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.pihole;
inherit (lib)
mkOption
types
mkRemovedOptionModule
optionalString
;
in
{
imports = [

View File

@ -1,9 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.ping;
inherit (lib) mkOption types concatStringsSep;
settingsFormat = pkgs.formats.yaml {};
configFile = settingsFormat.generate "config.yml" cfg.settings;

View File

@ -1,15 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.postfix;
inherit (lib)
mkOption
types
mkIf
escapeShellArg
concatStringsSep
optional
;
in
{
port = 9154;

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.postgres;
inherit (lib)
mkOption
types
mkIf
mkForce
concatStringsSep
;
in
{
port = 9187;

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.process;
inherit (lib)
mkOption
types
literalExpression
concatStringsSep
;
configFile = pkgs.writeText "process-exporter.yaml" (builtins.toJSON cfg.settings);
in
{

View File

@ -1,14 +1,8 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.pve;
inherit (lib)
mkOption
types
mkPackageOption
optionalString
optionalAttrs
;
# pve exporter requires a config file so create an empty one if configFile is not provided
emptyConfigFile = pkgs.writeTextFile {

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.py-air-control;
inherit (lib) mkOption types;
workingDir = "/var/lib/${cfg.stateDir}";

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.redis;
inherit (lib) concatStringsSep;
in
{
port = 9121;

View File

@ -1,18 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.restic;
inherit (lib)
mkOption
types
concatStringsSep
mkIf
mapAttrs'
splitString
toUpper
optionalAttrs
nameValuePair
;
in
{
port = 9753;

View File

@ -1,16 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.rspamd;
inherit (lib)
mkOption
types
replaceStrings
mkRemovedOptionModule
recursiveUpdate
concatStringsSep
literalExpression
;
mkFile = conf:
pkgs.writeText "rspamd-exporter-config.yml" (builtins.toJSON conf);

View File

@ -1,13 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.script;
inherit (lib)
mkOption
types
literalExpression
concatStringsSep
;
configFile = pkgs.writeText "script-exporter.yaml" (builtins.toJSON cfg.settings);
in
{

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.shelly;
inherit (lib) mkOption types;
in
{
port = 9784;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.smartctl;
inherit (lib) mkOption types literalExpression;
args = lib.escapeShellArgs ([
"--web.listen-address=${cfg.listenAddress}:${toString cfg.port}"
"--smartctl.path=${pkgs.smartmontools}/bin/smartctl"

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.smokeping;
inherit (lib) mkOption types concatStringsSep;
goDuration = types.mkOptionType {
name = "goDuration";
description = "Go duration (https://golang.org/pkg/time/#ParseDuration)";

View File

@ -1,15 +1,10 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
logPrefix = "services.prometheus.exporters.snmp";
cfg = config.services.prometheus.exporters.snmp;
inherit (lib)
mkOption
types
literalExpression
escapeShellArg
concatStringsSep
;
# This ensures that we can deal with string paths, path types and
# store-path strings with context.

View File

@ -1,13 +1,7 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.sql;
inherit (lib)
mkOption
types
mapAttrs
mapAttrsToList
concatStringsSep
;
cfgOptions = {
options = with types; {
jobs = mkOption {

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.statsd;
inherit (lib) concatStringsSep;
in
{
port = 9102;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.surfboard;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9239;

View File

@ -1,8 +1,9 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.prometheus.exporters.systemd;
inherit (lib) concatStringsSep;
with lib;
let cfg = config.services.prometheus.exporters.systemd;
in {
port = 9558;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.tor;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9130;

View File

@ -5,17 +5,10 @@
, ...
}:
with lib;
let
cfg = config.services.prometheus.exporters.unbound;
inherit (lib)
mkOption
types
mkRemovedOptionModule
optionalAttrs
optionalString
mkMerge
mkIf
;
in
{
imports = [

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.unifi;
inherit (lib)
mkOption
types
escapeShellArg
optionalString
concatStringsSep
;
in
{
port = 9130;

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.unpoller;
inherit (lib) mkEnableOption generators;
configFile = pkgs.writeText "prometheus-unpoller-exporter.json" (generators.toJSON {} {
poller = { inherit (cfg.log) debug quiet; };

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.v2ray;
inherit (lib) mkOption types concatStringsSep;
in
{
port = 9299;

View File

@ -1,15 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.varnish;
inherit (lib)
mkOption
types
mkDefault
optional
escapeShellArg
concatStringsSep
;
in
{
port = 9131;

View File

@ -1,15 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.wireguard;
inherit (lib)
mkOption
types
mkRenamedOptionModule
mkEnableOption
optionalString
escapeShellArg
;
in {
port = 9586;
imports = [

View File

@ -1,14 +1,9 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.zfs;
inherit (lib)
mkOption
types
concatStringsSep
concatMapStringsSep
;
in
{
port = 9134;

View File

@ -53,14 +53,15 @@ in {
Slice = "system-rustdesk.slice";
User = "rustdesk";
Group = "rustdesk";
DynamicUser = "yes";
Environment = [];
WorkingDirectory = "/var/lib/rustdesk";
StateDirectory = "rustdesk";
StateDirectoryMode = "0750";
LockPersonality = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateTmp = true;
PrivateUsers = true;
ProtectClock = true;
ProtectControlGroups = true;
@ -70,7 +71,10 @@ in {
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
RemoveIPC = true;
RestrictNamespaces = true;
RestrictSUIDSGID = true;
};
};
in lib.mkIf cfg.enable {

View File

@ -32,13 +32,6 @@ in
Whether to give the Sunshine binary CAP_SYS_ADMIN, required for DRM/KMS screen capture.
'';
};
autoStart = mkOption {
type = bool;
default = true;
description = ''
Whether sunshine should be started automatically.
'';
};
settings = mkOption {
default = { };
description = ''
@ -142,7 +135,7 @@ in
systemd.user.services.sunshine = {
description = "Self-hosted game stream host for Moonlight";
wantedBy = mkIf cfg.autoStart [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];

View File

@ -131,13 +131,21 @@ in {
Additional environment file as defined in {manpage}`systemd.exec(5)`.
Secrets like {env}`ADMIN_TOKEN` and {env}`SMTP_PASSWORD`
should be passed to the service without adding them to the world-readable Nix store.
may be passed to the service without adding them to the world-readable Nix store.
Note that this file needs to be available on the host on which `vaultwarden` is running.
Note that this file needs to be available on the host on which
`vaultwarden` is running.
As a concrete example, to make the Admin UI available (from which new users can be invited initially),
As a concrete example, to make the Admin UI available
(from which new users can be invited initially),
the secret {env}`ADMIN_TOKEN` needs to be defined as described
[here](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page):
[here](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page).
Setting `environmentFile` to `/var/lib/vaultwarden.env`
and ensuring permissions with e.g.
`chown vaultwarden:vaultwarden /var/lib/vaultwarden.env`
(the `vaultwarden` user will only exist after activating with
`enable = true;` before this), we can set the contents of the file to have
contents such as:
```
# Admin secret token, see

View File

@ -817,11 +817,11 @@ in {
base_url = mkOption {
type = types.nullOr types.nonEmptyStr;
default = if lib.versionOlder config.system.stateVersion "24.05"
then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}"
then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/"
else null;
defaultText = literalExpression ''
if lib.versionOlder config.system.stateVersion "24.05"
then "$\{httpConf.scheme}://$\{httpConf.host}:$\{builtins.toString httpConf.port}"
then "$\{httpConf.scheme}://$\{httpConf.host}:$\{builtins.toString httpConf.port}/media/"
else null;
'';
description = ''

View File

@ -941,6 +941,7 @@ in {
tiddlywiki = handleTest ./tiddlywiki.nix {};
tigervnc = handleTest ./tigervnc.nix {};
timescaledb = handleTest ./timescaledb.nix {};
promscale = handleTest ./promscale.nix {};
timezone = handleTest ./timezone.nix {};
tinc = handleTest ./tinc {};
tinydns = handleTest ./tinydns.nix {};

View File

@ -907,7 +907,7 @@ let
attrs = {
objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
olcDatabase = "{1}mdb";
olcDbDirectory = "/var/lib/openldap/db";
olcDbDirectory = "/var/db/openldap";
olcSuffix = "dc=example";
olcRootDN = {
# cn=root,dc=example

60
nixos/tests/promscale.nix Normal file
View File

@ -0,0 +1,60 @@
# mostly copied from ./timescaledb.nix which was copied from ./postgresql.nix
# as it seemed unapproriate to test additional extensions for postgresql there.
{ system ? builtins.currentSystem
, config ? { }
, pkgs ? import ../.. { inherit system config; }
}:
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;
let
postgresql-versions = import ../../pkgs/servers/sql/postgresql pkgs;
test-sql = pkgs.writeText "postgresql-test" ''
CREATE USER promscale SUPERUSER PASSWORD 'promscale';
CREATE DATABASE promscale OWNER promscale;
'';
make-postgresql-test = postgresql-name: postgresql-package: makeTest {
name = postgresql-name;
meta = with pkgs.lib.maintainers; {
maintainers = [ anpin ];
};
nodes.machine = { config, pkgs, ... }:
{
services.postgresql = {
enable = true;
package = postgresql-package;
extraPlugins = ps: with ps; [
timescaledb
promscale_extension
];
settings = { shared_preload_libraries = "timescaledb, promscale"; };
};
environment.systemPackages = with pkgs; [ promscale ];
};
testScript = ''
machine.start()
machine.wait_for_unit("postgresql")
with subtest("Postgresql with extensions timescaledb and promscale is available just after unit start"):
print(machine.succeed("sudo -u postgres psql -f ${test-sql}"))
machine.succeed("sudo -u postgres psql promscale -c 'SHOW shared_preload_libraries;' | grep promscale")
machine.succeed(
"promscale --db.name promscale --db.password promscale --db.user promscale --db.ssl-mode allow --startup.install-extensions --startup.only"
)
machine.succeed("sudo -u postgres psql promscale -c 'SELECT ps_trace.get_trace_retention_period();' | grep '(1 row)'")
machine.shutdown()
'';
};
#version 15 is not supported yet
applicablePostgresqlVersions = filterAttrs (_: value: versionAtLeast value.version "12" && !(versionAtLeast value.version "15")) postgresql-versions;
in
mapAttrs'
(name: package: {
inherit name;
value = make-postgresql-test name package;
})
applicablePostgresqlVersions

View File

@ -12,6 +12,8 @@ appimageTools.wrapType2 rec {
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

View File

@ -23,13 +23,13 @@ with lib.strings;
let
version = "2.72.14";
version = "2.70.3";
src = fetchFromGitHub {
owner = "grame-cncm";
repo = "faust";
rev = version;
sha256 = "sha256-RdSXiOYwKsfyrfHEughCeSwa9VFM6/3pMg54yCMpzLU=";
sha256 = "sha256-z6fW/T7wJZxugmvABlpvyMXvR4WkmC16INOKyyfKx8k=";
fetchSubmodules = true;
};
@ -63,6 +63,14 @@ let
ncurses_static
];
patches = [
(fetchpatch {
name = "fix-CsigFFun-API-declaration.patch";
url = "https://github.com/grame-cncm/faust/commit/10ce960e91a6237c7bff14a338e770757076ce9e.patch";
hash = "sha256-WMFLpLGTZpG7ni3lhI5VJHsmJViWZf4pAFuhYmFVRCE=";
})
];
passthru = { inherit wrap wrapWithBuildEnv faust2ApplBase; };
preConfigure = ''

View File

@ -17,6 +17,8 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
mkdir -p $out/share/${pname}
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/usr/share/icons $out/share/

View File

@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/tsirysndr/music-player";
changelog = "https://github.com/tsirysndr/music-player/releases/tag/v${version}";
license = licenses.mit;
maintainers = [ ];
maintainers = [ maintainers.marsam ];
mainProgram = "music-player";
};
}

View File

@ -73,7 +73,7 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/hrkfdn/ncspot";
changelog = "https://github.com/hrkfdn/ncspot/releases/tag/v${version}";
license = licenses.bsd2;
maintainers = with maintainers; [ liff ];
maintainers = with maintainers; [ marsam liff ];
mainProgram = "ncspot";
};
}

View File

@ -21,6 +21,10 @@ appimageTools.wrapType2 {
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
# unless linked, the binary is placed in $out/bin/nuclear-someVersion
# link it to $out/bin/nuclear
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
'';
meta = with lib; {

View File

@ -20,6 +20,7 @@ in appimageTools.wrapType2 {
extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
extraInstallCommands = ''
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/plexamp.desktop $out/share/applications/plexamp.desktop
install -m 444 -D ${appimageContents}/plexamp.png \
$out/share/icons/hicolor/512x512/apps/plexamp.png

View File

@ -16,6 +16,8 @@ appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname}'
@ -31,3 +33,4 @@ appimageTools.wrapType2 rec {
mainProgram = "sonixd";
};
}

View File

@ -5,6 +5,7 @@
, meson
, ninja
, gettext
, python3
, desktop-file-utils
, cargo
, rustPlatform
@ -18,25 +19,23 @@
, alsa-lib
, libpulseaudio
, wrapGAppsHook4
, blueprint-compiler
, gst_all_1
}:
stdenv.mkDerivation rec {
pname = "spot";
version = "0.4.1";
version = "0.4.0";
src = fetchFromGitHub {
owner = "xou816";
repo = "spot";
rev = version;
hash = "sha256-F875e/VZyN8mTfe9lgjtILNxMqn+66XoPCdaEUagHyU=";
hash = "sha256-K6wGWhAUUGsbE4O+z0TmJcJyGarvHgZteY527jfAa90=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-45Rqs2/tSWoyZVjFuygR5SxldjoqpprtOKEnMqJK+p8=";
hash = "sha256-eM2XLumn4dr2YtyUzBZJADlqdexc1iOaNJUudMlfSUc=";
};
nativeBuildInputs = [
@ -44,6 +43,7 @@ stdenv.mkDerivation rec {
meson
ninja
pkg-config
python3 # for meson postinstall script
gtk4 # for gtk-update-icon-cache
glib # for glib-compile-schemas
desktop-file-utils
@ -51,7 +51,6 @@ stdenv.mkDerivation rec {
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook4
blueprint-compiler
];
buildInputs = [
@ -62,13 +61,18 @@ stdenv.mkDerivation rec {
openssl
alsa-lib
libpulseaudio
gst_all_1.gst-plugins-base
gst_all_1.gstreamer
];
# https://github.com/xou816/spot/issues/313
mesonBuildType = "release";
postPatch = ''
chmod +x build-aux/cargo.sh
patchShebangs build-aux/cargo.sh build-aux/meson/postinstall.py
substituteInPlace build-aux/meson/postinstall.py \
--replace gtk-update-icon-cache gtk4-update-icon-cache
'';
passthru = {
updateScript = nix-update-script { };
};
@ -78,7 +82,7 @@ stdenv.mkDerivation rec {
mainProgram = "spot";
homepage = "https://github.com/xou816/spot";
license = licenses.mit;
maintainers = with maintainers; [ msfjarvis ];
maintainers = with maintainers; [ ];
platforms = platforms.linux;
};
}

View File

@ -42,7 +42,7 @@ rustPackages.rustPlatform.buildRustPackage rec {
homepage = "https://spotifyd.rs/";
changelog = "https://github.com/Spotifyd/spotifyd/blob/${src.rev}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ anderslundstedt Br1ght0ne ];
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
platforms = platforms.unix;
mainProgram = "spotifyd";
};

View File

@ -3,17 +3,19 @@
let
pname = "chain-desktop-wallet";
version = "0.1.1";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/crypto-com/${pname}/releases/download/v${version}/${pname}-${version}-x86_64.AppImage";
url = "https://github.com/crypto-com/${pname}/releases/download/v${version}/${name}-x86_64.AppImage";
sha256 = "12076hf8dlz0hg1pb2ixwlslrh8gi6s1iawnvhnn6vz4jmjvq356";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
appimageContents = appimageTools.extractType2 { inherit name src; };
in appimageTools.wrapType2 rec {
inherit pname version src;
inherit name src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
${imagemagick}/bin/convert ${appimageContents}/${pname}.png -resize 512x512 ${pname}_512.png
install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png

View File

@ -16,6 +16,7 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/frame.desktop $out/share/applications/frame.desktop
install -m 444 -D ${appimageContents}/frame.png \
$out/share/icons/hicolor/512x512/apps/frame.png

View File

@ -17,6 +17,7 @@ appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/ledger-live-desktop.desktop $out/share/applications/ledger-live-desktop.desktop
install -m 444 -D ${appimageContents}/ledger-live-desktop.png $out/share/icons/hicolor/1024x1024/apps/ledger-live-desktop.png
${imagemagick}/bin/convert ${appimageContents}/ledger-live-desktop.png -resize 512x512 ledger-live-desktop_512.png

View File

@ -5,6 +5,7 @@ let
pname = "MyCrypto";
version = "1.7.17";
sha256 = "20eb48989b5ae5e60e438eff6830ac79a0d89ac26dff058097260e747e866444"; # Taken from release's checksums.txt.gpg
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/mycryptohq/mycrypto/releases/download/${version}/linux-x86-64_${version}_MyCrypto.AppImage";
@ -12,7 +13,7 @@ let
};
appimageContents = appimageTools.extractType2 {
inherit pname version src;
inherit name src;
};
desktopItem = makeDesktopItem {
@ -25,12 +26,14 @@ let
};
in appimageTools.wrapType2 rec {
inherit pname version src;
inherit name src;
multiArch = false; # no p32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
mkdir -p $out/share
cp -rt $out/share ${desktopItem}/share/applications ${appimageContents}/usr/share/icons
chmod -R +w $out/share

Some files were not shown because too many files have changed in this diff Show More