Skip to content

Commit 2bbc5bb

Browse files
committed
squashed upstream a683adc19ff5228af548c6539dbc3440509bfed3
0 parents  commit 2bbc5bb

49,046 files changed

Lines changed: 5879964 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "nixpkgs",
3+
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
4+
"features": {
5+
"ghcr.io/devcontainers/features/nix:1": {
6+
// fails in the devcontainer sandbox, enable sandbox via config instead
7+
"multiUser": false,
8+
"packages": "nixpkgs.nixd,nixpkgs.nixfmt",
9+
"useAttributePath": true,
10+
"extraNixConfig": "experimental-features = nix-command flakes,sandbox = true"
11+
}
12+
},
13+
// Fixup permissions inside container.
14+
// https://github.com/NixOS/nix/issues/6680#issuecomment-1230902525
15+
"postCreateCommand": "sudo apt-get install -y acl",
16+
"postStartCommand": "sudo setfacl -k /tmp; if [ -e /dev/kvm ]; then sudo chgrp $(id -g) /dev/kvm; fi",
17+
"customizations": {
18+
"vscode": {
19+
"extensions": [
20+
"jnoortheen.nix-ide"
21+
],
22+
"settings": {
23+
"[nix]": {
24+
"editor.formatOnSave": true
25+
},
26+
"nix.enableLanguageServer": true,
27+
"nix.serverPath": "nixd"
28+
}
29+
}
30+
},
31+
"remoteEnv": {
32+
"NIXPKGS": "/workspaces/nixpkgs"
33+
}
34+
}

.editorconfig

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# EditorConfig configuration for nixpkgs
2+
# https://EditorConfig.org
3+
4+
# Top-most EditorConfig file
5+
root = true
6+
7+
# Unix-style newlines with a newline ending every file, utf-8 charset
8+
[*]
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
charset = utf-8
13+
14+
# Ignore diffs/patches
15+
[*.{diff,patch}]
16+
end_of_line = unset
17+
insert_final_newline = unset
18+
trim_trailing_whitespace = unset
19+
20+
# We want readFile .version to return the version without a newline.
21+
[.version]
22+
insert_final_newline = false
23+
24+
# see https://nixos.org/nixpkgs/manual/#chap-conventions
25+
26+
# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces
27+
[*.{bash,js,json,lock,md,nix,pl,pm,py,rb,sh,xml}]
28+
indent_style = space
29+
30+
# Match docbook files, set indent width of one
31+
[*.xml]
32+
indent_size = 1
33+
34+
# Match json/lockfiles/markdown/nix/ruby files, set indent width of two
35+
[*.{js,json,lock,md,nix,rb}]
36+
indent_size = 2
37+
38+
# Match all the Bash code in Nix files, set indent width of two
39+
[*.{bash,sh}]
40+
indent_size = 2
41+
42+
# Match Perl and Python scripts, set indent width of four
43+
[*.{pl,pm,py}]
44+
indent_size = 4
45+
46+
# Match gemfiles, set indent to spaces with width of two
47+
[Gemfile]
48+
indent_size = 2
49+
indent_style = space
50+
51+
# Match package.json and package-lock.json, which are generally pulled from upstream and accept them as they are
52+
[package{,-lock}.json]
53+
indent_style = unset
54+
insert_final_newline = unset
55+
56+
# Disable file types or individual files
57+
# some of these files may be auto-generated and/or require significant changes
58+
59+
[*.{c,h}]
60+
insert_final_newline = unset
61+
trim_trailing_whitespace = unset
62+
63+
[*.{asc,key,ovpn}]
64+
insert_final_newline = unset
65+
end_of_line = unset
66+
trim_trailing_whitespace = unset
67+
68+
[*.lock]
69+
indent_size = unset
70+
71+
# Although Markdown/CommonMark allows using two trailing spaces to denote
72+
# a hard line break, we do not use that feature in nixpkgs since
73+
# it forces the surrounding paragraph to become a <literallayout> which
74+
# does not wrap reasonably.
75+
# Instead of a hard line break, start a new paragraph by inserting a blank line.
76+
[*.md]
77+
trim_trailing_whitespace = true
78+
79+
# binaries
80+
[*.nib]
81+
end_of_line = unset
82+
insert_final_newline = unset
83+
trim_trailing_whitespace = unset
84+
charset = unset
85+
86+
[eggs.nix]
87+
trim_trailing_whitespace = unset
88+
89+
[registry.dat]
90+
end_of_line = unset
91+
insert_final_newline = unset
92+
93+
# Keep this hint at the bottom:
94+
# Please don't add entries for subfolders here.
95+
# Create <subfolder>/.editorconfig instead.

0 commit comments

Comments
 (0)