Skip to content

Commit

Permalink
Merge pull request #67536 from volth/quotes
Browse files Browse the repository at this point in the history
treewide: remove redundant quotes
  • Loading branch information
Mic92 committed Aug 27, 2019
2 parents a611519 + 35d68ef commit 9f313d4
Show file tree
Hide file tree
Showing 293 changed files with 860 additions and 860 deletions.
4 changes: 2 additions & 2 deletions doc/doc-support/lib-function-locations.nix
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/lists.nix
Expand Up @@ -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.
Expand Down
22 changes: 11 additions & 11 deletions lib/systems/default.nix
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions lib/systems/platforms.nix
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion lib/types.nix
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions nixos/lib/qemu-flags.nix
Expand Up @@ -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";
}
4 changes: 2 additions & 2 deletions nixos/modules/config/fonts/fontconfig-penultimate.nix
Expand Up @@ -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" ''
<?xml version='1.0'?>
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/config/fonts/fontconfig-ultimate.nix
Expand Up @@ -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;

};

Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/config/fonts/fontconfig.nix
Expand Up @@ -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" ''
<?xml version='1.0'?>
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/config/krb5/default.nix
Expand Up @@ -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;
};
Expand All @@ -25,7 +25,7 @@ let
cfg.domainRealm cfg.defaultRealm
]) {
".${cfg.domainRealm}" = cfg.defaultRealm;
"${cfg.domainRealm}" = cfg.defaultRealm;
${cfg.domainRealm} = cfg.defaultRealm;
};
};

Expand Down
8 changes: 4 additions & 4 deletions nixos/modules/config/malloc.nix
Expand Up @@ -6,23 +6,23 @@ 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
those caused by use-after-free bugs.
'';
};

"jemalloc" = {
jemalloc = {
libPath = "${pkgs.jemalloc}/lib/libjemalloc.so";
description = ''
A general purpose allocator that emphasizes fragmentation avoidance
and scalable concurrency support.
'';
};

"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,
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions nixos/modules/config/networking.nix
Expand Up @@ -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 ''
Expand All @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/config/power-management.nix
Expand Up @@ -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" ];
Expand All @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/config/shells-environment.nix
Expand Up @@ -163,15 +163,15 @@ in
l = "ls -alh";
};

environment.etc."shells".text =
environment.etc.shells.text =
''
${concatStringsSep "\n" (map utils.toShellPath cfg.shells)}
/bin/sh
'';

# 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"
''
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/config/terminfo.nix
Expand Up @@ -8,7 +8,7 @@
"/share/terminfo"
];

environment.etc."terminfo" = {
environment.etc.terminfo = {
source = "${config.system.path}/share/terminfo";
};

Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/config/users-groups.nix
Expand Up @@ -546,11 +546,11 @@ in {
environment.systemPackages = systemShells;

environment.etc = {
"subuid" = {
subuid = {
text = subuidFile;
mode = "0644";
};
"subgid" = {
subgid = {
text = subgidFile;
mode = "0644";
};
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/hardware/nitrokey.nix
Expand Up @@ -36,6 +36,6 @@ in
{ inherit (cfg) group; }
))
];
users.groups."${cfg.group}" = {};
users.groups.${cfg.group} = {};
};
}
2 changes: 1 addition & 1 deletion nixos/modules/hardware/video/ati.nix
Expand Up @@ -33,7 +33,7 @@ in

boot.blacklistedKernelModules = [ "radeon" ];

environment.etc."ati".source = "${ati_x11}/etc/ati";
environment.etc.ati.source = "${ati_x11}/etc/ati";

};

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/misc/version.nix
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/programs/atop.nix
Expand Up @@ -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);
};
}
6 changes: 3 additions & 3 deletions nixos/modules/programs/bash/bash.nix
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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;

Expand Down
12 changes: 6 additions & 6 deletions nixos/modules/programs/less.nix
Expand Up @@ -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.";
};
Expand All @@ -74,7 +74,7 @@ in
type = types.attrsOf types.str;
default = {};
example = {
"\e" = "abort";
e = "abort";
};
description = "Defines new line-editing keys.";
};
Expand Down Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/programs/nano.nix
Expand Up @@ -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"'') ];
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/programs/npm.nix
Expand Up @@ -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";

Expand Down

0 comments on commit 9f313d4

Please sign in to comment.