Skip to content

Instantly share code, notes, and snippets.

View ilyaGotfryd's full-sized avatar
🤖

Ilya Gotfryd ilyaGotfryd

🤖
View GitHub Profile
@ilyaGotfryd
ilyaGotfryd / machine.js
Last active June 10, 2021 19:15
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@ilyaGotfryd
ilyaGotfryd / Derivations in requirements file
Created May 28, 2020 19:23
Issue building cryptography in NixOS
"cryptography" = python.mkDerivation {
name = "cryptography-2.9.2";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz";
sha256 = "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229";
};
doCheck = commonDoCheck;
format = "pyproject";
buildInputs = commonBuildInputs ++ [
self."cffi"
@ilyaGotfryd
ilyaGotfryd / requirements.nix
Last active April 29, 2020 20:31
This is the issue with building pystemd from source
# generated using pypi2nix tool (version: 2.0.0)
# See more at: https://github.com/nix-community/pypi2nix
#
# COMMAND:
# pypi2nix -r requirements.txt -E snappy -V python37
#
{ pkgs ? import <nixpkgs> {},
overrides ? ({ pkgs, python }: self: super: {})
}:
@ilyaGotfryd
ilyaGotfryd / Command executing script
Last active April 20, 2020 18:08
Trying to build configuration but get - error: cannot auto-call a function that has an argument without a default value ('config') in derivation.nix
nix-build --verbose --argstr sourcePath /root/source --argstr version 0.3.11 /etc/nixos/log_adapter_update_service.nix
@ilyaGotfryd
ilyaGotfryd / nixos-automount -example
Created March 24, 2020 20:23
What am I doing wrong here? I get : The option value `systemd.automounts' in `/etc/nixos/configuration.nix' is not of type `list of submodules'.
systemd.automounts."/etc/logadapter" = {
enable = true;
description = "Log Adapter Configuration Vritual Harddrive";
mountConfig = {
what="/dev/sdb1";
where="/etc/logadapter";
type="ext4";
directoryMode = "0775";
};
options="defaults,ro";
@ilyaGotfryd
ilyaGotfryd / Bash dump
Last active February 18, 2020 22:34
Issues with passing environment variable to a config
error: while evaluating the attribute 'preVM' of the derivation 'nixos-disk-image' at /nix/store/gv4m5kg1d7z5k1f5s3a3cr8158ng2kky-nixpkgs-20.03pre212770.cc1ae9f21b9/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'exportReferencesGraph' of the derivation 'closure-info' at /nix/store/gv4m5kg1d7z5k1f5s3a3cr8158ng2kky-nixpkgs-20.03pre212770.cc1ae9f21b9/nixpkgs/pkgs/build-support/closure-info.nix:14:3:
while evaluating the attribute 'activationScript' of the derivation 'nixos-system-nixos-20.03pre212770.cc1ae9f21b9' at /nix/var/nix/profiles/per-user/root/channels/nixpkgs/nixos/modules/system/activation/top-level.nix:102:5:
while evaluating the attribute 'system.activationScripts.script' at /nix/var/nix/profiles/per-user/root/channels/nixpkgs/nixos/modules/system/activation/activation-script.nix:68:9:
while evaluating 'textClosureMap' at /nix/var/nix/profiles/per-user/root/channels/nixpkgs/lib/strings-with-deps.nix:70:35, called from /nix/var/nix/profiles/per-user/root/channels
@ilyaGotfryd
ilyaGotfryd / attempt at overlays
Last active February 13, 2020 21:22
Log sample when qemu worked fine
nixpkgs.overlays = [
(self: super: {
open-vm-tools = super.open-vm-tools.overrideAttrs (oldAttrs: {
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
});
qemu-flags = super.qemu-flags.qemuBinary.overrideAttrs (oldAttrs: {
x86_64-linux = "${super.qemuPkg}/bin/qemu-kvm -cpu Haswell";
});
})
];
@ilyaGotfryd
ilyaGotfryd / NixOS Error
Created February 12, 2020 16:23
Error when installing Pythnon package from GitLab
locking path '/nix/store/3lzklka8qm0v8gra9bn0v8dvijw2x6i5-log_adapter_engine-0.2.0.drv'
lock acquired on '/nix/store/3lzklka8qm0v8gra9bn0v8dvijw2x6i5-log_adapter_engine-0.2.0.drv.lock'
lock released on '/nix/store/3lzklka8qm0v8gra9bn0v8dvijw2x6i5-log_adapter_engine-0.2.0.drv.lock'
instantiated 'log_adapter_engine-0.2.0' -> '/nix/store/3lzklka8qm0v8gra9bn0v8dvijw2x6i5-log_adapter_engine-0.2.0.drv'
querying info about missing paths...
starting pool of 3 threads
checking substituter 'https://cache.nixos.org' for path '/nix/store/fr2vsw0ziizhb99m348rsygvzd7b5glq-log_adapter_engine-0.2.0'
querying info about '/nix/store/fr2vsw0ziizhb99m348rsygvzd7b5glq-log_adapter_engine-0.2.0' on 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/fr2vsw0ziizhb99m348rsygvzd7b5glq.narinfo'...
starting download of https://cache.nixos.org/fr2vsw0ziizhb99m348rsygvzd7b5glq.narinfo
@ilyaGotfryd
ilyaGotfryd / keybase.md
Created August 9, 2018 15:44
This is a keybase identity verification gist

Keybase proof

I hereby claim:

  • I am ilyagotfryd on github.
  • I am dean_forward (https://keybase.io/dean_forward) on keybase.
  • I have a public key ASA9Ed3O9sFEUX137uukYvJ2JecUzCGXRQn90BvG28O39wo

To claim this, I am signing this object: