This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
# FIXME: do this properly and contribute | |
systemd.services.zfs-mount.requires = [ "zfs-import.target" ]; | |
systemd.services.zfs-mount.wantedBy = [ "local-fs.target" ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
services.nginx.virtualHosts."hostname".locations."/prometheus".proxyPass = "http://127.0.0.1:9090"; | |
services.prometheus.enable = true; | |
services.prometheus.stateDir = "prometheus2"; | |
services.prometheus.extraFlags = [ "--web.external-url=http://hostname/prometheus/" "--storage.tsdb.retention.time=3d" ]; | |
services.prometheus.scrapeConfigs = [ | |
{ | |
job_name = "node"; | |
static_configs = [{ targets = ["hostname:9100"]; labels.distro = "nixos"; }]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0277]: the size for values of type `dyn std::error::Error + std::marker::Send + std::marker::Sync` cannot be known at compilation time | |
--> src/main.rs:9:78 | |
| | |
67 | .map_err(|err| tide::Error::new(StatusCode::InternalServerError, err))?; | |
| ^^^ doesn't have a size known at compile-time | |
| | |
= help: the trait `std::marker::Sized` is not implemented for `dyn std::error::Error + std::marker::Send + std::marker::Sync` | |
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> | |
= note: required because of the requirements on the impl of `std::error::Error` for `std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ deploy | |
[master 86679e5] system: ybsqjcm5kcfvsqqwga4v7xsd8x240y88 | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
Enumerating objects: 5, done. | |
Counting objects: 100% (5/5), done. | |
Delta compression using up to 8 threads | |
Compressing objects: 100% (3/3), done. | |
Writing objects: 100% (3/3), 342 bytes | 342.00 KiB/s, done. | |
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 | |
remote: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ deploy | |
[master 86679e5] system: ybsqjcm5kcfvsqqwga4v7xsd8x240y88 | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
Enumerating objects: 5, done. | |
Counting objects: 100% (5/5), done. | |
Delta compression using up to 8 threads | |
Compressing objects: 100% (3/3), done. | |
Writing objects: 100% (3/3), 342 bytes | 342.00 KiB/s, done. | |
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 | |
remote: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
script = pkgs.writeScriptBin "readme" '' | |
#!${pkgs.stdenv.shell} | |
cat ${./README.md} | |
''; | |
in | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/cfg.rs b/src/cfg.rs | |
index 56f76a0..e4b9b44 100644 | |
--- a/src/cfg.rs | |
+++ b/src/cfg.rs | |
@@ -49,12 +49,16 @@ fn to_nix_op(w: &mut Write, op: CfgOp, target: &[Cfg]) -> Result<(), Error> { | |
} | |
is_first = false; | |
match *cfg { | |
- Cfg::Op { op, ref operands } => to_nix_op(w, op, operands)?, | |
+ Cfg::Op { op, ref operands } => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo cntr attach -t command cntr-/nix/store/gcqpj041jll6qgq3cbkp73rbx1vjh96d-foo | |
$ cd /var/lib/cntr | |
% ls | |
bin build dev etc nix proc run tmp var | |
% ls build | |
env-vars | |
$ cntr exec bash | |
bash-4.4$ pwd | |
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lldb ./result/bin/hello | |
(lldb) target create "./result/bin/hello" | |
Current executable set to './result/bin/hello' (x86_64). | |
(lldb) run | |
Process 27935 launched: '/src/nixpkgs/result/bin/hello' (x86_64) | |
warning: (x86_64) /src/nixpkgs/result/bin/hello(0x0000000100000000) address 0x0000000100000000 maps to more than one section: hello.__TEXT and hello.__TEXT | |
warning: (x86_64) /src/nixpkgs/result/bin/hello(0x0000000100000000) address 0x0000000100001000 maps to more than one section: hello.__DATA and hello.__DATA | |
Process 27935 stopped | |
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x42) | |
frame #0: 0x0000000100000f64 hello`main + 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lldb ./result/bin/hello | |
(lldb) target create "./result/bin/hello" | |
Current executable set to './result/bin/hello' (x86_64). | |
(lldb) run | |
Process 27935 launched: '/src/nixpkgs/result/bin/hello' (x86_64) | |
warning: (x86_64) /src/nixpkgs/result/bin/hello(0x0000000100000000) address 0x0000000100000000 maps to more than one section: hello.__TEXT and hello.__TEXT | |
warning: (x86_64) /src/nixpkgs/result/bin/hello(0x0000000100000000) address 0x0000000100001000 maps to more than one section: hello.__DATA and hello.__DATA | |
Process 27935 stopped | |
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x42) | |
frame #0: 0x0000000100000f64 hello`main + 4 |