···34 sparse-checkout: ci
3536 - name: Install Nix
37- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
38 with:
39 extra_nix_config: sandbox = true
40···44 # See ./codeowners-v2.yml, reuse the same App because we need the same permissions
45 # Can't use the token received from permissions above, because it can't get enough permissions
46 - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
47- if: vars.OWNER_APP_ID
48 id: app-token
49 with:
50 app-id: ${{ vars.OWNER_APP_ID }}
···34 sparse-checkout: ci
3536 - name: Install Nix
37+ uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # v31
38 with:
39 extra_nix_config: sandbox = true
40···44 # See ./codeowners-v2.yml, reuse the same App because we need the same permissions
45 # Can't use the token received from permissions above, because it can't get enough permissions
46 - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
47+ if: github.event_name == 'pull_request_target' && vars.OWNER_APP_ID
48 id: app-token
49 with:
50 app-id: ${{ vars.OWNER_APP_ID }}
···161162<!-- TODO(@maralorn) Link to package set generation docs in the contributors guide below. -->
163000000000000000000000164## `haskellPackages.mkDerivation` {#haskell-mkderivation}
165166Every haskell package set has its own haskell-aware `mkDerivation` which is used
···161162<!-- TODO(@maralorn) Link to package set generation docs in the contributors guide below. -->
163164+### GHC Deprecation Policy {#ghc-deprecation-policy}
165+166+We remove GHC versions according to the following policy:
167+168+#### Major GHC versions {#major-ghc-deprecation}
169+170+We keep the following GHC major versions:
171+1. The current Stackage LTS as the default and all later major versions.
172+2. The two latest major versions older than our default.
173+3. The currently recommended GHCup version and all later major versions.
174+175+Older GHC versions might be kept longer, if there are in-tree consumers. We will coordinate with the maintainers of those dependencies to find a way forward.
176+177+#### Minor GHC versions {#minor-ghc-deprecation}
178+179+Every major version has a default minor version. The default minor version will be updated as soon as viable without breakage.
180+181+Older minor versions for a supported major version will only be kept, if they are the last supported version of a major Stackage LTS release.
182+183+<!-- Policy introduced here: https://discourse.nixos.org/t/nixpkgs-ghc-deprecation-policy-user-feedback-necessary/64153 -->
184+185## `haskellPackages.mkDerivation` {#haskell-mkderivation}
186187Every haskell package set has its own haskell-aware `mkDerivation` which is used
+8-4
doc/languages-frameworks/rust.section.md
···605directory. In such cases, the `cargoRoot` attribute can be used to
606specify the crate's directory relative to `sourceRoot`. In the
607following example, the crate is in `src/rust`, as specified in the
608-`cargoRoot` attribute. Note that we also need to specify the correct
609-path for `fetchCargoVendor`.
610611```nix
612{
···627 };
628629 cargoDeps = rustPlatform.fetchCargoVendor {
630- inherit pname version src;
631- sourceRoot = "${pname}-${version}/${cargoRoot}";
0000632 hash = "sha256-ctUt8maCjnGddKPf+Ii++wKsAXA1h+JM6zKQNXXwJqQ=";
633 };
634
···605directory. In such cases, the `cargoRoot` attribute can be used to
606specify the crate's directory relative to `sourceRoot`. In the
607following example, the crate is in `src/rust`, as specified in the
608+`cargoRoot` attribute. Note that we also need to pass in `cargoRoot`
609+to `fetchCargoVendor`.
610611```nix
612{
···627 };
628629 cargoDeps = rustPlatform.fetchCargoVendor {
630+ inherit
631+ pname
632+ version
633+ src
634+ cargoRoot
635+ ;
636 hash = "sha256-ctUt8maCjnGddKPf+Ii++wKsAXA1h+JM6zKQNXXwJqQ=";
637 };
638
···1314<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
1516-- The `boot.readOnlyNixStore` has been removed. Control over bind mount options on `/nix/store` is now offered by the `boot.nixStoreMountOpts` option.
1718## Other Notable Changes {#sec-nixpkgs-release-25.11-notable-changes}
19
···1314<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
1516+- The `offrss` package was removed due to lack of upstream maintenance since 2012. It's recommended for users to migrate to another RSS reader
1718## Other Notable Changes {#sec-nixpkgs-release-25.11-notable-changes}
19
···3031- `renovate` was updated to v40. See the [upstream release notes](https://github.com/renovatebot/renovate/releases/tag/40.0.0) for breaking changes.
320033## Other Notable Changes {#sec-release-25.11-notable-changes}
3435<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
···3031- `renovate` was updated to v40. See the [upstream release notes](https://github.com/renovatebot/renovate/releases/tag/40.0.0) for breaking changes.
3233+- The `boot.readOnlyNixStore` has been removed. Control over bind mount options on `/nix/store` is now offered by the `boot.nixStoreMountOpts` option.
34+35## Other Notable Changes {#sec-release-25.11-notable-changes}
3637<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
···23 ;
2425 finalPackage = cfg.package.overridePythonAttrs (oldAttrs: {
26- propagatedBuildInputs =
27- oldAttrs.propagatedBuildInputs
28 # for audio enhancements like auto-gain, noise suppression
29 ++ cfg.package.optional-dependencies.webrtc
30 # vad is currently optional, because it is broken on aarch64-linux
···23 ;
2425 finalPackage = cfg.package.overridePythonAttrs (oldAttrs: {
26+ dependencies =
27+ oldAttrs.dependencies
28 # for audio enhancements like auto-gain, noise suppression
29 ++ cfg.package.optional-dependencies.webrtc
30 # vad is currently optional, because it is broken on aarch64-linux
+31
nixos/modules/services/networking/dsnet.md
···0000000000000000000000000000000
···1+# dsnet {#module-services-dsnet}
2+3+dsnet is a CLI tool to manage a centralised wireguard server. It allows easy
4+generation of client configuration, handling key generation, IP allocation etc.
5+6+It keeps its own configuration at `/etc/dsnetconfig.json`, which is more of a
7+database. It contains key material too.
8+9+The way this module works is to patch this database with whatever is configured
10+in the nix service instantiation. This happens automatically when required.
11+12+This way it is possible to decide what to let dnset manage and what parts you
13+want to keep declaratively.
14+15+```
16+services.dsnet = {
17+ enable = true;
18+ settings = {
19+ ExternalHostname = "vpn.example.com";
20+ Network = "10.171.90.0/24";
21+ Network6 = "";
22+ IP = "10.171.90.1";
23+ IP6 = "";
24+ DNS = "10.171.90.1";
25+ Networks = [ "0.0.0.0/0" ];
26+ };
27+28+```
29+30+31+See <https://github.com/naggie/dsnet> for more information.
···1+{
2+ config,
3+ lib,
4+ pkgs,
5+ ...
6+}:
7+8+let
9+ cfg = config.services.dsnet;
10+ settingsFormat = pkgs.formats.json { };
11+ patchFile = settingsFormat.generate "dsnet-patch.json" cfg.settings;
12+in
13+{
14+ options.services.dsnet = {
15+ enable = lib.mkEnableOption "dsnet, a centralised Wireguard VPN manager";
16+17+ package = lib.mkPackageOption pkgs "dsnet" { };
18+19+ settings = lib.mkOption {
20+ type = lib.types.submodule {
21+22+ freeformType = settingsFormat.type;
23+24+ options = {
25+ ExternalHostname = lib.mkOption {
26+ type = lib.types.nullOr lib.types.str;
27+ default = null;
28+ example = "vpn.example.com";
29+ description = ''
30+ The hostname that clients should use to connect to this server.
31+ This is used to generate the client configuration files.
32+33+ This is preferred over ExternalIP, as it allows for IPv4 and
34+ IPv6, as well as enabling the ability tp change IP.
35+ '';
36+ };
37+38+ ExternalIP = lib.mkOption {
39+ type = lib.types.nullOr lib.types.str;
40+ default = null;
41+ example = "192.0.2.1";
42+ description = ''
43+ The external IP address of the server. This is used to generate
44+ the client configuration files for when an ExternalHostname is not set.
45+46+ Leaving this empty will cause dsnet to use the IP address of
47+ what looks like the WAN interface.
48+ '';
49+ };
50+51+ ExternalIP6 = lib.mkOption {
52+ type = lib.types.nullOr lib.types.str;
53+ default = null;
54+ example = "2001:db8::1";
55+ description = ''
56+ The external IPv6 address of the server. This is used to generate
57+ the client configuration files for when an ExternalHostname is
58+ not set. Used in preference to ExternalIP.
59+60+ Leaving this empty will cause dsnet to use the IP address of
61+ what looks like the WAN interface.
62+ '';
63+ };
64+65+ Network = lib.mkOption {
66+ type = lib.types.nullOr lib.types.str;
67+ default = null;
68+ example = "172.18.0.0/24";
69+ description = ''
70+ The IPv4 network that the server will use to allocate IPs on the network.
71+ Leave this empty to let dsnet choose a network.
72+ '';
73+ };
74+75+ Network6 = lib.mkOption {
76+ type = lib.types.nullOr lib.types.str;
77+ default = null;
78+ example = "2001:db8::1/64";
79+ description = ''
80+ The IPv6 network that the server will use to allocate IPs on the
81+ network.
82+ Leave this empty to let dsnet choose a network.
83+ '';
84+ };
85+86+ IP = lib.mkOption {
87+ type = lib.types.nullOr lib.types.str;
88+ default = null;
89+ example = "172.18.0.1";
90+ description = ''
91+ The IPv4 address that the server will use on the network.
92+ Leave this empty to let dsnet choose an address.
93+ '';
94+ };
95+96+ IP6 = lib.mkOption {
97+ type = lib.types.nullOr lib.types.str;
98+ default = null;
99+ example = "2001:db8::1";
100+ description = ''
101+ The IPv6 address that the server will use on the network
102+ Leave this empty to let dsnet choose an address.
103+ '';
104+ };
105+106+ Networks = lib.mkOption {
107+ type = lib.types.nullOr (lib.types.listOf lib.types.str);
108+ default = null;
109+ example = [
110+ "0.0.0.0/0"
111+ "192.168.0.0/24"
112+ ];
113+ description = ''
114+ The CIDR networks that should route through this server. Clients
115+ will be configured to route traffic for these networks through
116+ the server peer.
117+ '';
118+ };
119+ };
120+ };
121+122+ default = { };
123+ description = ''
124+ The settings to use for dsnet. This will be converted to a JSON
125+ object that will be passed to dsnet as a patch, using the patch
126+ command when the service is started. See the dsnet documentation for
127+ more information on the additional options.
128+129+ Note that the resulting /etc/dsnetconfg.json is more of a database
130+ than it is a configuration file. It is therefore recommended that
131+ system specific values are configured here, rather than the full
132+ configuration including peers.
133+134+ Peers may be managed via the dsnet add/remove commands, negating the
135+ need to manage key material and cumbersom configuration with nix. If
136+ you want peer configuration in nix, you may as well use the regular
137+ wireguard module.
138+ '';
139+ example = {
140+ ExternalHostname = "vpn.example.com";
141+ ExternalIP = "127.0.0.1";
142+ ExternalIP6 = "";
143+ ListenPort = 51820;
144+ Network = "10.3.148.0/22";
145+ Network6 = "";
146+ IP = "10.3.148.1";
147+ IP6 = "";
148+ DNS = "8.8.8.8";
149+ Networks = [ "0.0.0.0/0" ];
150+ };
151+ };
152+ };
153+154+ config = lib.mkIf cfg.enable {
155+ environment.systemPackages = [ cfg.package ];
156+157+ systemd.services.dsnet = {
158+ description = "dsnet VPN Management";
159+ after = [ "network-online.target" ];
160+ wants = [ "network-online.target" ];
161+ wantedBy = [ "multi-user.target" ];
162+ preStart = ''
163+ test ! -f /etc/dsnetconfig.json && ${lib.getExe cfg.package} init
164+ ${lib.getExe cfg.package} patch < ${patchFile}
165+ '';
166+ serviceConfig = {
167+ ExecStart = "${lib.getExe cfg.package} up";
168+ ExecStop = "${lib.getExe cfg.package} down";
169+ Type = "oneshot";
170+ # consider the service to be active after process exits, so it can be
171+ # reloaded
172+ RemainAfterExit = true;
173+ };
174+175+ reload = ''
176+ ${lib.getExe cfg.package} patch < ${patchFile}
177+ ${lib.getExe cfg.package} sync < ${patchFile}
178+ '';
179+180+ # reload _instead_ of restarting on change
181+ reloadIfChanged = true;
182+ };
183+ };
184+}
+99-127
nixos/modules/services/networking/murmur.nix
···5 ...
6}:
78-with lib;
9-10let
11 cfg = config.services.murmur;
12 forking = cfg.logFile != null;
···14 database=${cfg.stateDir}/murmur.sqlite
15 dbDriver=QSQLITE
1617- autobanAttempts=${toString cfg.autobanAttempts}
18- autobanTimeframe=${toString cfg.autobanTimeframe}
19- autobanTime=${toString cfg.autobanTime}
2021- logfile=${optionalString (cfg.logFile != null) cfg.logFile}
22- ${optionalString forking "pidfile=/run/murmur/murmurd.pid"}
2324 welcometext="${cfg.welcometext}"
25- port=${toString cfg.port}
2627- ${optionalString (cfg.hostName != "") "host=${cfg.hostName}"}
28- ${optionalString (cfg.password != "") "serverpassword=${cfg.password}"}
2930- bandwidth=${toString cfg.bandwidth}
31- users=${toString cfg.users}
3233- textmessagelength=${toString cfg.textMsgLength}
34- imagemessagelength=${toString cfg.imgMsgLength}
35- allowhtml=${boolToString cfg.allowHtml}
36- logdays=${toString cfg.logDays}
37- bonjour=${boolToString cfg.bonjour}
38- sendversion=${boolToString cfg.sendVersion}
3940- ${optionalString (cfg.registerName != "") "registerName=${cfg.registerName}"}
41- ${optionalString (cfg.registerPassword != "") "registerPassword=${cfg.registerPassword}"}
42- ${optionalString (cfg.registerUrl != "") "registerUrl=${cfg.registerUrl}"}
43- ${optionalString (cfg.registerHostname != "") "registerHostname=${cfg.registerHostname}"}
4445- certrequired=${boolToString cfg.clientCertRequired}
46- ${optionalString (cfg.sslCert != "") "sslCert=${cfg.sslCert}"}
47- ${optionalString (cfg.sslKey != "") "sslKey=${cfg.sslKey}"}
48- ${optionalString (cfg.sslCa != "") "sslCA=${cfg.sslCa}"}
4950- ${optionalString (cfg.dbus != null) "dbus=${cfg.dbus}"}
5152 ${cfg.extraConfig}
53 '';
54in
55{
56- imports = [
57- (mkRenamedOptionModule [ "services" "murmur" "welcome" ] [ "services" "murmur" "welcometext" ])
58- (mkRemovedOptionModule [ "services" "murmur" "pidfile" ] "Hardcoded to /run/murmur/murmurd.pid now")
59- ];
60-61 options = {
62 services.murmur = {
63- enable = mkOption {
64- type = types.bool;
65- default = false;
66- description = "If enabled, start the Murmur Mumble server.";
67- };
6869- openFirewall = mkOption {
70- type = types.bool;
71- default = false;
72- description = ''
73- Open ports in the firewall for the Murmur Mumble server.
74- '';
75- };
7677- user = mkOption {
78- type = types.str;
79 default = "murmur";
80 description = ''
81 The name of an existing user to use to run the service.
···83 '';
84 };
8586- group = mkOption {
87- type = types.str;
88 default = "murmur";
89 description = ''
90 The name of an existing group to use to run the service.
···92 '';
93 };
9495- stateDir = mkOption {
96- type = types.path;
97 default = "/var/lib/murmur";
98 description = ''
99 Directory to store data for the server.
100 '';
101 };
102103- autobanAttempts = mkOption {
104- type = types.int;
105 default = 10;
106 description = ''
107 Number of attempts a client is allowed to make in
···110 '';
111 };
112113- autobanTimeframe = mkOption {
114- type = types.int;
115 default = 120;
116 description = ''
117 Timeframe in which a client can connect without being banned
···119 '';
120 };
121122- autobanTime = mkOption {
123- type = types.int;
124 default = 300;
125 description = "The amount of time an IP ban lasts (in seconds).";
126 };
127128- logFile = mkOption {
129- type = types.nullOr types.path;
130 default = null;
131 example = "/var/log/murmur/murmurd.log";
132 description = "Path to the log file for Murmur daemon. Empty means log to journald.";
133 };
134135- welcometext = mkOption {
136- type = types.str;
137 default = "";
138 description = "Welcome message for connected clients.";
139 };
140141- port = mkOption {
142- type = types.port;
143 default = 64738;
144 description = "Ports to bind to (UDP and TCP).";
145 };
146147- hostName = mkOption {
148- type = types.str;
149 default = "";
150 description = "Host to bind to. Defaults binding on all addresses.";
151 };
152153- package = mkPackageOption pkgs "murmur" { };
154155- password = mkOption {
156- type = types.str;
157 default = "";
158 description = "Required password to join server, if specified.";
159 };
160161- bandwidth = mkOption {
162- type = types.int;
163 default = 72000;
164 description = ''
165 Maximum bandwidth (in bits per second) that clients may send
···167 '';
168 };
169170- users = mkOption {
171- type = types.int;
172 default = 100;
173 description = "Maximum number of concurrent clients allowed.";
174 };
175176- textMsgLength = mkOption {
177- type = types.int;
178 default = 5000;
179 description = "Max length of text messages. Set 0 for no limit.";
180 };
181182- imgMsgLength = mkOption {
183- type = types.int;
184 default = 131072;
185 description = "Max length of image messages. Set 0 for no limit.";
186 };
187188- allowHtml = mkOption {
189- type = types.bool;
190 default = true;
191 description = ''
192 Allow HTML in client messages, comments, and channel
···194 '';
195 };
196197- logDays = mkOption {
198- type = types.int;
199 default = 31;
200 description = ''
201 How long to store RPC logs for in the database. Set 0 to
···203 '';
204 };
205206- bonjour = mkOption {
207- type = types.bool;
208- default = false;
209- description = ''
210- Enable Bonjour auto-discovery, which allows clients over
211- your LAN to automatically discover Murmur servers.
212- '';
213- };
214215- sendVersion = mkOption {
216- type = types.bool;
217 default = true;
218 description = "Send Murmur version in UDP response.";
219 };
220221- registerName = mkOption {
222- type = types.str;
223 default = "";
224 description = ''
225 Public server registration name, and also the name of the
···228 '';
229 };
230231- registerPassword = mkOption {
232- type = types.str;
233 default = "";
234 description = ''
235 Public server registry password, used authenticate your
···238 '';
239 };
240241- registerUrl = mkOption {
242- type = types.str;
243 default = "";
244 description = "URL website for your server.";
245 };
246247- registerHostname = mkOption {
248- type = types.str;
249 default = "";
250 description = ''
251 DNS hostname where your server can be reached. This is only
···255 '';
256 };
257258- clientCertRequired = mkOption {
259- type = types.bool;
260- default = false;
261- description = "Require clients to authenticate via certificates.";
262- };
263264- sslCert = mkOption {
265- type = types.str;
266 default = "";
267 description = "Path to your SSL certificate.";
268 };
269270- sslKey = mkOption {
271- type = types.str;
272 default = "";
273 description = "Path to your SSL key.";
274 };
275276- sslCa = mkOption {
277- type = types.str;
278 default = "";
279 description = "Path to your SSL CA certificate.";
280 };
281282- extraConfig = mkOption {
283- type = types.lines;
284 default = "";
285 description = "Extra configuration to put into murmur.ini.";
286 };
287288- environmentFile = mkOption {
289- type = types.nullOr types.path;
290 default = null;
291- example = literalExpression ''"''${config.services.murmur.stateDir}/murmurd.env"'';
292 description = ''
293 Environment file as defined in {manpage}`systemd.exec(5)`.
294···311 '';
312 };
313314- dbus = mkOption {
315- type = types.enum [
316 null
317 "session"
318 "system"
···323 };
324 };
325326- config = mkIf cfg.enable {
327- users.users.murmur = mkIf (cfg.user == "murmur") {
328 description = "Murmur Service user";
329 home = cfg.stateDir;
330 createHome = true;
331 uid = config.ids.uids.murmur;
332 group = cfg.group;
333 };
334- users.groups.murmur = mkIf (cfg.group == "murmur") {
335 gid = config.ids.gids.murmur;
336 };
337338- networking.firewall = mkIf cfg.openFirewall {
339 allowedTCPPorts = [ cfg.port ];
340 allowedUDPPorts = [ cfg.port ];
341 };
···353 serviceConfig = {
354 # murmurd doesn't fork when logging to the console.
355 Type = if forking then "forking" else "simple";
356- PIDFile = mkIf forking "/run/murmur/murmurd.pid";
357- EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile;
358 ExecStart = "${cfg.package}/bin/mumble-server -ini /run/murmur/murmurd.ini";
359 Restart = "always";
360 RuntimeDirectory = "murmur";
···390391 # currently not included in upstream package, addition requested at
392 # https://github.com/mumble-voip/mumble/issues/6078
393- services.dbus.packages = mkIf (cfg.dbus == "system") [
394 (pkgs.writeTextFile {
395 name = "murmur-dbus-policy";
396 text = ''
···432 r /run/murmur/murmurd.ini,
433 r ${configFile},
434 ''
435- + optionalString (cfg.logFile != null) ''
436 rw ${cfg.logFile},
437 ''
438- + optionalString (cfg.sslCert != "") ''
439 r ${cfg.sslCert},
440 ''
441- + optionalString (cfg.sslKey != "") ''
442 r ${cfg.sslKey},
443 ''
444- + optionalString (cfg.sslCa != "") ''
445 r ${cfg.sslCa},
446 ''
447- + optionalString (cfg.dbus != null) ''
448 dbus bus=${cfg.dbus}
449 ''
450 + ''
···5 ...
6}:
7008let
9 cfg = config.services.murmur;
10 forking = cfg.logFile != null;
···12 database=${cfg.stateDir}/murmur.sqlite
13 dbDriver=QSQLITE
1415+ autobanAttempts=${lib.toString cfg.autobanAttempts}
16+ autobanTimeframe=${lib.toString cfg.autobanTimeframe}
17+ autobanTime=${lib.toString cfg.autobanTime}
1819+ logfile=${lib.optionalString (cfg.logFile != null) cfg.logFile}
20+ ${lib.optionalString forking "pidfile=/run/murmur/murmurd.pid"}
2122 welcometext="${cfg.welcometext}"
23+ port=${lib.toString cfg.port}
2425+ ${lib.optionalString (cfg.hostName != "") "host=${cfg.hostName}"}
26+ ${lib.optionalString (cfg.password != "") "serverpassword=${cfg.password}"}
2728+ bandwidth=${lib.toString cfg.bandwidth}
29+ users=${lib.toString cfg.users}
3031+ textmessagelength=${lib.toString cfg.textMsgLength}
32+ imagemessagelength=${lib.toString cfg.imgMsgLength}
33+ allowhtml=${lib.boolToString cfg.allowHtml}
34+ logdays=${lib.toString cfg.logDays}
35+ bonjour=${lib.boolToString cfg.bonjour}
36+ sendversion=${lib.boolToString cfg.sendVersion}
3738+ ${lib.optionalString (cfg.registerName != "") "registerName=${cfg.registerName}"}
39+ ${lib.optionalString (cfg.registerPassword != "") "registerPassword=${cfg.registerPassword}"}
40+ ${lib.optionalString (cfg.registerUrl != "") "registerUrl=${cfg.registerUrl}"}
41+ ${lib.optionalString (cfg.registerHostname != "") "registerHostname=${cfg.registerHostname}"}
4243+ certrequired=${lib.boolToString cfg.clientCertRequired}
44+ ${lib.optionalString (cfg.sslCert != "") "sslCert=${cfg.sslCert}"}
45+ ${lib.optionalString (cfg.sslKey != "") "sslKey=${cfg.sslKey}"}
46+ ${lib.optionalString (cfg.sslCa != "") "sslCA=${cfg.sslCa}"}
4748+ ${lib.optionalString (cfg.dbus != null) "dbus=${cfg.dbus}"}
4950 ${cfg.extraConfig}
51 '';
52in
53{
0000054 options = {
55 services.murmur = {
56+ enable = lib.mkEnableOption "Mumble server";
00005758+ openFirewall = lib.mkEnableOption "opening ports in the firewall for the Mumble server";
0000005960+ user = lib.mkOption {
61+ type = lib.types.str;
62 default = "murmur";
63 description = ''
64 The name of an existing user to use to run the service.
···66 '';
67 };
6869+ group = lib.mkOption {
70+ type = lib.types.str;
71 default = "murmur";
72 description = ''
73 The name of an existing group to use to run the service.
···75 '';
76 };
7778+ stateDir = lib.mkOption {
79+ type = lib.types.path;
80 default = "/var/lib/murmur";
81 description = ''
82 Directory to store data for the server.
83 '';
84 };
8586+ autobanAttempts = lib.mkOption {
87+ type = lib.types.int;
88 default = 10;
89 description = ''
90 Number of attempts a client is allowed to make in
···93 '';
94 };
9596+ autobanTimeframe = lib.mkOption {
97+ type = lib.types.int;
98 default = 120;
99 description = ''
100 Timeframe in which a client can connect without being banned
···102 '';
103 };
104105+ autobanTime = lib.mkOption {
106+ type = lib.types.int;
107 default = 300;
108 description = "The amount of time an IP ban lasts (in seconds).";
109 };
110111+ logFile = lib.mkOption {
112+ type = lib.types.nullOr lib.types.path;
113 default = null;
114 example = "/var/log/murmur/murmurd.log";
115 description = "Path to the log file for Murmur daemon. Empty means log to journald.";
116 };
117118+ welcometext = lib.mkOption {
119+ type = lib.types.str;
120 default = "";
121 description = "Welcome message for connected clients.";
122 };
123124+ port = lib.mkOption {
125+ type = lib.types.port;
126 default = 64738;
127 description = "Ports to bind to (UDP and TCP).";
128 };
129130+ hostName = lib.mkOption {
131+ type = lib.types.str;
132 default = "";
133 description = "Host to bind to. Defaults binding on all addresses.";
134 };
135136+ package = lib.mkPackageOption pkgs "murmur" { };
137138+ password = lib.mkOption {
139+ type = lib.types.str;
140 default = "";
141 description = "Required password to join server, if specified.";
142 };
143144+ bandwidth = lib.mkOption {
145+ type = lib.types.int;
146 default = 72000;
147 description = ''
148 Maximum bandwidth (in bits per second) that clients may send
···150 '';
151 };
152153+ users = lib.mkOption {
154+ type = lib.types.int;
155 default = 100;
156 description = "Maximum number of concurrent clients allowed.";
157 };
158159+ textMsgLength = lib.mkOption {
160+ type = lib.types.int;
161 default = 5000;
162 description = "Max length of text messages. Set 0 for no limit.";
163 };
164165+ imgMsgLength = lib.mkOption {
166+ type = lib.types.int;
167 default = 131072;
168 description = "Max length of image messages. Set 0 for no limit.";
169 };
170171+ allowHtml = lib.mkOption {
172+ type = lib.types.bool;
173 default = true;
174 description = ''
175 Allow HTML in client messages, comments, and channel
···177 '';
178 };
179180+ logDays = lib.mkOption {
181+ type = lib.types.int;
182 default = 31;
183 description = ''
184 How long to store RPC logs for in the database. Set 0 to
···186 '';
187 };
188189+ bonjour = lib.mkEnableOption "Bonjour auto-discovery, which allows clients over your LAN to automatically discover Mumble servers";
0000000190191+ sendVersion = lib.mkOption {
192+ type = lib.types.bool;
193 default = true;
194 description = "Send Murmur version in UDP response.";
195 };
196197+ registerName = lib.mkOption {
198+ type = lib.types.str;
199 default = "";
200 description = ''
201 Public server registration name, and also the name of the
···204 '';
205 };
206207+ registerPassword = lib.mkOption {
208+ type = lib.types.str;
209 default = "";
210 description = ''
211 Public server registry password, used authenticate your
···214 '';
215 };
216217+ registerUrl = lib.mkOption {
218+ type = lib.types.str;
219 default = "";
220 description = "URL website for your server.";
221 };
222223+ registerHostname = lib.mkOption {
224+ type = lib.types.str;
225 default = "";
226 description = ''
227 DNS hostname where your server can be reached. This is only
···231 '';
232 };
233234+ clientCertRequired = lib.mkEnableOption "requiring clients to authenticate via certificates";
0000235236+ sslCert = lib.mkOption {
237+ type = lib.types.str;
238 default = "";
239 description = "Path to your SSL certificate.";
240 };
241242+ sslKey = lib.mkOption {
243+ type = lib.types.str;
244 default = "";
245 description = "Path to your SSL key.";
246 };
247248+ sslCa = lib.mkOption {
249+ type = lib.types.str;
250 default = "";
251 description = "Path to your SSL CA certificate.";
252 };
253254+ extraConfig = lib.mkOption {
255+ type = lib.types.lines;
256 default = "";
257 description = "Extra configuration to put into murmur.ini.";
258 };
259260+ environmentFile = lib.mkOption {
261+ type = lib.types.nullOr lib.types.path;
262 default = null;
263+ example = lib.literalExpression ''"''${config.services.murmur.stateDir}/murmurd.env"'';
264 description = ''
265 Environment file as defined in {manpage}`systemd.exec(5)`.
266···283 '';
284 };
285286+ dbus = lib.mkOption {
287+ type = lib.types.enum [
288 null
289 "session"
290 "system"
···295 };
296 };
297298+ config = lib.mkIf cfg.enable {
299+ users.users.murmur = lib.mkIf (cfg.user == "murmur") {
300 description = "Murmur Service user";
301 home = cfg.stateDir;
302 createHome = true;
303 uid = config.ids.uids.murmur;
304 group = cfg.group;
305 };
306+ users.groups.murmur = lib.mkIf (cfg.group == "murmur") {
307 gid = config.ids.gids.murmur;
308 };
309310+ networking.firewall = lib.mkIf cfg.openFirewall {
311 allowedTCPPorts = [ cfg.port ];
312 allowedUDPPorts = [ cfg.port ];
313 };
···325 serviceConfig = {
326 # murmurd doesn't fork when logging to the console.
327 Type = if forking then "forking" else "simple";
328+ PIDFile = lib.mkIf forking "/run/murmur/murmurd.pid";
329+ EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
330 ExecStart = "${cfg.package}/bin/mumble-server -ini /run/murmur/murmurd.ini";
331 Restart = "always";
332 RuntimeDirectory = "murmur";
···362363 # currently not included in upstream package, addition requested at
364 # https://github.com/mumble-voip/mumble/issues/6078
365+ services.dbus.packages = lib.mkIf (cfg.dbus == "system") [
366 (pkgs.writeTextFile {
367 name = "murmur-dbus-policy";
368 text = ''
···404 r /run/murmur/murmurd.ini,
405 r ${configFile},
406 ''
407+ + lib.optionalString (cfg.logFile != null) ''
408 rw ${cfg.logFile},
409 ''
410+ + lib.optionalString (cfg.sslCert != "") ''
411 r ${cfg.sslCert},
412 ''
413+ + lib.optionalString (cfg.sslKey != "") ''
414 r ${cfg.sslKey},
415 ''
416+ + lib.optionalString (cfg.sslCa != "") ''
417 r ${cfg.sslCa},
418 ''
419+ + lib.optionalString (cfg.dbus != null) ''
420 dbus bus=${cfg.dbus}
421 ''
422 + ''
···9 inherit (lib)
10 getExe
11 mapAttrs
12+ match
13 mkEnableOption
14 mkIf
15 mkPackageOption
···32 else
33 toString value
34 ) cfg.settings;
35+36+ proxySuffix = if match "unix:.*" cfg.bind != null then ":" else "";
3738 commonServiceConfig = {
39 RuntimeDirectory = "lasuite-docs";
···267 type = types.str;
268 default = if cfg.enableNginx then "localhost,127.0.0.1,${cfg.domain}" else "";
269 defaultText = lib.literalExpression ''
270+ if cfg.enableNginx then "localhost,127.0.0.1,''${cfg.domain}" else ""
271 '';
272 description = "Comma-separated list of hosts that are able to connect to the server";
273 };
···351 wantedBy = [ "multi-user.target" ];
352353 preStart = ''
00354 if [ ! -f .version ]; then
355 touch .version
356 fi
···372 environment = pythonEnvironment;
373374 serviceConfig = {
375+ BindReadOnlyPaths = "${cfg.backendPackage}/share/static:/var/lib/lasuite-docs/static";
376+377 ExecStart = utils.escapeSystemdExecArgs (
378 [
379 (lib.getExe' cfg.backendPackage "gunicorn")
···479 };
480481 locations."/media-auth" = {
482+ proxyPass = "http://${cfg.bind}${proxySuffix}/api/v1.0/documents/media-auth/";
483 recommendedProxySettings = true;
484 extraConfig = ''
0485 proxy_set_header X-Original-URL $request_uri;
486 proxy_pass_request_body off;
487 proxy_set_header Content-Length "";
···491492 locations."/media/" = {
493 proxyPass = cfg.s3Url;
0494 extraConfig = ''
495 auth_request /media-auth;
496 auth_request_set $authHeader $upstream_http_authorization;
+2-2
nixos/tests/minio.nix
···8283 # Create a test bucket on the server
84 machine.succeed(
85- "mc config host add minio http://localhost:9000 ${accessKey} ${secretKey} --api s3v4"
86 )
87 machine.succeed("mc mb minio/test-bucket")
88 machine.succeed("${minioPythonScript}")
···101102 # Create a test bucket on the server
103 machine.succeed(
104- "mc config host add minio https://localhost:9000 ${accessKey} ${secretKey} --api s3v4"
105 )
106 machine.succeed("mc --insecure mb minio/test-bucket")
107 machine.succeed("${minioPythonScript} tls")
···8283 # Create a test bucket on the server
84 machine.succeed(
85+ "mc alias set minio http://localhost:9000 ${accessKey} ${secretKey} --api s3v4"
86 )
87 machine.succeed("mc mb minio/test-bucket")
88 machine.succeed("${minioPythonScript}")
···101102 # Create a test bucket on the server
103 machine.succeed(
104+ "mc alias set minio https://localhost:9000 ${accessKey} ${secretKey} --api s3v4"
105 )
106 machine.succeed("mc --insecure mb minio/test-bucket")
107 machine.succeed("${minioPythonScript} tls")
···20 };
2122 cargoHash = "sha256-7mApZj3Ksy8Av0W+0+UZQCkH281bSBd4xo8/7JowmHs=";
23- cargoDepsName = finalAttrs.pname;
2425 meta = {
26 description = "Displays time as calculated by your longitude";
···20 };
2122 cargoHash = "sha256-7mApZj3Ksy8Av0W+0+UZQCkH281bSBd4xo8/7JowmHs=";
23+ cargoDepsName = "geoclock";
2425 meta = {
26 description = "Displays time as calculated by your longitude";
···1{
2 lib,
3 stdenv,
4- fetchurl,
0005 libogg,
6 libpng,
07}:
89-stdenv.mkDerivation rec {
10 pname = "libkate";
11- version = "0.4.1";
1213- src = fetchurl {
14- url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libkate/${pname}-${version}.tar.gz";
15- sha256 = "0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4";
00016 };
17000000018 buildInputs = [
19 libogg
20 libpng
21 ];
2223- meta = with lib; {
0024 description = "Library for encoding and decoding Kate streams";
25 longDescription = ''
26 This is libkate, the reference implementation of a codec for the Kate
27 bitstream format. Kate is a karaoke and text codec meant for encapsulation
28 in an Ogg container. It can carry Unicode text, images, and animate
29 them.'';
30- homepage = "https://code.google.com/archive/p/libkate/";
31- platforms = platforms.unix;
32- license = licenses.bsd3;
33 };
34-}
···1{
2 lib,
3 stdenv,
4+ fetchFromGitLab,
5+ autoreconfHook,
6+ bison,
7+ flex,
8 libogg,
9 libpng,
10+ pkg-config,
11}:
1213+stdenv.mkDerivation (finalAttrs: {
14 pname = "libkate";
15+ version = "0.4.3";
1617+ src = fetchFromGitLab {
18+ domain = "gitlab.xiph.org/";
19+ owner = "xiph";
20+ repo = "kate";
21+ tag = "kate-${finalAttrs.version}";
22+ hash = "sha256-HwDahmjDC+O321Ba7MnHoQdHOFUMpFzaNdLHQeEg11Q=";
23 };
2425+ nativeBuildInputs = [
26+ autoreconfHook
27+ bison
28+ flex
29+ pkg-config # provides macro PKG_CHECK_MODULES
30+ ];
31+32 buildInputs = [
33 libogg
34 libpng
35 ];
3637+ enableParallelBuilding = true;
38+39+ meta = {
40 description = "Library for encoding and decoding Kate streams";
41 longDescription = ''
42 This is libkate, the reference implementation of a codec for the Kate
43 bitstream format. Kate is a karaoke and text codec meant for encapsulation
44 in an Ogg container. It can carry Unicode text, images, and animate
45 them.'';
46+ homepage = "https://wiki.xiph.org/index.php/OggKate";
47+ platforms = lib.platforms.unix;
48+ license = lib.licenses.bsd3;
49 };
50+})
···9 ghostscript,
10}:
1112-stdenv.mkDerivation rec {
13 pname = "ne";
14 version = "3.3.4";
1516 src = fetchFromGitHub {
17 owner = "vigna";
18 repo = "ne";
19- rev = version;
20- sha256 = "sha256-n8PERQD9G4jmW4avQjbFofrSapyRoSbQ2k1LzVt0i1o=";
21 };
2223 postPatch = ''
24- substituteInPlace makefile --replace "./version.pl" "perl version.pl"
25- substituteInPlace src/makefile --replace "-lcurses" "-lncurses"
26 '';
002728 nativeBuildInputs = [
29 texliveMedium
···3536 makeFlags = [ "PREFIX=${placeholder "out"}" ];
3738- meta = with lib; {
39 description = "Nice editor";
40 homepage = "https://ne.di.unimi.it/";
0041 longDescription = ''
42 ne is a free (GPL'd) text editor based on the POSIX standard that runs
43 (we hope) on almost any UN*X machine. ne is easy to use for the beginner,
44 but powerful and fully configurable for the wizard, and most sparing in its
45 resource usage. See the manual for some highlights of ne's features.
46 '';
47- license = licenses.gpl3;
48- platforms = platforms.unix;
49- maintainers = with maintainers; [ geri1701 ];
50 mainProgram = "ne";
51 };
52-}
···9 ghostscript,
10}:
1112+stdenv.mkDerivation (finalAttrs: {
13 pname = "ne";
14 version = "3.3.4";
1516 src = fetchFromGitHub {
17 owner = "vigna";
18 repo = "ne";
19+ tag = finalAttrs.version;
20+ hash = "sha256-n8PERQD9G4jmW4avQjbFofrSapyRoSbQ2k1LzVt0i1o=";
21 };
2223 postPatch = ''
24+ substituteInPlace makefile --replace-fail "./version.pl" "perl version.pl"
25+ substituteInPlace src/makefile --replace-fail "-lcurses" "-lncurses"
26 '';
27+28+ strictDeps = true;
2930 nativeBuildInputs = [
31 texliveMedium
···3738 makeFlags = [ "PREFIX=${placeholder "out"}" ];
3940+ meta = {
41 description = "Nice editor";
42 homepage = "https://ne.di.unimi.it/";
43+ changelog = "https://github.com/vigna/ne/releases/tag/${finalAttrs.version}";
44+ downloadPage = "https://github.com/vigna/ne";
45 longDescription = ''
46 ne is a free (GPL'd) text editor based on the POSIX standard that runs
47 (we hope) on almost any UN*X machine. ne is easy to use for the beginner,
48 but powerful and fully configurable for the wizard, and most sparing in its
49 resource usage. See the manual for some highlights of ne's features.
50 '';
51+ license = lib.licenses.gpl3Only;
52+ platforms = lib.platforms.unix;
53+ maintainers = with lib.maintainers; [ geri1701 ];
54 mainProgram = "ne";
55 };
56+})
···1diff --git a/CMakeLists.txt b/CMakeLists.txt
2-index 80a3bdcd6..380a1573a 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5-@@ -61,7 +61,7 @@ option(
6- "Link dependencies using CMake's find_package and do not use internal builds"
7- ${SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT}
8- )
9--option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" ON)
10-+option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" OFF)
11- # This option isn't recommended for distribution builds and probably won't work (yet).
12- cmake_dependent_option(
13- SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES
14-@@ -80,25 +80,6 @@ option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
15- option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
16- set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.")
17-18--if(SRB2_CONFIG_ENABLE_TESTS)
19-- # https://github.com/catchorg/Catch2
20-- CPMAddPackage(
21-- NAME Catch2
22-- VERSION 3.4.0
23-- GITHUB_REPOSITORY catchorg/Catch2
24-- OPTIONS
25-- "CATCH_INSTALL_DOCS OFF"
26-- )
27-- list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/extras")
28-- include(CTest)
29-- include(Catch)
30-- add_executable(srb2tests)
31-- # To add tests, use target_sources to add individual test files to the target in subdirs.
32-- target_link_libraries(srb2tests PRIVATE Catch2::Catch2 Catch2::Catch2WithMain)
33-- target_compile_features(srb2tests PRIVATE c_std_11 cxx_std_17)
34-- catch_discover_tests(srb2tests)
35--endif()
36--
37- # Enable CCache
38- # (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options)
39- if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
40-@@ -113,12 +94,6 @@ if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
41- message(WARNING "USE_CCACHE was set but ccache is not found (set CCACHE_TOOL_PATH)")
42- endif()
43- endif()
44--else()
45-- CPMAddPackage(
46-- NAME Ccache.cmake
47-- GITHUB_REPOSITORY TheLartians/Ccache.cmake
48-- VERSION 1.2
49-- )
50- endif()
51-52- # Dependencies
53-@@ -179,7 +154,7 @@ include(GitUtilities)
54 if("${SRB2_SDL2_EXE_NAME}" STREQUAL "")
55 # cause a reconfigure if the branch changes
56 get_git_dir(SRB2_GIT_DIR)
···1diff --git a/CMakeLists.txt b/CMakeLists.txt
2+index a4c631102..13b5743ca 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5+@@ -141,7 +141,7 @@ include(GitUtilities)
0000000000000000000000000000000000000000000000006 if("${SRB2_SDL2_EXE_NAME}" STREQUAL "")
7 # cause a reconfigure if the branch changes
8 get_git_dir(SRB2_GIT_DIR)
···1391 oauth2_proxy = throw "'oauth2_proxy' has been renamed to/replaced by 'oauth2-proxy'"; # Converted to throw 2024-10-17
1392 ocis-bin = throw "ocis-bin has been renamed to ocis_5-bin'. Future major.minor versions will be made available as separate packages"; # Added 2025-03-30
1393 odoo15 = throw "odoo15 has been removed from nixpkgs as it is unsupported; migrate to a newer version of odoo"; # Added 2025-05-06
01394 oil = lib.warnOnInstantiate "Oil has been replaced with the faster native C++ version and renamed to 'oils-for-unix'. See also https://github.com/oils-for-unix/oils/wiki/Oils-Deployments" oils-for-unix; # Added 2024-10-22
1395 onevpl-intel-gpu = lib.warnOnInstantiate "onevpl-intel-gpu has been renamed to vpl-gpu-rt" vpl-gpu-rt; # Added 2024-06-04
1396 openai-whisper-cpp = whisper-cpp; # Added 2024-12-13
···1391 oauth2_proxy = throw "'oauth2_proxy' has been renamed to/replaced by 'oauth2-proxy'"; # Converted to throw 2024-10-17
1392 ocis-bin = throw "ocis-bin has been renamed to ocis_5-bin'. Future major.minor versions will be made available as separate packages"; # Added 2025-03-30
1393 odoo15 = throw "odoo15 has been removed from nixpkgs as it is unsupported; migrate to a newer version of odoo"; # Added 2025-05-06
1394+ offrss = throw "offrss has been removed due to lack of upstream maintenance; consider using another rss reader"; # Added 2025-06-01
1395 oil = lib.warnOnInstantiate "Oil has been replaced with the faster native C++ version and renamed to 'oils-for-unix'. See also https://github.com/oils-for-unix/oils/wiki/Oils-Deployments" oils-for-unix; # Added 2024-10-22
1396 onevpl-intel-gpu = lib.warnOnInstantiate "onevpl-intel-gpu has been renamed to vpl-gpu-rt" vpl-gpu-rt; # Added 2024-06-04
1397 openai-whisper-cpp = whisper-cpp; # Added 2024-12-13