From 35d68ef143412f579544eaac7aaa87e29f84b15e Mon Sep 17 00:00:00 2001 From: volth Date: Tue, 13 Aug 2019 21:52:01 +0000 Subject: treewide: remove redundant quotes --- doc/doc-support/lib-function-locations.nix | 4 +- lib/lists.nix | 4 +- lib/systems/default.nix | 22 ++--- lib/systems/platforms.nix | 22 ++--- lib/types.nix | 2 +- nixos/lib/qemu-flags.nix | 8 +- .../config/fonts/fontconfig-penultimate.nix | 4 +- nixos/modules/config/fonts/fontconfig-ultimate.nix | 2 +- nixos/modules/config/fonts/fontconfig.nix | 4 +- nixos/modules/config/krb5/default.nix | 4 +- nixos/modules/config/malloc.nix | 8 +- nixos/modules/config/networking.nix | 8 +- nixos/modules/config/power-management.nix | 4 +- nixos/modules/config/shells-environment.nix | 4 +- nixos/modules/config/terminfo.nix | 2 +- nixos/modules/config/users-groups.nix | 4 +- nixos/modules/hardware/nitrokey.nix | 2 +- nixos/modules/hardware/video/ati.nix | 2 +- nixos/modules/misc/version.nix | 2 +- nixos/modules/programs/atop.nix | 2 +- nixos/modules/programs/bash/bash.nix | 6 +- nixos/modules/programs/less.nix | 12 +-- nixos/modules/programs/nano.nix | 2 +- nixos/modules/programs/npm.nix | 2 +- nixos/modules/programs/screen.nix | 2 +- nixos/modules/programs/xfs_quota.nix | 2 +- nixos/modules/programs/xonsh.nix | 2 +- nixos/modules/programs/zsh/zsh.nix | 8 +- nixos/modules/security/acme.nix | 4 +- nixos/modules/security/chromium-suid-sandbox.nix | 2 +- nixos/modules/security/polkit.nix | 2 +- nixos/modules/security/prey.nix | 2 +- nixos/modules/security/wrappers/default.nix | 10 +- nixos/modules/services/audio/alsa.nix | 2 +- nixos/modules/services/backup/mysql-backup.nix | 4 +- nixos/modules/services/backup/tsm.nix | 2 +- nixos/modules/services/backup/zfs-replication.nix | 2 +- nixos/modules/services/backup/znapzend.nix | 2 +- nixos/modules/services/cluster/hadoop/hdfs.nix | 4 +- nixos/modules/services/cluster/hadoop/yarn.nix | 4 +- .../cluster/kubernetes/addons/dashboard.nix | 2 +- .../services/cluster/kubernetes/addons/dns.nix | 12 +-- nixos/modules/services/databases/cassandra.nix | 4 +- nixos/modules/services/databases/pgmanage.nix | 8 +- nixos/modules/services/desktops/geoclue2.nix | 8 +- nixos/modules/services/games/terraria.nix | 2 +- nixos/modules/services/hardware/sane.nix | 4 +- nixos/modules/services/hardware/throttled.nix | 2 +- nixos/modules/services/hardware/tlp.nix | 4 +- nixos/modules/services/logging/logcheck.nix | 6 +- nixos/modules/services/mail/mlmmj.nix | 4 +- nixos/modules/services/mail/pfix-srsd.nix | 2 +- nixos/modules/services/mail/postfix.nix | 12 +-- nixos/modules/services/mail/postgrey.nix | 4 +- nixos/modules/services/mail/rspamd.nix | 2 +- nixos/modules/services/misc/airsonic.nix | 4 +- nixos/modules/services/misc/dysnomia.nix | 10 +- nixos/modules/services/misc/exhibitor.nix | 2 +- nixos/modules/services/misc/gitolite.nix | 4 +- nixos/modules/services/misc/matrix-synapse.nix | 2 +- nixos/modules/services/misc/nix-daemon.nix | 12 +-- nixos/modules/services/misc/nixos-manual.nix | 2 +- nixos/modules/services/misc/snapper.nix | 2 +- nixos/modules/services/misc/synergy.nix | 4 +- nixos/modules/services/misc/zoneminder.nix | 8 +- .../services/monitoring/dd-agent/dd-agent.nix | 2 +- .../services/monitoring/fusion-inventory.nix | 2 +- nixos/modules/services/monitoring/monit.nix | 4 +- nixos/modules/services/monitoring/thanos.nix | 10 +- nixos/modules/services/monitoring/zabbix-agent.nix | 2 +- nixos/modules/services/monitoring/zabbix-proxy.nix | 2 +- .../modules/services/monitoring/zabbix-server.nix | 2 +- .../services/network-filesystems/beegfs.nix | 2 +- .../modules/services/network-filesystems/ceph.nix | 10 +- .../modules/services/network-filesystems/samba.nix | 8 +- nixos/modules/services/networking/babeld.nix | 6 +- nixos/modules/services/networking/connman.nix | 6 +- nixos/modules/services/networking/consul.nix | 2 +- nixos/modules/services/networking/firewall.nix | 2 +- nixos/modules/services/networking/git-daemon.nix | 2 +- .../services/networking/hylafax/systemd.nix | 16 ++-- .../services/networking/ircd-hybrid/default.nix | 2 +- nixos/modules/services/networking/mtprotoproxy.nix | 6 +- nixos/modules/services/networking/ndppd.nix | 4 +- .../modules/services/networking/networkmanager.nix | 10 +- nixos/modules/services/networking/nsd.nix | 4 +- .../modules/services/networking/pdns-recursor.nix | 2 +- nixos/modules/services/networking/quicktun.nix | 24 ++--- nixos/modules/services/networking/smokeping.nix | 2 +- nixos/modules/services/networking/softether.nix | 2 +- .../strongswan-swanctl/param-constructors.nix | 2 +- .../networking/strongswan-swanctl/param-lib.nix | 8 +- nixos/modules/services/networking/syncthing.nix | 4 +- nixos/modules/services/networking/websockify.nix | 4 +- nixos/modules/services/networking/zerobin.nix | 4 +- nixos/modules/services/printing/cupsd.nix | 2 +- nixos/modules/services/security/fprot.nix | 2 +- nixos/modules/services/security/physlock.nix | 2 +- nixos/modules/services/security/sks.nix | 2 +- nixos/modules/services/system/localtime.nix | 2 +- nixos/modules/services/torrent/deluge.nix | 6 +- nixos/modules/services/ttys/agetty.nix | 2 +- .../services/web-apps/atlassian/confluence.nix | 4 +- .../modules/services/web-apps/atlassian/crowd.nix | 4 +- nixos/modules/services/web-apps/atlassian/jira.nix | 4 +- .../services/web-apps/icingaweb2/icingaweb2.nix | 6 +- .../web-apps/icingaweb2/module-monitoring.nix | 2 +- nixos/modules/services/web-apps/limesurvey.nix | 2 +- nixos/modules/services/web-apps/nextcloud.nix | 20 ++-- nixos/modules/services/web-apps/nexus.nix | 4 +- .../services/web-apps/pgpkeyserver-lite.nix | 2 +- nixos/modules/services/web-apps/restya-board.nix | 4 +- nixos/modules/services/web-apps/selfoss.nix | 2 +- nixos/modules/services/web-apps/tt-rss.nix | 4 +- nixos/modules/services/web-apps/zabbix.nix | 2 +- nixos/modules/services/x11/clight.nix | 2 +- .../services/x11/desktop-managers/gnome3.nix | 4 +- .../modules/services/x11/desktop-managers/mate.nix | 2 +- .../services/x11/desktop-managers/plasma5.nix | 2 +- .../services/x11/display-managers/lightdm.nix | 2 +- .../modules/services/x11/display-managers/sddm.nix | 2 +- nixos/modules/services/x11/hardware/synaptics.nix | 2 +- nixos/modules/services/x11/redshift.nix | 2 +- nixos/modules/services/x11/xautolock.nix | 2 +- nixos/modules/system/boot/kernel.nix | 2 +- nixos/modules/system/boot/kexec.nix | 2 +- nixos/modules/system/boot/loader/grub/grub.nix | 2 +- nixos/modules/system/boot/luksroot.nix | 2 +- nixos/modules/system/boot/systemd-nspawn.nix | 2 +- nixos/modules/system/boot/systemd.nix | 4 +- nixos/modules/tasks/filesystems.nix | 4 +- nixos/modules/tasks/filesystems/zfs.nix | 4 +- nixos/modules/tasks/kbd.nix | 6 +- .../modules/tasks/network-interfaces-scripted.nix | 4 +- nixos/modules/tasks/network-interfaces-systemd.nix | 6 +- nixos/modules/tasks/network-interfaces.nix | 18 ++-- nixos/modules/virtualisation/brightbox-image.nix | 2 +- nixos/modules/virtualisation/containers.nix | 2 +- nixos/modules/virtualisation/ec2-data.nix | 2 +- nixos/modules/virtualisation/kvmgt.nix | 2 +- nixos/modules/virtualisation/virtualbox-host.nix | 2 +- nixos/modules/virtualisation/vmware-guest.nix | 2 +- nixos/tests/beegfs.nix | 6 +- nixos/tests/containers-reloadable.nix | 6 +- nixos/tests/elk.nix | 6 +- nixos/tests/env.nix | 2 +- nixos/tests/gitlab.nix | 2 +- nixos/tests/kubernetes/base.nix | 2 +- nixos/tests/ldap.nix | 2 +- nixos/tests/mosquitto.nix | 2 +- nixos/tests/ndppd.nix | 2 +- nixos/tests/networking.nix | 6 +- nixos/tests/nextcloud/with-mysql-and-memcached.nix | 2 +- .../tests/nextcloud/with-postgresql-and-redis.nix | 4 +- nixos/tests/nghttpx.nix | 2 +- nixos/tests/pgmanage.nix | 2 +- nixos/tests/quake3.nix | 2 +- nixos/tests/strongswan-swanctl.nix | 24 ++--- .../editors/emacs-modes/libgenerated.nix | 4 +- .../editors/emacs-modes/melpa-packages.nix | 2 +- .../applications/editors/standardnotes/default.nix | 8 +- pkgs/applications/editors/vim/configurable.nix | 2 +- pkgs/applications/editors/vscode/vscode.nix | 8 +- pkgs/applications/editors/vscode/vscodium.nix | 8 +- pkgs/applications/kde/default.nix | 2 +- pkgs/applications/misc/taskjuggler/3.x/gemset.nix | 10 +- .../networking/browsers/firefox-bin/default.nix | 4 +- .../browsers/tor-browser-bundle-bin/default.nix | 6 +- pkgs/applications/networking/dropbox/default.nix | 4 +- .../instant-messengers/wire-desktop/default.nix | 8 +- .../networking/p2p/soulseekqt/default.nix | 4 +- .../networking/remote/anydesk/default.nix | 12 +-- .../networking/resilio-sync/default.nix | 8 +- pkgs/applications/radio/gnuradio/ais.nix | 4 +- pkgs/applications/science/logic/coq/default.nix | 2 +- pkgs/applications/science/math/nauty/default.nix | 8 +- pkgs/applications/video/kodi/plugins.nix | 2 +- pkgs/applications/virtualization/xen/4.10.nix | 6 +- pkgs/applications/virtualization/xen/4.5.nix | 6 +- pkgs/applications/virtualization/xen/4.8.nix | 6 +- .../window-managers/stumpwm/default.nix | 4 +- .../window-managers/way-cooler/default.nix | 6 +- pkgs/build-support/bintools-wrapper/default.nix | 8 +- pkgs/build-support/fetchdocker/default.nix | 4 +- .../rust/build-rust-crate/test/brotli-crates.nix | 32 +++---- pkgs/build-support/rust/default.nix | 4 +- pkgs/data/fonts/iosevka/package-lock.nix | 104 ++++++++++----------- pkgs/desktops/pantheon/update.nix | 2 +- pkgs/desktops/plasma-5/default.nix | 2 +- .../androidndk-pkgs/androidndk-pkgs.nix | 12 +-- pkgs/development/compilers/binaryen/default.nix | 2 +- pkgs/development/compilers/ccl/default.nix | 2 +- pkgs/development/compilers/crystal/default.nix | 28 +++--- pkgs/development/compilers/dmd/default.nix | 2 +- .../compilers/elm/packages/node-composition.nix | 2 +- pkgs/development/compilers/ghc/8.2.2-binary.nix | 10 +- pkgs/development/compilers/ghc/8.6.3-binary.nix | 6 +- pkgs/development/compilers/go/1.11.nix | 14 +-- pkgs/development/compilers/go/1.12.nix | 14 +-- pkgs/development/compilers/go/1.4.nix | 2 +- pkgs/development/compilers/julia/shared.nix | 4 +- pkgs/development/compilers/mozart/binary.nix | 4 +- pkgs/development/compilers/openjdk/8.nix | 6 +- pkgs/development/compilers/openjdk/openjfx/11.nix | 4 +- pkgs/development/compilers/openjdk/openjfx/12.nix | 4 +- pkgs/development/compilers/rust/bootstrap.nix | 2 +- .../development/coq-modules/QuickChick/default.nix | 2 +- .../development/coq-modules/Velisarios/default.nix | 2 +- pkgs/development/coq-modules/bignums/default.nix | 2 +- .../coq-modules/category-theory/default.nix | 2 +- pkgs/development/coq-modules/contribs/default.nix | 4 +- pkgs/development/coq-modules/coq-elpi/default.nix | 2 +- .../coq-modules/coq-ext-lib/default.nix | 2 +- .../coq-modules/coq-haskell/default.nix | 2 +- pkgs/development/coq-modules/coqhammer/default.nix | 2 +- pkgs/development/coq-modules/coqprime/default.nix | 2 +- pkgs/development/coq-modules/dpdgraph/default.nix | 2 +- pkgs/development/coq-modules/equations/default.nix | 2 +- pkgs/development/coq-modules/ltac2/default.nix | 2 +- pkgs/development/coq-modules/mathcomp/default.nix | 6 +- pkgs/development/coq-modules/mathcomp/extra.nix | 12 +-- pkgs/development/coq-modules/paramcoq/default.nix | 2 +- pkgs/development/interpreters/acl2/default.nix | 4 +- pkgs/development/interpreters/ruby/default.nix | 2 +- .../development/libraries/fflas-ffpack/default.nix | 16 ++-- pkgs/development/libraries/g2o/default.nix | 16 ++-- pkgs/development/libraries/givaro/default.nix | 16 ++-- pkgs/development/libraries/java/swt/default.nix | 6 +- .../libraries/kde-frameworks/default.nix | 2 +- pkgs/development/libraries/linbox/default.nix | 16 ++-- pkgs/development/libraries/openssl/default.nix | 8 +- .../libraries/oracle-instantclient/default.nix | 12 +-- pkgs/development/libraries/qt-5/modules/qtbase.nix | 16 ++-- pkgs/development/libraries/qt-5/qtModule.nix | 6 +- .../science/math/tensorflow/binary-hashes.nix | 6 +- pkgs/development/libraries/v8/5_x.nix | 4 +- pkgs/development/libraries/v8/default.nix | 2 +- pkgs/development/libraries/v8/plv8_6_x.nix | 4 +- .../mobile/androidenv/compose-android-packages.nix | 24 ++--- pkgs/development/mobile/androidenv/tools.nix | 4 +- pkgs/development/node-packages/composition-v10.nix | 2 +- pkgs/development/node-packages/composition-v12.nix | 2 +- pkgs/development/ocaml-modules/labltk/default.nix | 2 +- pkgs/development/ocaml-modules/lwt/legacy.nix | 2 +- .../ocaml-modules/ppx_tools/default.nix | 2 +- pkgs/development/python-modules/numpy/default.nix | 2 +- pkgs/development/python-modules/spacy/models.nix | 2 +- .../ruby-modules/bundled-common/default.nix | 4 +- .../ruby-modules/bundled-common/functions.nix | 12 +-- .../ruby-modules/bundler-env/default.nix | 2 +- .../tools/build-managers/bazel/default.nix | 8 +- .../tools/build-managers/meson/default.nix | 10 +- pkgs/development/tools/misc/kibana/5.x.nix | 12 +-- pkgs/development/tools/misc/kibana/6.x.nix | 10 +- pkgs/development/tools/misc/kibana/7.x.nix | 10 +- pkgs/development/tools/ocaml/camlp4/default.nix | 2 +- .../tools/ocaml/js_of_ocaml/default.nix | 2 +- .../tools/selenium/chromedriver/default.nix | 6 +- pkgs/development/web/remarkjs/nodepkgs.nix | 2 +- pkgs/games/dwarf-fortress/game.nix | 12 +-- pkgs/misc/base16-builder/node-packages.nix | 2 +- pkgs/misc/drivers/hplip/3.16.11.nix | 12 +-- pkgs/misc/drivers/hplip/3.18.5.nix | 12 +-- pkgs/misc/drivers/hplip/default.nix | 10 +- pkgs/misc/vim-plugins/vim-utils.nix | 4 +- pkgs/misc/vscode-extensions/python/default.nix | 6 +- pkgs/os-specific/bsd/netbsd/default.nix | 8 +- pkgs/os-specific/darwin/xcode/sdk-pkgs.nix | 6 +- pkgs/os-specific/linux/kernel/linux-rpi.nix | 6 +- pkgs/servers/nosql/arangodb/default.nix | 14 +-- pkgs/servers/search/elasticsearch/7.x.nix | 10 +- pkgs/servers/web-apps/cryptpad/node-packages.nix | 2 +- pkgs/stdenv/default.nix | 42 ++++----- pkgs/stdenv/generic/check-meta.nix | 2 +- pkgs/stdenv/linux/default.nix | 28 +++--- pkgs/stdenv/native/default.nix | 4 +- pkgs/tools/admin/pulumi/default.nix | 4 +- pkgs/tools/backup/lvmsync/default.nix | 2 +- pkgs/tools/bootloaders/refind/default.nix | 6 +- pkgs/tools/misc/grub/2.0x.nix | 16 ++-- pkgs/tools/misc/grub/pvgrub_image/default.nix | 6 +- pkgs/tools/misc/grub/trusted.nix | 4 +- pkgs/tools/networking/airfield/node.nix | 2 +- pkgs/tools/networking/envoy/default.nix | 2 +- pkgs/tools/networking/s6-networking/default.nix | 2 +- pkgs/tools/package-management/nixui/nixui.nix | 2 +- .../tools/security/bitwarden-cli/node-packages.nix | 2 +- pkgs/tools/security/bitwarden/default.nix | 4 +- pkgs/tools/security/vault/vault-bin.nix | 12 +-- pkgs/tools/typesetting/kindlegen/default.nix | 28 +++--- pkgs/tools/typesetting/tex/texlive/default.nix | 4 +- pkgs/top-level/haskell-packages.nix | 8 +- pkgs/top-level/stage.nix | 12 +-- 293 files changed, 860 insertions(+), 860 deletions(-) diff --git a/doc/doc-support/lib-function-locations.nix b/doc/doc-support/lib-function-locations.nix index ae7036e46264..68edd2709854 100644 --- a/doc/doc-support/lib-function-locations.nix +++ b/doc/doc-support/lib-function-locations.nix @@ -14,10 +14,10 @@ let builtins.map (subsetname: { subsetname = subsetname; - functions = libDefPos toplib."${subsetname}"; + functions = libDefPos toplib.${subsetname}; }) (builtins.filter - (name: builtins.isAttrs toplib."${name}") + (name: builtins.isAttrs toplib.${name}) (builtins.attrNames toplib)); nixpkgsLib = pkgs.lib; diff --git a/lib/lists.nix b/lib/lists.nix index 30d87ece6641..93a554f24f84 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -446,11 +446,11 @@ rec { if length list < 2 then # finish { result = list; } - else if dfsthis ? "cycle" + else if dfsthis ? cycle then # there's a cycle, starting from the current vertex, return it { cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited); inherit (dfsthis) loops; } - else if toporest ? "cycle" + else if toporest ? cycle then # there's a cycle somewhere else in the graph, return it toporest # Slow, but short. Can be made a bit faster with an explicit stack. diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 8aa413f53817..0c0cdf1f11b1 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -58,13 +58,13 @@ rec { uname = { # uname -s system = { - "linux" = "Linux"; - "windows" = "Windows"; - "darwin" = "Darwin"; - "netbsd" = "NetBSD"; - "freebsd" = "FreeBSD"; - "openbsd" = "OpenBSD"; - "wasi" = "Wasi"; + linux = "Linux"; + windows = "Windows"; + darwin = "Darwin"; + netbsd = "NetBSD"; + freebsd = "FreeBSD"; + openbsd = "OpenBSD"; + wasi = "Wasi"; }.${final.parsed.kernel.name} or null; # uname -p @@ -86,10 +86,10 @@ rec { else if final.isx86_64 then "x86_64" else if final.isx86 then "i386" else { - "powerpc" = "ppc"; - "powerpcle" = "ppc"; - "powerpc64" = "ppc64"; - "powerpc64le" = "ppc64le"; + powerpc = "ppc"; + powerpcle = "ppc"; + powerpc64 = "ppc64"; + powerpc64le = "ppc64le"; }.${final.parsed.cpu.name} or final.parsed.cpu.name; emulator = pkgs: let diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index a2b43c970a41..ab3cf1d54301 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -456,16 +456,16 @@ rec { }; selectBySystem = system: { - "i486-linux" = pc32; - "i586-linux" = pc32; - "i686-linux" = pc32; - "x86_64-linux" = pc64; - "armv5tel-linux" = sheevaplug; - "armv6l-linux" = raspberrypi; - "armv7a-linux" = armv7l-hf-multiplatform; - "armv7l-linux" = armv7l-hf-multiplatform; - "aarch64-linux" = aarch64-multiplatform; - "mipsel-linux" = fuloong2f_n32; - "powerpc64le-linux" = powernv; + i486-linux = pc32; + i586-linux = pc32; + i686-linux = pc32; + x86_64-linux = pc64; + armv5tel-linux = sheevaplug; + armv6l-linux = raspberrypi; + armv7a-linux = armv7l-hf-multiplatform; + armv7l-linux = armv7l-hf-multiplatform; + aarch64-linux = aarch64-multiplatform; + mipsel-linux = fuloong2f_n32; + powerpc64le-linux = powernv; }.${system} or pcBase; } diff --git a/lib/types.nix b/lib/types.nix index 9c00656ab918..f7e6d5335b11 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -42,7 +42,7 @@ rec { # Default type functor defaultFunctor = name: { inherit name; - type = types."${name}" or null; + type = types.${name} or null; wrapped = null; payload = null; binOp = a: b: null; diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix index 779f0377a512..774f66b4804e 100644 --- a/nixos/lib/qemu-flags.nix +++ b/nixos/lib/qemu-flags.nix @@ -17,9 +17,9 @@ in else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; qemuBinary = qemuPkg: { - "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; - "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; - "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; - "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; + x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; + armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; + aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; + x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; } diff --git a/nixos/modules/config/fonts/fontconfig-penultimate.nix b/nixos/modules/config/fonts/fontconfig-penultimate.nix index 04fa8b9559a9..963cbb0f08c4 100644 --- a/nixos/modules/config/fonts/fontconfig-penultimate.nix +++ b/nixos/modules/config/fonts/fontconfig-penultimate.nix @@ -35,8 +35,8 @@ let then "fontconfig" else "fontconfig_${version}"; makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; }; - cache = makeCache pkgs."${fcPackage}"; - cache32 = makeCache pkgs.pkgsi686Linux."${fcPackage}"; + cache = makeCache pkgs.${fcPackage}; + cache32 = makeCache pkgs.pkgsi686Linux.${fcPackage}; in pkgs.writeText "fc-00-nixos-cache.conf" '' diff --git a/nixos/modules/config/fonts/fontconfig-ultimate.nix b/nixos/modules/config/fonts/fontconfig-ultimate.nix index 45328f3eaf13..84d90899dfff 100644 --- a/nixos/modules/config/fonts/fontconfig-ultimate.nix +++ b/nixos/modules/config/fonts/fontconfig-ultimate.nix @@ -79,7 +79,7 @@ in config = mkIf (config.fonts.fontconfig.enable && cfg.enable) { fonts.fontconfig.confPackages = [ confPkg ]; - environment.variables."INFINALITY_FT" = cfg.preset; + environment.variables.INFINALITY_FT = cfg.preset; }; diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index 724158f73821..4112250b2f46 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -50,8 +50,8 @@ let cfg = config.fonts.fontconfig; then "fontconfig" else "fontconfig_${version}"; makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; }; - cache = makeCache pkgs."${fcPackage}"; - cache32 = makeCache pkgs.pkgsi686Linux."${fcPackage}"; + cache = makeCache pkgs.${fcPackage}; + cache32 = makeCache pkgs.pkgsi686Linux.${fcPackage}; in pkgs.writeText "fc-00-nixos-cache.conf" '' diff --git a/nixos/modules/config/krb5/default.nix b/nixos/modules/config/krb5/default.nix index 87021a27d34f..ff16ffcf9c65 100644 --- a/nixos/modules/config/krb5/default.nix +++ b/nixos/modules/config/krb5/default.nix @@ -15,7 +15,7 @@ let realms = optionalAttrs (lib.all (value: value != null) [ cfg.defaultRealm cfg.kdc cfg.kerberosAdminServer ]) { - "${cfg.defaultRealm}" = { + ${cfg.defaultRealm} = { kdc = cfg.kdc; admin_server = cfg.kerberosAdminServer; }; @@ -25,7 +25,7 @@ let cfg.domainRealm cfg.defaultRealm ]) { ".${cfg.domainRealm}" = cfg.defaultRealm; - "${cfg.domainRealm}" = cfg.defaultRealm; + ${cfg.domainRealm} = cfg.defaultRealm; }; }; diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index 65130454735c..a528de406498 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -6,7 +6,7 @@ let # The set of alternative malloc(3) providers. providers = { - "graphene-hardened" = rec { + graphene-hardened = rec { libPath = "${pkgs.graphene-hardened-malloc}/lib/libhardened_malloc.so"; description = '' An allocator designed to mitigate memory corruption attacks, such as @@ -14,7 +14,7 @@ let ''; }; - "jemalloc" = { + jemalloc = { libPath = "${pkgs.jemalloc}/lib/libjemalloc.so"; description = '' A general purpose allocator that emphasizes fragmentation avoidance @@ -22,7 +22,7 @@ let ''; }; - "scudo" = { + scudo = { libPath = "${pkgs.llvmPackages.compiler-rt}/lib/linux/libclang_rt.scudo-x86_64.so"; description = '' A user-mode allocator based on LLVM Sanitizer’s CombinedAllocator, @@ -32,7 +32,7 @@ let }; }; - providerConf = providers."${cfg.provider}"; + providerConf = providers.${cfg.provider}; # An output that contains only the shared library, to avoid # needlessly bloating the system closure diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index 4b9086022ed5..a89667ea221c 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -171,13 +171,13 @@ in environment.etc = { # /etc/services: TCP/UDP port assignments. - "services".source = pkgs.iana-etc + "/etc/services"; + services.source = pkgs.iana-etc + "/etc/services"; # /etc/protocols: IP protocol numbers. - "protocols".source = pkgs.iana-etc + "/etc/protocols"; + protocols.source = pkgs.iana-etc + "/etc/protocols"; # /etc/hosts: Hostname-to-IP mappings. - "hosts".text = let + hosts.text = let oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip}; allToString = set: concatMapStringsSep "\n" (oneToString set) (attrNames set); in '' @@ -190,7 +190,7 @@ in } // optionalAttrs (pkgs.stdenv.hostPlatform.libc == "glibc") { # /etc/rpc: RPC program numbers. - "rpc".source = pkgs.glibc.out + "/etc/rpc"; + rpc.source = pkgs.glibc.out + "/etc/rpc"; }; networking.proxy.envVars = diff --git a/nixos/modules/config/power-management.nix b/nixos/modules/config/power-management.nix index 0277f1ad11e9..64cdf50f1413 100644 --- a/nixos/modules/config/power-management.nix +++ b/nixos/modules/config/power-management.nix @@ -78,7 +78,7 @@ in }; # Service executed before suspending/hibernating. - systemd.services."pre-sleep" = + systemd.services.pre-sleep = { description = "Pre-Sleep Actions"; wantedBy = [ "sleep.target" ]; before = [ "sleep.target" ]; @@ -89,7 +89,7 @@ in serviceConfig.Type = "oneshot"; }; - systemd.services."post-resume" = + systemd.services.post-resume = { description = "Post-Resume Actions"; after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ]; script = diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix index 6379b52870ea..9dfc1add8299 100644 --- a/nixos/modules/config/shells-environment.nix +++ b/nixos/modules/config/shells-environment.nix @@ -163,7 +163,7 @@ in l = "ls -alh"; }; - environment.etc."shells".text = + environment.etc.shells.text = '' ${concatStringsSep "\n" (map utils.toShellPath cfg.shells)} /bin/sh @@ -171,7 +171,7 @@ in # For resetting environment with `. /etc/set-environment` when needed # and discoverability (see motivation of #30418). - environment.etc."set-environment".source = config.system.build.setEnvironment; + environment.etc.set-environment.source = config.system.build.setEnvironment; system.build.setEnvironment = pkgs.writeText "set-environment" '' diff --git a/nixos/modules/config/terminfo.nix b/nixos/modules/config/terminfo.nix index 4fd6ba5ea605..b86ce2dbf057 100644 --- a/nixos/modules/config/terminfo.nix +++ b/nixos/modules/config/terminfo.nix @@ -8,7 +8,7 @@ "/share/terminfo" ]; - environment.etc."terminfo" = { + environment.etc.terminfo = { source = "${config.system.path}/share/terminfo"; }; diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 25f1c67ce830..a11c038c2d35 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -546,11 +546,11 @@ in { environment.systemPackages = systemShells; environment.etc = { - "subuid" = { + subuid = { text = subuidFile; mode = "0644"; }; - "subgid" = { + subgid = { text = subgidFile; mode = "0644"; }; diff --git a/nixos/modules/hardware/nitrokey.nix b/nixos/modules/hardware/nitrokey.nix index 60fc95a75828..02e4c3f46f8d 100644 --- a/nixos/modules/hardware/nitrokey.nix +++ b/nixos/modules/hardware/nitrokey.nix @@ -36,6 +36,6 @@ in { inherit (cfg) group; } )) ]; - users.groups."${cfg.group}" = {}; + users.groups.${cfg.group} = {}; }; } diff --git a/nixos/modules/hardware/video/ati.nix b/nixos/modules/hardware/video/ati.nix index f867bba80630..0aab7bd6b92c 100644 --- a/nixos/modules/hardware/video/ati.nix +++ b/nixos/modules/hardware/video/ati.nix @@ -33,7 +33,7 @@ in boot.blacklistedKernelModules = [ "radeon" ]; - environment.etc."ati".source = "${ati_x11}/etc/ati"; + environment.etc.ati.source = "${ati_x11}/etc/ati"; }; diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index 3ae60cb79160..773724ffbd5e 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -85,7 +85,7 @@ in # Generate /etc/os-release. See # https://www.freedesktop.org/software/systemd/man/os-release.html for the # format. - environment.etc."os-release".text = + environment.etc.os-release.text = '' NAME=NixOS ID=nixos diff --git a/nixos/modules/programs/atop.nix b/nixos/modules/programs/atop.nix index 4651cdb76e0b..7ef8d687ca17 100644 --- a/nixos/modules/programs/atop.nix +++ b/nixos/modules/programs/atop.nix @@ -30,7 +30,7 @@ in }; config = mkIf (cfg.settings != {}) { - environment.etc."atoprc".text = + environment.etc.atoprc.text = concatStrings (mapAttrsToList (n: v: "${n} ${toString v}\n") cfg.settings); }; } diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index a7e57b8608d7..fe24246c22c7 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -159,7 +159,7 @@ in }; - environment.etc."profile".text = + environment.etc.profile.text = '' # /etc/profile: DO NOT EDIT -- this file has been generated automatically. # This file is read for login shells. @@ -184,7 +184,7 @@ in fi ''; - environment.etc."bashrc".text = + environment.etc.bashrc.text = '' # /etc/bashrc: DO NOT EDIT -- this file has been generated automatically. @@ -212,7 +212,7 @@ in # Configuration for readline in bash. We use "option default" # priority to allow user override using both .text and .source. - environment.etc."inputrc".source = mkOptionDefault ./inputrc; + environment.etc.inputrc.source = mkOptionDefault ./inputrc; users.defaultUserShell = mkDefault pkgs.bashInteractive; diff --git a/nixos/modules/programs/less.nix b/nixos/modules/programs/less.nix index 9fdf99e9c694..e19935b77caf 100644 --- a/nixos/modules/programs/less.nix +++ b/nixos/modules/programs/less.nix @@ -54,8 +54,8 @@ in type = types.attrsOf types.str; default = {}; example = { - "h" = "noaction 5\e("; - "l" = "noaction 5\e)"; + h = "noaction 5\e("; + l = "noaction 5\e)"; }; description = "Defines new command keys."; }; @@ -74,7 +74,7 @@ in type = types.attrsOf types.str; default = {}; example = { - "\e" = "abort"; + e = "abort"; }; description = "Defines new line-editing keys."; }; @@ -111,11 +111,11 @@ in environment.systemPackages = [ pkgs.less ]; environment.variables = { - "LESSKEY_SYSTEM" = toString lessKey; + LESSKEY_SYSTEM = toString lessKey; } // optionalAttrs (cfg.lessopen != null) { - "LESSOPEN" = cfg.lessopen; + LESSOPEN = cfg.lessopen; } // optionalAttrs (cfg.lessclose != null) { - "LESSCLOSE" = cfg.lessclose; + LESSCLOSE = cfg.lessclose; }; warnings = optional ( diff --git a/nixos/modules/programs/nano.nix b/nixos/modules/programs/nano.nix index 6a4d46338e19..5837dd46d7cd 100644 --- a/nixos/modules/programs/nano.nix +++ b/nixos/modules/programs/nano.nix @@ -35,7 +35,7 @@ in ###### implementation config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) { - environment.etc."nanorc".text = lib.concatStrings [ cfg.nanorc + environment.etc.nanorc.text = lib.concatStrings [ cfg.nanorc (lib.optionalString cfg.syntaxHighlight ''${LF}include "${pkgs.nano}/share/nano/*.nanorc"'') ]; }; diff --git a/nixos/modules/programs/npm.nix b/nixos/modules/programs/npm.nix index 5fdd4fa841a1..b351d80c7acf 100644 --- a/nixos/modules/programs/npm.nix +++ b/nixos/modules/programs/npm.nix @@ -36,7 +36,7 @@ in ###### implementation config = lib.mkIf cfg.enable { - environment.etc."npmrc".text = cfg.npmrc; + environment.etc.npmrc.text = cfg.npmrc; environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc"; diff --git a/nixos/modules/programs/screen.nix b/nixos/modules/programs/screen.nix index c1daaa58f16f..4fd800dbae79 100644 --- a/nixos/modules/programs/screen.nix +++ b/nixos/modules/programs/screen.nix @@ -24,7 +24,7 @@ in ###### implementation config = mkIf (cfg.screenrc != "") { - environment.etc."screenrc".text = cfg.screenrc; + environment.etc.screenrc.text = cfg.screenrc; environment.systemPackages = [ pkgs.screen ]; }; diff --git a/nixos/modules/programs/xfs_quota.nix b/nixos/modules/programs/xfs_quota.nix index 648fd9a8a94f..c03e59a5b4ab 100644 --- a/nixos/modules/programs/xfs_quota.nix +++ b/nixos/modules/programs/xfs_quota.nix @@ -61,7 +61,7 @@ in description = "Setup of xfs_quota projects. Make sure the filesystem is mounted with the pquota option."; example = { - "projname" = { + projname = { id = 50; path = "/xfsprojects/projname"; sizeHardLimit = "50g"; diff --git a/nixos/modules/programs/xonsh.nix b/nixos/modules/programs/xonsh.nix index 5cd2a49f8073..1590020f7b64 100644 --- a/nixos/modules/programs/xonsh.nix +++ b/nixos/modules/programs/xonsh.nix @@ -45,7 +45,7 @@ in config = mkIf cfg.enable { - environment.etc."xonshrc".text = cfg.config; + environment.etc.xonshrc.text = cfg.config; environment.systemPackages = [ cfg.package ]; diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index bd1a77680663..3f0c8262429a 100644 --- a/nixos/modules/programs/zsh/zsh.nix +++ b/nixos/modules/programs/zsh/zsh.nix @@ -135,7 +135,7 @@ in programs.zsh.shellAliases = mapAttrs (name: mkDefault) cfge.shellAliases; - environment.etc."zshenv".text = + environment.etc.zshenv.text = '' # /etc/zshenv: DO NOT EDIT -- this file has been generated automatically. # This file is read for all shells. @@ -159,7 +159,7 @@ in fi ''; - environment.etc."zprofile".text = + environment.etc.zprofile.text = '' # /etc/zprofile: DO NOT EDIT -- this file has been generated automatically. # This file is read for login shells. @@ -178,7 +178,7 @@ in fi ''; - environment.etc."zshrc".text = + environment.etc.zshrc.text = '' # /etc/zshrc: DO NOT EDIT -- this file has been generated automatically. # This file is read for interactive shells. @@ -219,7 +219,7 @@ in fi ''; - environment.etc."zinputrc".source = ./zinputrc; + environment.etc.zinputrc.source = ./zinputrc; environment.systemPackages = [ pkgs.zsh ] ++ optional cfg.enableCompletion pkgs.nix-zsh-completions; diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix index 092704c6fc3f..a6f9ed4329ad 100644 --- a/nixos/modules/security/acme.nix +++ b/nixos/modules/security/acme.nix @@ -378,8 +378,8 @@ in }) ); - systemd.targets."acme-selfsigned-certificates" = mkIf cfg.preliminarySelfsigned {}; - systemd.targets."acme-certificates" = {}; + systemd.targets.acme-selfsigned-certificates = mkIf cfg.preliminarySelfsigned {}; + systemd.targets.acme-certificates = {}; }) ]; diff --git a/nixos/modules/security/chromium-suid-sandbox.nix b/nixos/modules/security/chromium-suid-sandbox.nix index be6acb3f1f53..2255477f26e4 100644 --- a/nixos/modules/security/chromium-suid-sandbox.nix +++ b/nixos/modules/security/chromium-suid-sandbox.nix @@ -24,6 +24,6 @@ in config = mkIf cfg.enable { environment.systemPackages = [ sandbox ]; - security.wrappers."${sandbox.passthru.sandboxExecutableName}".source = "${sandbox}/bin/${sandbox.passthru.sandboxExecutableName}"; + security.wrappers.${sandbox.passthru.sandboxExecutableName}.source = "${sandbox}/bin/${sandbox.passthru.sandboxExecutableName}"; }; } diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix index 7f1de81d5b70..f2b2df4004cb 100644 --- a/nixos/modules/security/polkit.nix +++ b/nixos/modules/security/polkit.nix @@ -85,7 +85,7 @@ in security.wrappers = { pkexec.source = "${pkgs.polkit.bin}/bin/pkexec"; - "polkit-agent-helper-1".source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1"; + polkit-agent-helper-1.source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1"; }; systemd.tmpfiles.rules = [ diff --git a/nixos/modules/security/prey.nix b/nixos/modules/security/prey.nix index 1c643f2e1a57..b899ccb6c3e2 100644 --- a/nixos/modules/security/prey.nix +++ b/nixos/modules/security/prey.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.services.prey; - myPrey = pkgs."prey-bash-client".override { + myPrey = pkgs.prey-bash-client.override { apiKey = cfg.apiKey; deviceKey = cfg.deviceKey; }; diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix index dcb9c8d4ed5f..47738e7962ea 100644 --- a/nixos/modules/security/wrappers/default.nix +++ b/nixos/modules/security/wrappers/default.nix @@ -7,7 +7,7 @@ let programs = (lib.mapAttrsToList - (n: v: (if v ? "program" then v else v // {program=n;})) + (n: v: (if v ? program then v else v // {program=n;})) wrappers); securityWrapper = pkgs.stdenv.mkDerivation { @@ -74,15 +74,15 @@ let mkWrappedPrograms = builtins.map - (s: if (s ? "capabilities") + (s: if (s ? capabilities) then mkSetcapProgram ({ owner = "root"; group = "root"; } // s) else if - (s ? "setuid" && s.setuid) || - (s ? "setgid" && s.setgid) || - (s ? "permissions") + (s ? setuid && s.setuid) || + (s ? setgid && s.setgid) || + (s ? permissions) then mkSetuidProgram s else mkSetuidProgram ({ owner = "root"; diff --git a/nixos/modules/services/audio/alsa.nix b/nixos/modules/services/audio/alsa.nix index 376aad66e236..57bd4a8f5a62 100644 --- a/nixos/modules/services/audio/alsa.nix +++ b/nixos/modules/services/audio/alsa.nix @@ -99,7 +99,7 @@ in boot.kernelModules = optional config.sound.enableOSSEmulation "snd_pcm_oss"; - systemd.services."alsa-store" = + systemd.services.alsa-store = { description = "Store Sound Card State"; wantedBy = [ "multi-user.target" ]; unitConfig.RequiresMountsFor = "/var/lib/alsa"; diff --git a/nixos/modules/services/backup/mysql-backup.nix b/nixos/modules/services/backup/mysql-backup.nix index ba6e154f6b3d..dbd5605143f6 100644 --- a/nixos/modules/services/backup/mysql-backup.nix +++ b/nixos/modules/services/backup/mysql-backup.nix @@ -103,7 +103,7 @@ in }]; systemd = { - timers."mysql-backup" = { + timers.mysql-backup = { description = "Mysql backup timer"; wantedBy = [ "timers.target" ]; timerConfig = { @@ -112,7 +112,7 @@ in Unit = "mysql-backup.service"; }; }; - services."mysql-backup" = { + services.mysql-backup = { description = "Mysql backup service"; enable = true; serviceConfig = { diff --git a/nixos/modules/services/backup/tsm.nix b/nixos/modules/services/backup/tsm.nix index 3b2bb37491b5..6c238745797e 100644 --- a/nixos/modules/services/backup/tsm.nix +++ b/nixos/modules/services/backup/tsm.nix @@ -78,7 +78,7 @@ in config = mkIf cfg.enable { inherit assertions; programs.tsmClient.enable = true; - programs.tsmClient.servers."${cfg.servername}".passwdDir = + programs.tsmClient.servers.${cfg.servername}.passwdDir = mkDefault "/var/lib/tsm-backup/password"; systemd.services.tsm-backup = { description = "IBM Spectrum Protect (Tivoli Storage Manager) Backup"; diff --git a/nixos/modules/services/backup/zfs-replication.nix b/nixos/modules/services/backup/zfs-replication.nix index 785cedb98694..5a64304275d5 100644 --- a/nixos/modules/services/backup/zfs-replication.nix +++ b/nixos/modules/services/backup/zfs-replication.nix @@ -60,7 +60,7 @@ in { pkgs.lz4 ]; - systemd.services."zfs-replication" = { + systemd.services.zfs-replication = { after = [ "zfs-snapshot-daily.service" "zfs-snapshot-frequent.service" diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix index 9c7f84655727..f317078ddda2 100644 --- a/nixos/modules/services/backup/znapzend.nix +++ b/nixos/modules/services/backup/znapzend.nix @@ -361,7 +361,7 @@ in environment.systemPackages = [ pkgs.znapzend ]; systemd.services = { - "znapzend" = { + znapzend = { description = "ZnapZend - ZFS Backup System"; wantedBy = [ "zfs.target" ]; after = [ "zfs.target" ]; diff --git a/nixos/modules/services/cluster/hadoop/hdfs.nix b/nixos/modules/services/cluster/hadoop/hdfs.nix index a38b6a78d3a5..4f4b0a92108f 100644 --- a/nixos/modules/services/cluster/hadoop/hdfs.nix +++ b/nixos/modules/services/cluster/hadoop/hdfs.nix @@ -24,7 +24,7 @@ with lib; config = mkMerge [ (mkIf cfg.hdfs.namenode.enabled { - systemd.services."hdfs-namenode" = { + systemd.services.hdfs-namenode = { description = "Hadoop HDFS NameNode"; wantedBy = [ "multi-user.target" ]; @@ -44,7 +44,7 @@ with lib; }; }) (mkIf cfg.hdfs.datanode.enabled { - systemd.services."hdfs-datanode" = { + systemd.services.hdfs-datanode = { description = "Hadoop HDFS DataNode"; wantedBy = [ "multi-user.target" ]; diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix index 5345a2732d7e..c92020637e47 100644 --- a/nixos/modules/services/cluster/hadoop/yarn.nix +++ b/nixos/modules/services/cluster/hadoop/yarn.nix @@ -35,7 +35,7 @@ with lib; }) (mkIf cfg.yarn.resourcemanager.enabled { - systemd.services."yarn-resourcemanager" = { + systemd.services.yarn-resourcemanager = { description = "Hadoop YARN ResourceManager"; wantedBy = [ "multi-user.target" ]; @@ -53,7 +53,7 @@ with lib; }) (mkIf cfg.yarn.nodemanager.enabled { - systemd.services."yarn-nodemanager" = { + systemd.services.yarn-nodemanager = { description = "Hadoop YARN NodeManager"; wantedBy = [ "multi-user.target" ]; diff --git a/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix b/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix index 2295694ffc74..5117726bee99 100644 --- a/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix +++ b/nixos/modules/services/cluster/kubernetes/addons/dashboard.nix @@ -74,7 +74,7 @@ in { spec = { replicas = 1; revisionHistoryLimit = 10; - selector.matchLabels."k8s-app" = "kubernetes-dashboard"; + selector.matchLabels.k8s-app = "kubernetes-dashboard"; template = { metadata = { labels = { diff --git a/nixos/modules/services/cluster/kubernetes/addons/dns.nix b/nixos/modules/services/cluster/kubernetes/addons/dns.nix index ee0ac632ecf0..47e588de3c93 100644 --- a/nixos/modules/services/cluster/kubernetes/addons/dns.nix +++ b/nixos/modules/services/cluster/kubernetes/addons/dns.nix @@ -73,7 +73,7 @@ in { metadata = { labels = { "addonmanager.kubernetes.io/mode" = "Reconcile"; - "k8s-app" = "kube-dns"; + k8s-app = "kube-dns"; "kubernetes.io/cluster-service" = "true"; "kubernetes.io/bootstrapping" = "rbac-defaults"; }; @@ -102,7 +102,7 @@ in { }; labels = { "addonmanager.kubernetes.io/mode" = "Reconcile"; - "k8s-app" = "kube-dns"; + k8s-app = "kube-dns"; "kubernetes.io/cluster-service" = "true"; "kubernetes.io/bootstrapping" = "rbac-defaults"; }; @@ -130,7 +130,7 @@ in { metadata = { labels = { "addonmanager.kubernetes.io/mode" = "Reconcile"; - "k8s-app" = "kube-dns"; + k8s-app = "kube-dns"; "kubernetes.io/cluster-service" = "true"; }; name = "coredns"; @@ -144,7 +144,7 @@ in { metadata = { labels = { "addonmanager.kubernetes.io/mode" = cfg.reconcileMode; - "k8s-app" = "kube-dns"; + k8s-app = "kube-dns"; "kubernetes.io/cluster-service" = "true"; }; name = "coredns"; @@ -175,7 +175,7 @@ in { metadata = { labels = { "addonmanager.kubernetes.io/mode" = cfg.reconcileMode; - "k8s-app" = "kube-dns"; + k8s-app = "kube-dns"; "kubernetes.io/cluster-service" = "true"; "kubernetes.io/name" = "CoreDNS"; }; @@ -301,7 +301,7 @@ in { }; labels = { "addonmanager.kubernetes.io/mode" = "Reconcile"; - "k8s-app" = "kube-dns"; + k8s-app = "kube-dns"; "kubernetes.io/cluster-service" = "true"; "kubernetes.io/name" = "CoreDNS"; }; diff --git a/nixos/modules/services/databases/cassandra.nix b/nixos/modules/services/databases/cassandra.nix index a9da3a3c5620..74265f8488b5 100644 --- a/nixos/modules/services/databases/cassandra.nix +++ b/nixos/modules/services/databases/cassandra.nix @@ -397,14 +397,14 @@ in { } ]; users = mkIf (cfg.user == defaultUser) { - extraUsers."${defaultUser}" = + extraUsers.${defaultUser} = { group = cfg.group; home = cfg.homeDir; createHome = true; uid = config.ids.uids.cassandra; description = "Cassandra service user"; }; - extraGroups."${defaultUser}".gid = config.ids.gids.cassandra; + extraGroups.${defaultUser}.gid = config.ids.gids.cassandra; }; systemd.services.cassandra = diff --git a/nixos/modules/services/databases/pgmanage.nix b/nixos/modules/services/databases/pgmanage.nix index 1050c2dd481a..0f8634dab319 100644 --- a/nixos/modules/services/databases/pgmanage.nix +++ b/nixos/modules/services/databases/pgmanage.nix @@ -59,8 +59,8 @@ in { type = types.attrsOf types.str; default = {}; example = { - "nuc-server" = "hostaddr=192.168.0.100 port=5432 dbname=postgres"; - "mini-server" = "hostaddr=127.0.0.1 port=5432 dbname=postgres sslmode=require"; + nuc-server = "hostaddr=192.168.0.100 port=5432 dbname=postgres"; + mini-server = "hostaddr=127.0.0.1 port=5432 dbname=postgres sslmode=require"; }; description = '' pgmanage requires at least one PostgreSQL server be defined. @@ -192,13 +192,13 @@ in { }; }; users = { - users."${pgmanage}" = { + users.${pgmanage} = { name = pgmanage; group = pgmanage; home = cfg.sqlRoot; createHome = true; }; - groups."${pgmanage}" = { + groups.${pgmanage} = { name = pgmanage; }; }; diff --git a/nixos/modules/services/desktops/geoclue2.nix b/nixos/modules/services/desktops/geoclue2.nix index 040fe157d52d..6007dddf50c0 100644 --- a/nixos/modules/services/desktops/geoclue2.nix +++ b/nixos/modules/services/desktops/geoclue2.nix @@ -202,14 +202,14 @@ in ]; # restart geoclue service when the configuration changes - systemd.services."geoclue".restartTriggers = [ + systemd.services.geoclue.restartTriggers = [ config.environment.etc."geoclue/geoclue.conf".source ]; # this needs to run as a user service, since it's associated with the # user who is making the requests systemd.user.services = mkIf cfg.enableDemoAgent { - "geoclue-agent" = { + geoclue-agent = { description = "Geoclue agent"; script = "${package}/libexec/geoclue-2.0/demos/agent"; # this should really be `partOf = [ "geoclue.service" ]`, but @@ -219,12 +219,12 @@ in }; }; - services.geoclue2.appConfig."epiphany" = { + services.geoclue2.appConfig.epiphany = { isAllowed = true; isSystem = false; }; - services.geoclue2.appConfig."firefox" = { + services.geoclue2.appConfig.firefox = { isAllowed = true; isSystem = false; }; diff --git a/nixos/modules/services/games/terraria.nix b/nixos/modules/services/games/terraria.nix index 31f8edca20ce..a59b74c0b4c4 100644 --- a/nixos/modules/services/games/terraria.nix +++ b/nixos/modules/services/games/terraria.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.services.terraria; - worldSizeMap = { "small" = 1; "medium" = 2; "large" = 3; }; + worldSizeMap = { small = 1; medium = 2; large = 3; }; valFlag = name: val: optionalString (val != null) "-${name} \"${escape ["\\" "\""] (toString val)}\""; boolFlag = name: val: optionalString val "-${name}"; flags = [ diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix index fe05c5a5c06f..5a35bb3f981b 100644 --- a/nixos/modules/services/hardware/sane.nix +++ b/nixos/modules/services/hardware/sane.nix @@ -124,7 +124,7 @@ in environment.sessionVariables = env; services.udev.packages = backends; - users.groups."scanner".gid = config.ids.gids.scanner; + users.groups.scanner.gid = config.ids.gids.scanner; }) (mkIf config.services.saned.enable { @@ -152,7 +152,7 @@ in }; }; - users.users."scanner" = { + users.users.scanner = { uid = config.ids.uids.scanner; group = "scanner"; }; diff --git a/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix index 13fc5e4792e6..7617c4492d7c 100644 --- a/nixos/modules/services/hardware/throttled.nix +++ b/nixos/modules/services/hardware/throttled.nix @@ -20,7 +20,7 @@ in { config = mkIf cfg.enable { systemd.packages = [ pkgs.throttled ]; # The upstream package has this in Install, but that's not enough, see the NixOS manual - systemd.services."lenovo_fix".wantedBy = [ "multi-user.target" ]; + systemd.services.lenovo_fix.wantedBy = [ "multi-user.target" ]; environment.etc."lenovo_fix.conf".source = if cfg.extraConfig != "" diff --git a/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix index 092ff051a042..4f8af7978286 100644 --- a/nixos/modules/services/hardware/tlp.nix +++ b/nixos/modules/services/hardware/tlp.nix @@ -60,11 +60,11 @@ in powerManagement.cpufreq.max = null; powerManagement.cpufreq.min = null; - systemd.sockets."systemd-rfkill".enable = false; + systemd.sockets.systemd-rfkill.enable = false; systemd.services = { "systemd-rfkill@".enable = false; - "systemd-rfkill".enable = false; + systemd-rfkill.enable = false; tlp = { description = "TLP system startup/shutdown"; diff --git a/nixos/modules/services/logging/logcheck.nix b/nixos/modules/services/logging/logcheck.nix index f139190a1709..5be23757d636 100644 --- a/nixos/modules/services/logging/logcheck.nix +++ b/nixos/modules/services/logging/logcheck.nix @@ -23,9 +23,9 @@ let flags = "-r ${rulesDir} -c ${configFile} -L ${logFiles} -${levelFlag} -m ${cfg.mailTo}"; levelFlag = getAttrFromPath [cfg.level] - { "paranoid" = "p"; - "server" = "s"; - "workstation" = "w"; + { paranoid = "p"; + server = "s"; + workstation = "w"; }; cronJob = '' diff --git a/nixos/modules/services/mail/mlmmj.nix b/nixos/modules/services/mail/mlmmj.nix index 11565bc02f89..7ae00f3e501e 100644 --- a/nixos/modules/services/mail/mlmmj.nix +++ b/nixos/modules/services/mail/mlmmj.nix @@ -137,7 +137,7 @@ in ${pkgs.postfix}/bin/postmap ${stateDir}/transports ''; - systemd.services."mlmmj-maintd" = { + systemd.services.mlmmj-maintd = { description = "mlmmj maintenance daemon"; serviceConfig = { User = cfg.user; @@ -146,7 +146,7 @@ in }; }; - systemd.timers."mlmmj-maintd" = { + systemd.timers.mlmmj-maintd = { description = "mlmmj maintenance timer"; timerConfig.OnUnitActiveSec = cfg.maintInterval; wantedBy = [ "timers.target" ]; diff --git a/nixos/modules/services/mail/pfix-srsd.nix b/nixos/modules/services/mail/pfix-srsd.nix index 9599854352c9..38984f896d6a 100644 --- a/nixos/modules/services/mail/pfix-srsd.nix +++ b/nixos/modules/services/mail/pfix-srsd.nix @@ -40,7 +40,7 @@ with lib; systemPackages = [ pkgs.pfixtools ]; }; - systemd.services."pfix-srsd" = { + systemd.services.pfix-srsd = { description = "Postfix sender rewriting scheme daemon"; before = [ "postfix.service" ]; #note that we use requires rather than wants because postfix diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index 2b08ab1e6aa6..f772aae1bb8d 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -877,22 +877,22 @@ in } (mkIf haveAliases { - services.postfix.aliasFiles."aliases" = aliasesFile; + services.postfix.aliasFiles.aliases = aliasesFile; }) (mkIf haveTransport { - services.postfix.mapFiles."transport" = transportFile; + services.postfix.mapFiles.transport = transportFile; }) (mkIf haveVirtual { - services.postfix.mapFiles."virtual" = virtualFile; + services.postfix.mapFiles.virtual = virtualFile; }) (mkIf haveLocalRecipients { - services.postfix.mapFiles."local_recipients" = localRecipientMapFile; + services.postfix.mapFiles.local_recipients = localRecipientMapFile; }) (mkIf cfg.enableHeaderChecks { - services.postfix.mapFiles."header_checks" = headerChecksFile; + services.postfix.mapFiles.header_checks = headerChecksFile; }) (mkIf (cfg.dnsBlacklists != []) { - services.postfix.mapFiles."client_access" = checkClientAccessFile; + services.postfix.mapFiles.client_access = checkClientAccessFile; }) ]); } diff --git a/nixos/modules/services/mail/postgrey.nix b/nixos/modules/services/mail/postgrey.nix index 8e2b9c5dbc56..252c92e3595a 100644 --- a/nixos/modules/services/mail/postgrey.nix +++ b/nixos/modules/services/mail/postgrey.nix @@ -7,7 +7,7 @@ with lib; let natural = with types; addCheck int (x: x >= 0); natural' = with types; addCheck int (x: x > 0); - socket = with types; addCheck (either (submodule unixSocket) (submodule inetSocket)) (x: x ? "path" || x ? "port"); + socket = with types; addCheck (either (submodule unixSocket) (submodule inetSocket)) (x: x ? path || x ? port); inetSocket = with types; { options = { @@ -151,7 +151,7 @@ in { }; systemd.services.postgrey = let - bind-flag = if cfg.socket ? "path" then + bind-flag = if cfg.socket ? path then ''--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}'' else ''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}''; diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix index e59d5715de05..341303aee3c0 100644 --- a/nixos/modules/services/mail/rspamd.nix +++ b/nixos/modules/services/mail/rspamd.nix @@ -387,7 +387,7 @@ in gid = config.ids.gids.rspamd; }; - environment.etc."rspamd".source = rspamdDir; + environment.etc.rspamd.source = rspamdDir; systemd.services.rspamd = { description = "Rspamd Service"; diff --git a/nixos/modules/services/misc/airsonic.nix b/nixos/modules/services/misc/airsonic.nix index 8b2ec82c7705..c537354157fd 100644 --- a/nixos/modules/services/misc/airsonic.nix +++ b/nixos/modules/services/misc/airsonic.nix @@ -138,8 +138,8 @@ in { services.nginx = mkIf (cfg.virtualHost != null) { enable = true; - virtualHosts."${cfg.virtualHost}" = { - locations."${cfg.contextPath}".proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}"; + virtualHosts.${cfg.virtualHost} = { + locations.${cfg.contextPath}.proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}"; }; }; diff --git a/nixos/modules/services/misc/dysnomia.nix b/nixos/modules/services/misc/dysnomia.nix index 61ea822890ed..9402d5cd801c 100644 --- a/nixos/modules/services/misc/dysnomia.nix +++ b/nixos/modules/services/misc/dysnomia.nix @@ -8,9 +8,9 @@ let printProperties = properties: concatMapStrings (propertyName: let - property = properties."${propertyName}"; + property = properties.${propertyName}; in - if isList property then "${propertyName}=(${lib.concatMapStrings (elem: "\"${toString elem}\" ") (properties."${propertyName}")})\n" + if isList property then "${propertyName}=(${lib.concatMapStrings (elem: "\"${toString elem}\" ") (properties.${propertyName})})\n" else "${propertyName}=\"${toString property}\"\n" ) (builtins.attrNames properties); @@ -31,7 +31,7 @@ let ${concatMapStrings (containerName: let - containerProperties = cfg.containers."${containerName}"; + containerProperties = cfg.containers.${containerName}; in '' cat > ${containerName} <