Commit graph

1468 commits

Author SHA1 Message Date
Vincent Ambo
aa9d8b2618 fix(packages): Remove Cachix cache for hie-nix 2018-07-30 10:05:33 +02:00
Vincent Ambo
43876c81da feat(stallo): Enable 32-bit compatibility for audio & video 2018-07-30 10:05:12 +02:00
Vincent Ambo
e2bafd0520 feat(packages): Install extremetuxracer
Why not?
2018-07-30 10:05:00 +02:00
Vincent Ambo
a38fbb6b82 chore(packages): Bump channels 2018-07-30 10:04:26 +02:00
Vincent Ambo
a25485fad4 refactor(emacs): Install eglot & jsonrpc from ELPA instead of Github
trust++;
2018-07-29 16:56:11 +02:00
Vincent Ambo
b805265c7d feat(pkgs): Enable hie-nix Cachix cache 2018-07-29 16:46:55 +02:00
Vincent Ambo
aa048203b7 chore(emacs): Update eglot version to 1.1 2018-07-29 16:46:45 +02:00
Vincent Ambo
503eff9a1f feat(desktop): Install corefonts 2018-07-22 15:22:41 +02:00
Vincent Ambo
117f3f6d58 feat(config): Enable Redis service 2018-07-15 12:29:58 +02:00
Vincent Ambo
df1a9a1625 test(templater): Add a test for the default template function 2018-07-14 23:21:36 +02:00
Phillip Johnsen
ab059ad41c feat(templater): override sprig default function with guarded alternative
These changes overrides the `default` function provided by sprig with
an alternative to retrieve variable values from variables that might
not have been declared at all.

Referencing a variable in a template that is not declared, will lead
to the underlying templating functionality raising an error, causing
kontemplate to exit.

The override alternative to `default` accepts a second string argument
with the variable name. If the variable in question has not been
declared the first argument's value would be returned, just as the
original `default` function does.
2018-07-14 23:21:36 +02:00
Vincent Ambo
e77fd237bd feat(emacs): Install elixir-mode 2018-07-14 16:18:32 +02:00
Vincent Ambo
b41d1cecc1 feat(pkgs): Install fallback icon theme 2018-07-14 16:18:32 +02:00
Vincent Ambo
4976c6d2b9 fix(mail): Filter NixOS Discourse into nix-devel tag 2018-07-13 00:11:52 +02:00
Vincent Ambo
a3bd254d01 feat(emacs): Install alchemist 2018-07-03 18:58:22 +02:00
Vincent Ambo
3b3bae22f7 feat(pkgs): Install Haskell IDE Engine 2018-07-02 20:35:23 +02:00
Vincent Ambo
b08abbd81e chore(pkgs): Remove unused packages 2018-07-02 20:35:06 +02:00
Vincent Ambo
40f7804576 feat(emacs): Install counsel-notmuch 2018-06-29 13:06:52 +02:00
Vincent Ambo
d14bc8e293 feat(emacs): Add a newer version of sly from git 2018-06-28 11:01:30 +02:00
Vincent Ambo
6b39254917 chore: Bump version to 1.7.0 2018-06-26 21:06:38 +02:00
Vincent Ambo
6d8214bfc8 test(context): Introduce an explicit value merging test
Introduces a test which will merge variables defined at every possible
layer together and ensure that the loaded context configuration is as
expected.

The test data provides an actual resource set template that can be
tested locally from a kontemplate source checkout:

    kontemplate template context/testdata/merging/context.yaml --var cliVar=cliVar
2018-06-26 21:06:38 +02:00
Vincent Ambo
4a6f087fbf chore(context): Remove previous value override test 2018-06-26 21:06:38 +02:00
Vincent Ambo
2db3bbcdbe refactor(context): Rewrite and explain value merging logic
Changes the logic for merging context values to be unambiguous and
easy to follow.

* loadDefaultVars returns the default vars directly instead of
  performing merging in addition
* all merging is performed in `mergeContextValues` using explicit
  explanations for every step of the merge.

After this commit the order of merging goes from least to most
"specific", please read the explanatory comments for more information.

This relates to #142.
2018-06-26 21:06:38 +02:00
Vincent Ambo
bd5980a5d7 feat(main): Add CLI flag for setting kubectl executable
This lets users choose the executable (either by full path or via a
$PATH-entry) to be used when executing `kubectl`.

This is useful in, for example, OpenShift based setups.

This fixes #143
2018-06-26 12:29:49 +02:00
Vincent Ambo
328b692ae9 feat(adho): Add Postkontoret & MAGNAT wifi 2018-06-25 18:56:10 +02:00
Vincent Ambo
d9569ad80a docs(README): Add section about new NixOS module 2018-06-24 23:43:08 +02:00
Vincent Ambo
356e9fca06 feat(emacs): Install use-package 2018-06-22 10:32:01 +02:00
Vincent Ambo
92c5c846e2 fix(context): Use SplitN to split CLI variable specifications
In some cases the value of a variable may contain an equals sign,
which would not work in the previous version.

This uses `SplitN` to split the variable specifier into a
pre-determined number (2) of sub-slices. Further `=`-symbols will then
be included in the second substring.
2018-06-21 14:07:47 +02:00
Vincent Ambo
c2507d91f8 feat(emacs): Install hydra 2018-06-19 15:21:34 +02:00
Vincent Ambo
375cd8d93f chore(nix): Bump version to 1.0.0 2018-06-18 20:14:54 +02:00
Vincent Ambo
7557d8ff5b refactor(main): Move cursor file to /var/lib/journaldriver
This directory is the default for state directories managed by
systemd, which will be the main use-case of journaldriver when running
it on NixOS.

Relates to nixos/nixpkgs#42134
2018-06-18 20:12:43 +02:00
Vincent Ambo
f0dfc8b06d feat(functions): Add ivy-browse-repositories function
Quick helper to switch between all relevant projects.
2018-06-18 16:39:57 +02:00
Vincent Ambo
9f29992d03 refactor(main): Split LOG_NAME & LOG_STREAM variables
Splitting these in two lets users better configure how the logs show
up in Stackdriver Logging.
2018-06-17 22:36:01 +02:00
Vincent Ambo
208b5dec2c chore: Bump to 1.0-rc1 2018-06-17 18:22:13 +02:00
Vincent Ambo
7b6f4cb89b docs(README): Add non-GCP instructions to README 2018-06-17 17:43:33 +02:00
Vincent Ambo
79afc5f474 feat(main): Support manually configured resource descriptors
Lets users specify environment variables to configure the monitored
resource descriptor. In combination with service account support this
can be used to configure journaldriver on non-GCP machines.

The supported environment variables are:

* `GOOGLE_CLOUD_PROJECT`: Project ID of the project to which to report
  logs
* `LOG_NAME`: Name of the Stackdriver Logging log into which to write
  entries
2018-06-17 17:43:33 +02:00
Vincent Ambo
62745db1a0 feat(main): Support static service account credentials
Adds support for authenticating towards Google's APIs by using static
service account credentials which can be retrieved from the GCP
console.

Users can toggle the behaviour by specifying the
`GOOGLE_APPLICATION_CREDENTIALS` environment variable.
2018-06-17 17:43:33 +02:00
Vincent Ambo
d56fedbe8d chore(cargo): Add dependency on medallion JWT library 2018-06-17 17:43:33 +02:00
Vincent Ambo
c2308b5ba1 chore(main): Bump chunk size to 750
Still slightly below the Stackdriver limit. However, previous errors
seem to have mostly been related to JSON payloads - which has been
fixed in the previous commit.
2018-06-17 15:46:05 +02:00
Vincent Ambo
05fa476929 fix(main): Correct name of JSON payload field 2018-06-17 15:46:05 +02:00
Vincent Ambo
68189d4872 refactor(main): Log error responses from Stackdriver
In some cases Stackdriver seems to return error responses for batched
inserts.

This change will log the error response body and status from
Stackdriver for all insertion errors.
2018-06-17 15:46:05 +02:00
Vincent Ambo
87ab3c806c feat(main): Parse timestamps out of journald entries
Instead of relying on Stackdriver's ingestion timestamps, parse
timestamps out of journal entries and provide those to Stackdriver.

If a timestamp could not be parsed out of a log entry, the ingestion
time is used as the fallback.
2018-06-17 15:46:05 +02:00
Vincent Ambo
f626d88438 chore(cargo): Enable chrono with serde as a dependency 2018-06-17 15:46:05 +02:00
Vincent Ambo
bd19132eff chore(main): Send logs in smaller chunks of 250 entries
In some cases sending 1000 entries seemingly results in a vague "Bad
request" error.

This reduces the chunk size to something that should be more
manageable.
2018-06-16 21:38:53 +02:00
Vincent Ambo
54b03a8dad fix(main): Attempt to read with next_record before waiting
Without this fix new records are only "pushed out" when something
appends to the journal.
2018-06-16 21:38:53 +02:00
Vincent Ambo
b6c0610278 feat(build): Add toggle for tests to Nix derivation 2018-06-16 21:38:53 +02:00
Vincent Ambo
e4b4830a04 feat(main): Persist & load persisted cursor positions
Adds support for persisting the cursor position in a file (by default
`/var/journaldriver/cursor.pos`, overridable via the environment
variable `CURSOR_POSITION_FILE`).

This lets journaldriver resume from a known journal position after
service restarts.

This closes #3
2018-06-16 21:38:53 +02:00
Vincent Ambo
03a6ea742c
Merge pull request #5 from aprilabank/feat/json-payloads
feat(main): Implement parsing of JSON payloads
2018-06-16 18:28:49 +02:00
Vincent Ambo
10f23a9dfb feat(main): Implement parsing of JSON payloads
Stackdriver supports structured JSON payloads in addition to simple
plain-text payloads.

This commit introduces a new feature in which journaldriver will
attempt to parse incoming log messages into JSON vaues and forward
them as structured payloads if they are JSON objects.

Messages that can not be parsed into JSON objects will continue to be
forwarded as plain text messages.
2018-06-16 17:57:11 +02:00
Vincent Ambo
2e2e8379e9 fix(emacs): Fix ivy & prescient integration by manually pinning ivy
In the previous configuration the dependency on `ivy-pass` added a
second version of ivy to the load-path.

It is fixed by manually pinning ivy and its related packages and using
those to build ivy-pass.

This configuration should be temporary until the next time the MELPA
package set is updated in nixpkgs.

This caused the symptoms in raxod502/prescient.el#10
2018-06-16 16:37:17 +02:00