Commit Graph

256 Commits

Author SHA1 Message Date
Sebastián Zavala Villagómez
8a277a6abf nixos/automatic-timezoned: set time.timeZone to null to avoid silent overriding
Currently if a timezone was selected explicitly, the service will
silently override the value, essentially ignoring what is meant to be a
a deliberate choice of option. This may cause confusion as to why the
option is not doing anything when this service is enabled, particularly
in more complex set-ups after some time.

This will simply make the choice deliberate from the user's part, either
by having to remove the option or lowering its priority as a recognition
that it may be ignored.

This change was inspired by the `services.tzupdate` module, which does
the same.

[1]: <https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/tzupdate.nix#L24>
2024-10-10 14:33:12 -04:00
Sebastián Zavala Villagómez
1c5727cdf7 nixos/localtimed: set time.timeZone to null to avoid silent overriding
Currently if a timezone was selected explicitly, the service will
silently override the value, essentially ignoring what is meant to be a
a deliberate choice of option. This may cause confusion as to why the
option is not doing anything when this service is enabled, particularly
in more complex set-ups after some time.

This will simply make the choice deliberate from the user's part, either
by having to remove the option or lowering its priority as a recognition
that it may be ignored.

This change was inspired by the `services.tzupdate` module, which does
the same.

[1]: <https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/tzupdate.nix#L24>
2024-10-07 23:40:49 -04:00
Parker Hoyes
c960ba48d1
nixos/nix-daemon: Enable cgroups delegation (#339310)
When `use-cgroups` is enabled, the nix daemon creates sub-cgroups for the build processes (and itself if NixOS/nix#11412 is merged, see NixOS/nix#9675). `Delegate` should be set to prevent systemd from messing with the nix service's cgroups (https://github.com/systemd/systemd/blob/main/docs/CGROUP_DELEGATION.md) and ensure the OOM killer only targets the offending derivation and not the entire service (NixOS/nix#10374).
2024-09-13 16:08:29 +03:00
Lin Yinfeng
33e796b66f
nixos/userborn: convert users.users.<name>.home to string
If `opts.home` is not a string, an evaluation failure occurs in
`mapAttrs'`. Converting `opts.home` to string solves this issue.

The type of `users.users.<name>.home` is `lib.types.path`. Values
other than strings, e.g., derivations can also have the type
`lib.types.path`.
2024-09-11 18:28:58 +08:00
Lin Yinfeng
d3fdfb473d
nixos/userborn: support users.users.<name>.createHome 2024-09-11 18:09:29 +08:00
nikstur
4620067d79 nixos/userborn: init 2024-08-26 12:45:33 +02:00
Johann Wagner
49d137a967 nixos/cloud-init: Allow additional packages in cloud-init module 2024-07-02 19:19:56 +02:00
Johann Wagner
33c55024dc nixos/cloud-init: Allow systemd.network to be enabled if cloud-init.network is disabled 2024-07-02 19:12:30 +02:00
Gavin John
8dcb12dee3 services/localtimed: Add package and geoclue2Package options 2024-06-24 14:36:26 -05:00
h7x4
d8ddf6fb6d
Merge pull request #287611 from h7x4/nixos-module-fixup-kerberos-server
nixos/kerberos_server: use krb format generator, plus misc cleanup
2024-06-14 17:04:55 +02:00
h7x4
195d155a1c
nixos/kerberos_server: use krb format generator, plus misc cleanup
- Introduce more possible options by using the krb format generator.
- Enforce package choice is using a correct package.
- Use meta attribute to decide implementation, allows for overriding the
  package.
- Make necessary changes to the format, to allow for multiple ACL files in
  heimdal.
- Add systemd target and slice for both implementations.
- Move state to `/var/lib`
- Add documentation
2024-06-08 23:29:53 +02:00
Sandro Jäckel
1c60f0a9a0 nixos/bash-completion: move options to programs.bash.completion, add package option, drop with lib
This allows to easily test bash-completion updates without triggering a mass rebuild locally.
2024-06-06 02:51:06 +02:00
Will Fancher
dd0ebdffcd nixos/systemd-stage-1/dbus: Fix systemd services 2024-05-21 20:55:37 -04:00
Sandro Jäckel
21ab17debe
nixos/dbus: fix switching from dbus-broker to dbus 2024-05-04 21:56:17 +02:00
Florian Klink
b0d99c50c0 Revert "dbus: Switch default implementation to broker"
This reverts commit e827697fd3.

This seems to cause various issues during system activation, as reported
in https://github.com/NixOS/nixpkgs/issues/302771 for example.

Due to being close to branchoff, revert this for now.
We'll open a tracking issue to collect and sort out remaining issues.
2024-04-29 14:58:37 +03:00
Anderson Torres
cef01a232d services.earlyoom: set package option
Also add AndersonTorres as maintainer.
2024-04-19 09:58:27 -03:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Jörg Thalheim
d79ff2f15b
Merge pull request #241816 from Mic92/cloud-init
nixos/cloud-init: enable filesystem based on what is configured
2024-04-09 19:42:45 +02:00
Sandro Jäckel
476b8c276e
treewide: rename renamed sddm/displayManager settings 2024-04-08 21:56:38 +02:00
zimbatm
dc396ffe85 nixos/cloud-init: remove syslog.target from services
It has been removed from systemd, see NixOS#149721.
2024-04-04 19:11:16 +02:00
LDprg
f53b77fe44 dbus-broker: Add dbus for dbus tools to environment.systemPackages 2024-04-04 01:32:45 -07:00
LDprg
e827697fd3 dbus: Switch default implementation to broker 2024-04-04 01:32:45 -07:00
Maxime Brunet
5c1c4c75f7 automatic-timezoned: 1.0.148 -> 2.0.0 2024-02-18 15:01:25 -08:00
Olli Helenius
e103c5cfcf
nixos/systemd-lock-handler: init 2024-01-27 11:55:46 +02:00
Linus Heckemann
18e5176621
Merge pull request #270727 from nikstur/nixos-perlless-activation
Perlless Activation
2024-01-22 10:11:44 +01:00
maxine
f0dd758da7
Merge pull request #273707 from illustris/cloud-init
cloud-init: 23.3.3 -> 23.4.1, fix race condition on AWS
2024-01-21 00:39:06 +01:00
Jade Lovelace
6c5ab28fce nixos: fix a bunch of services missing dep on network-online.target
This was done by generating a truly hilarious configuration:

rg 'services\.[^.]+\.enable\t' opts-tags | cut -f1 > allonconfig.nix

The following were not tested due to other evaluation errors. They
should probably be manually audited.
services.amule
services.castopod
services.ceph
services.chatgpt-retrieval-plugin
services.clamsmtp
services.clight
services.dante
services.dex
services.discourse
services.dwm-status
services.engelsystem
services.foundationdb
services.frigate
services.frp
services.grocy
services.guacamole-client
services.hedgedoc
services.home-assistant
services.honk
services.imaginary
services.jitsi-meet
services.kerberos_server
services.limesurvey
services.mastodon
services.mediawiki
services.mobilizon
services.moodle
services.mosquitto
services.nextcloud
services.nullmailer
services.patroni
services.pfix-srsd
services.pgpkeyserver-lite
services.postfixadmin
services.roundcube
services.schleuder
services.self-deploy
services.slskd
services.spacecookie
services.statsd
services.step-ca
services.sympa
services.tsmBackup
services.vdirsyncer
services.vikunja
services.yandex-disk
services.zabbixWeb
2024-01-19 00:11:34 -08:00
Julian Stecklina
be2a4f37af nixos/dbus: explicitly set homeMode for dbus
Otherwise /run/dbus is created with the wrong permissions.

For some reason our recent changes made /run/dbus be 0700 instead of
0755. This is actually the default of homeMode. So something worked by
accident before?
2024-01-18 23:08:14 +01:00
Peder Bergebakken Sundt
8d9eb920d3
Merge pull request #273807 from h7x4/pkgs-fixup-heimdal
heimdal: 7.8.0 -> 7.8.0-unstable-2023-11-29, large cleanup
2024-01-15 23:16:30 +01:00
h7x4
c71fa4be0c
heimdal: clean up package
- Make inputs more diff friendly
- Add flags for enabling certain libraries
- Disable LDAP support as HDB module by default
- Add support for CJSON
- Flatten contents of `$out/libexec`, which earlier had an
  `heimdal/heimdal` directory
- Use SRI hash
- Enable package tests
- Add `passthru.tests.nixos`
- Add `meta.homepage` and `meta.changelog`

Co-authored-by: Felix Albrigtsen <felix@albrigtsen.it>
2024-01-14 01:13:19 +01:00
Peder Bergebakken Sundt
dff635f38d
Merge pull request #243169 from 2xsaiko/outgoing/krb5
nixos/krb5: cleanup, fix and RFC42-ify
2024-01-10 21:06:15 +01:00
illustris
d6baaf1c42
nixos/cloud-init: fix DHCP race condition 2024-01-03 23:50:30 +05:30
Nick Cao
9eeabd33d2
nixos/zram-generator: do not require zram to be a module 2024-01-03 12:08:30 -05:00
phaer
25e5dfd142 cachix-watch-store: allow to set a signing key 2023-12-24 10:25:32 +00:00
Marco Rebhan
fed77d1705
nixos/krb5: move to security.krb5 2023-12-21 11:35:26 +01:00
Marco Rebhan
92a541c0ed
nixos/krb5: cleanup, fix and RFC42-ify
This replaces the krb5 module's options with RFC 42-style krb5.settings
option, while greatly simplifying the code and fixing a few bugs,
namely:

- #243068 krb5: Configuration silently gets ignored when set by
  multiple modules
- not being able to use mkIf etc. inside subattributes of
  krb5.libdefaults, e.g. krb5.libdefaults.default_realm = mkIf ...

See #144575.
Closes #243068.

Co-authored-by: h7x4 <h7x4@nani.wtf>
2023-12-21 11:34:59 +01:00
r-vdp
c4b3e4f5f8 dbus-broker: avoid errors when reloading when /tmp got remounted
When reloading the dbus-broker service (e.g. when switching to a new generation),
the reload fails when /tmp got remounted after the service had been started.
Since the dbus-broker service starts early, and does not have default dependencies,
this situation does occur in practice.
This change makes sure that if there are mount units for /tmp, dbus-broker gets
ordered after them.

See also https://github.com/systemd/systemd/issues/28515
2023-12-19 10:34:41 +01:00
h7x4
79d3d59f58
treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Linus Heckemann
8670794565
Merge pull request #263203 from nikstur/replace-activation
Replace simple activationScripts
2023-10-28 10:17:15 +02:00
Bjørn Forsman
142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
nikstur
f0154409a1 nixos/nix-daemon: remove activationScript
The activationScript does not seem to be necessary anymore as the paths
are created anyways.
2023-10-20 10:26:32 +02:00
Nick Cao
e2689c1c98
nixos/zram-generator: drop outdated comments 2023-08-24 08:47:19 +08:00
Nick Cao
a7e095d9fd
nixos/zram-generator: init 2023-08-13 15:36:23 +08:00
FlafyDev
519a71edc3 nixos/nix-daemon: change regular if to mkIf 2023-07-23 04:16:04 +03:00
Jörg Thalheim
3d14617fc7 cloud-init: enable filesystems based on what is used 2023-07-17 13:26:31 +02:00
Nick Cao
b47c483bf8
nixos/bpftune: init 2023-07-17 15:59:49 +08:00
Ilan Joselevich
af8206f801
nixos/nix-daemon: use tmpfiles from nixPackage when possible 2023-07-07 17:29:05 +03:00
Sandro Jäckel
88d7aa56e1
nixos/nix*: remove not necessary imports
We do not really declare module dependencies anywhere else and it would
a nousance to move any file if many other referenced it without being
necessary. Also most higher level modules depend on most of the lower
level ones.
So removing this because it can only potentially cause weird issues.
2023-07-07 11:01:12 +02:00
Robert Hensing
54303b65ef
Merge pull request #241690 from hercules-ci/nixos-nix-modules
Split nixos/nix-daemon.nix
2023-07-07 10:29:58 +02:00