Commit graph

18042 commits

Author SHA1 Message Date
Vincent Ambo
a7781b169d fix templater: Ignore slash-suffixes on includes/excludes
To prevent situations where a shell auto-appends a slash to an
include/exclude specification on the CLI, trailing slashes in those
string lists are now trimmed.

This fixes #54
2017-06-11 22:33:07 +02:00
Vincent Ambo
3cba344fbe fix main: Fix 'kontemplate template' output 2017-06-11 22:09:10 +02:00
Vincent Ambo
162b962fad refactor main: Call kubectl individually per resource set
Instead of passing the rendered output of all resource sets to kubectl
simultaneously, build upon the previous commit and pass resource sets
individually to new instances of kubectl.

This resolves #51
2017-06-11 22:09:10 +02:00
Vincent Ambo
f3264329b9 refactor templater: Add intermediate type to represent rendered RSes
As a first step in resolving #51 this refactors the `templater`
package to return rendered resource sets as a distinct type.

This also fixes #56
2017-06-11 22:09:10 +02:00
Eelco Dolstra
186571965d
Don't show flags from config settings in "nix --help" 2017-06-07 18:41:20 +02:00
Eelco Dolstra
aa952d5f0b
nix: Add --help-config flag 2017-06-07 16:49:54 +02:00
Eelco Dolstra
b8283773bd
nix: Make all options available as flags
Thus, instead of ‘--option <name> <value>’, you can write ‘--<name>
<value>’. So

  --option http-connections 100

becomes

  --http-connections 100

Apart from brevity, the difference is that it's not an error to set a
non-existent option via --option, but unrecognized arguments are
fatal.

Boolean options have special treatment: they're mapped to the
argument-less flags ‘--<name>’ and ‘--no-<name>’. E.g.

  --option auto-optimise-store false

becomes

  --no-auto-optimise-store
2017-06-07 16:17:17 +02:00
Vincent Ambo
d76ea59f4c feat image: Add Dockerfile for CI pipeline image
Adds a simple Docker image that can be used in CI pipelines to deploy
`kontemplate`-based environments.

This image contains kontemplate and all of its dependencies (including
pass as an optional dependency).
2017-06-07 10:05:56 +02:00
Eelco Dolstra
c8cc50d46e
Disable the build user mechanism on all platforms except Linux and OS X 2017-06-06 18:52:15 +02:00
Eelco Dolstra
85e93d7b87
Always use the Darwin sandbox
Even with "build-use-sandbox = false", we now use sandboxing with a
permissive profile that allows everything except the creation of
setuid/setgid binaries.
2017-06-06 18:44:49 +02:00
William Carroll
6b3d011491 Adds CTRL_T fuzzy find helm source for files 2017-06-06 11:14:30 -04:00
William Carroll
981f86bf7d Removes unnecessary kbds; enhances config 2017-06-06 10:35:37 -04:00
Eelco Dolstra
d3f780996c Merge pull request #1399 from Mic92/master
Add .editorconfig
2017-06-06 14:13:36 +02:00
Vincent Ambo
8f0949dbb2 chore: Minor sync with Dell machine config 2017-06-06 13:33:13 +02:00
Jörg Thalheim
88acb64610
Add .editorconfig
- Automatically adjust editor to nix coding style
-> less nitpiks/styling issues in pull requests
-> profit(!)

see also nixpkgs' editorconfig: https://github.com/NixOS/nixpkgs/blob/master/.editorconfig
2017-06-05 22:57:28 +01:00
William Carroll
d688393344 Support cwd updates using zsh, ansi-term w/i Emacs 2017-06-04 20:30:08 -04:00
William Carroll
cf13a3b182 Adds custom helm sources and kbds 2017-06-02 19:52:13 -04:00
William Carroll
a98d537843 Closes ansi-term window on exit 2017-06-02 17:23:19 -04:00
William Carroll
bf59063853 Updates prompt to save space 2017-06-02 17:22:54 -04:00
William Carroll
7cf411fe0f Remaps slate kbds 2017-06-02 10:35:24 -04:00
Eelco Dolstra
b4b1f4525f
Fix coverage job 2017-06-01 14:43:15 +02:00
Eelco Dolstra
ab5834f7a1
RPM, Deb: Add dependency on libseccomp 2017-06-01 14:28:21 +02:00
William Carroll
23f4e84ada Moves helper functions to separate file 2017-06-01 00:00:03 -04:00
William Carroll
39b0e5056b Creates custom function for intuitive, frame-specific buffer switching 2017-05-31 23:07:27 -04:00
Eelco Dolstra
52fec8dde8
Remove listxattr assertion
It appears that sometimes, listxattr() returns a different value for
the query case (i.e. when the buffer size is 0).
2017-05-31 20:43:47 +02:00
Eelco Dolstra
c96e8cd097
OS X sandbox: Improve builtin sandbox profile
Also, add rules to allow fixed-output derivations to access the
network.

These rules are sufficient to build stdenvDarwin without any
__sandboxProfile magic.
2017-05-31 17:25:51 +02:00
Eelco Dolstra
5ea8161b55 resolve-system-dependencies: Misc fixes
This fixes

  Could not find any mach64 blobs in file ‘/usr/lib/libSystem.B.dylib’, continuing...
2017-05-31 16:10:10 +02:00
Eelco Dolstra
c368e079ca resolve-system-dependencies: Simplify 2017-05-31 15:34:03 +02:00
Eelco Dolstra
44f3f8048f OS X sandbox: Don't use a deterministic $TMPDIR
This doesn't work because the OS X sandbox cannot bind-mount
path to a different location.
2017-05-31 14:09:00 +02:00
Eelco Dolstra
c740c3ce50 OS X sandbox: Store .sb file in $TMPDIR rather than the Nix store
The filename used was not unique and owned by the build user, so
builds could fail with

error: while setting up the build environment: cannot unlink ‘/nix/store/99i210ihnsjacajaw8r33fmgjvzpg6nr-bison-3.0.4.drv.sb’: Permission denied
2017-05-31 14:09:00 +02:00
William Carroll
a4f87fe53c Adds powerline to Emacs 2017-05-30 15:51:48 -04:00
Eelco Dolstra
683a499ebb
resolve-system-dependencies: Fix another segfault
runResolver() was barfing on directories like
/System/Library/Frameworks/Security.framework/Versions/Current/PlugIns. It
should probably do something sophisticated for frameworks, but let's
ignore them for now.
2017-05-30 20:39:40 +02:00
Chris Feng
19515dc074 Allow switching to a workspace by selecting one X window on it
* exwm-workspace.el (exwm-workspace-switch-to-buffer): Only allows it
when `exwm-layout-show-all-buffers' is nil.
2017-05-31 00:12:22 +08:00
Eelco Dolstra
acc889c821
Darwin sandbox: Use sandbox-defaults.sb
Issue #759.

Also, remove nix.conf from the sandbox since I don't really see a
legitimate reason for builders to access the Nix configuration.
2017-05-30 17:40:12 +02:00
Eelco Dolstra
53a1644187
Darwin sandbox: Disallow creating setuid/setgid binaries
Suggested by Daiderd Jordan.
2017-05-30 17:17:17 +02:00
Eelco Dolstra
83eec5a997 resolve-system-dependencies: Several fixes
This fixes

  error: getting attributes of path ‘Versions/Current/CoreFoundation’: No such file or directory

when /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation is a symlink.

Also fixes a segfault when encounting a file that is not a MACH binary (such
as /dev/null, which is included in __impureHostDeps in Nixpkgs).

Possibly fixes #786.
2017-05-30 16:03:37 +02:00
Eelco Dolstra
9bdb88ea6e Only pass --with-sandbox-shell on Linux 2017-05-30 15:56:15 +02:00
William Carroll
b92bf435f2 Adds ansi-term improvements 2017-05-30 09:53:20 -04:00
William Carroll
03c752e500 Adds window swapping kbd 2017-05-30 09:45:52 -04:00
Eelco Dolstra
fe08d17934
Fix seccomp build failure on clang
Fixes

  src/libstore/build.cc:2321:45: error: non-constant-expression cannot be narrowed from type 'int' to 'scmp_datum_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
2017-05-30 14:37:24 +02:00
Eelco Dolstra
d552d38758
Shut up some clang warnings 2017-05-30 14:35:50 +02:00
Eelco Dolstra
2ac99a32da
Add a seccomp rule to disallow setxattr() 2017-05-30 13:59:24 +02:00
Eelco Dolstra
d798349ede
canonicalisePathMetaData(): Remove extended attributes / ACLs
EAs/ACLs are not part of the NAR canonicalisation. Worse, setting an
ACL allows a builder to create writable files in the Nix store. So get
rid of them.

Closes #185.
2017-05-30 13:47:41 +02:00
Eelco Dolstra
ff6becafa8
Require seccomp only in multi-user setups 2017-05-30 12:37:04 +02:00
Chris Feng
851ed8c280 Fix X display name comparison
* exwm-workspace--add-frame-as-workspace
(exwm-workspace--add-frame-as-workspace): Manually compare X display
names as there's no built-in function handles this correctly.
2017-05-30 01:25:58 +08:00
Eelco Dolstra
1d9ab273ba
Add test for setuid seccomp filter 2017-05-29 16:14:10 +02:00
Eelco Dolstra
cf93397d3f
Fix seccomp initialisation on i686-linux 2017-05-29 16:14:10 +02:00
Eelco Dolstra
6cc6c15a2d
Add a seccomp filter to prevent creating setuid/setgid binaries
This prevents builders from setting the S_ISUID or S_ISGID bits,
preventing users from using a nixbld* user to create a setuid/setgid
binary to interfere with subsequent builds under the same nixbld* uid.

This is based on aszlig's seccomp code
(47f587700d).

Reported by Linus Heckemann.
2017-05-29 16:14:10 +02:00
Eelco Dolstra
6e01ecd112
Fix nix-copy-closure test
Fixes

  client# error: size mismatch importing path ‘/nix/store/ywf5fihjlxwijm6ygh6s0a353b5yvq4d-libidn2-0.16’; expected 0, got 120264

This is mostly an artifact of the NixOS VM test environment, where the
Nix database doesn't contain hashes/sizes.

http://hydra.nixos.org/build/53537471
2017-05-29 16:08:56 +02:00
Eelco Dolstra
588dad4084
Fix build failure on Debian/Ubuntu
http://hydra.nixos.org/build/53537463
2017-05-29 15:59:18 +02:00