svanderburg / disnixos Goto Github PK
View Code? Open in Web Editor NEWDisnixOS: A Disnix extension providing complementary infrastructure deployment using NixOS
License: GNU Lesser General Public License v2.1
DisnixOS: A Disnix extension providing complementary infrastructure deployment using NixOS
License: GNU Lesser General Public License v2.1
Hello,
First, thanks for this very promising software. I'm trying to setup a very simple VM network with disnixos+disnix.
So to that extend I created 4 files:
packages.nix
{pkgs, system}:
{
test1 = [
pkgs.wget
];
test2 = [
pkgs.curl
];
}
network.nix
{
test1 = {pkgs, config, ...}:
{
environment.systemPackages = with pkgs; [ emacs-nox ];
users.users.alice = {
isNormalUser = true;
home = "/home/alice";
description = "Alice Foobar";
password = "mysecretpass";
};
# ??? Don't know why but this line fails
# deployment.targetHost = "test1.example.net";
};
test2 = {pkgs, config, ...}:
{
environment.systemPackages = with pkgs; [ emacs-nox ];
users.users.alice = {
isNormalUser = true;
home = "/home/alice";
description = "Alice Foobar";
password = "mysecretpass";
};
# deployment.targetHost = "test2.example.net";
};
}
services.nix:
{pkgs, system, distribution, invDistribution}:
{
mc = {
name = "mc";
pkg = pkgs.mc;
type = "package";
};
}
and distribution.nix
:
{infrastructure}:
{
mc = [ infrastructure.test1 infrastructure.test2 ];
}
But when I run disnixos-vm-env
, after the succesful compilation, it gives an error:
$ disnixos-vm-env -n network.nix -P packages.nix -s services.nix -d distribution.nix
starting VDE switch for network 1
running the VM test script
error: invalid syntax (<string>, line 2)
cleaning up
(0.00 seconds)
I don't know if it's related, but (also for nixos-build-vm
) if I add the line deployment.targetHost = "test1.example.net";
I get an error during the compilation:
$ disnixos-vm-env -n network.nix -P packages.nix -s services.nix -d distribution.nix
error: --- ThrownError --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-build
The option `deployment' defined in `<unknown-file>' does not exist.
(use '--show-trace' to show detailed location information)
Hi! I'm running this command:
disnixos-env -s services.nix -n network.nix -d distribution.nix --use-nixops
both in my own project and in disnix-staffstracker-php-example and get the same error, I tried to debug it with no luck, here is the stack trace:
$ disnixos-env -s services.nix -n network.nix -d distribution.nix --use-nixops --show-trace
warning: dumping very large path (> 256 MiB); this may run out of memory
[coordinator]: Building manifest...
error: while evaluating the attribute 'manifestXML' of the derivation 'manifest.xml' at /home/matias/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:148:11:
while evaluating 'generateServiceHashKey' at /nix/store/y1b8dm6rhx1akxgw9xh3j2x00cyyvlnz-disnix-0.8/share/disnix/lib.nix:251:47, called from /nix/store/y1b8dm6rhx1akxgw9xh3j2x00cyyvlnz-disnix-0.8/share/disnix/lib.nix:310:18:
while evaluating the attribute 'service' at /nix/store/y1b8dm6rhx1akxgw9xh3j2x00cyyvlnz-disnix-0.8/share/disnix/lib.nix:217:19:
while evaluating 'evaluateService' at /nix/store/y1b8dm6rhx1akxgw9xh3j2x00cyyvlnz-disnix-0.8/share/disnix/lib.nix:162:47, called from /nix/store/y1b8dm6rhx1akxgw9xh3j2x00cyyvlnz-disnix-0.8/share/disnix/lib.nix:217:29:
while evaluating the attribute 'outPath' at /home/matias/nixpkgs/lib/customisation.nix:155:7:
while evaluating the attribute 'buildPhase' of the derivation 'stafftracker' at /home/matias/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:148:11:
while evaluating the attribute 'target.container.mysqlPort' at /nix/store/y1b8dm6rhx1akxgw9xh3j2x00cyyvlnz-disnix-0.8/share/disnix/lib.nix:62:15:
while evaluating the attribute 'containers' at /nix/store/qga1kkjfg82kjv0mfzvgcri1k6hq9nk3-disnixos-0.7/share/disnixos/disnix-infrastructure-module.nix:44:7:
while evaluating 'recursiveUpdate' at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:413:26, called from /nix/store/qga1kkjfg82kjv0mfzvgcri1k6hq9nk3-disnixos-0.7/share/disnixos/disnix-infrastructure-module.nix:44:20:
while evaluating 'recursiveUpdateUntil' at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:383:37, called from /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:414:5:
while evaluating 'zipAttrsWith' at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:346:21, called from /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:392:8:
while evaluating 'zipAttrsWithNames' at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:331:33, called from /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:346:27:
while evaluating 'concatMap' at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/lists.nix:102:18, called from /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:346:46:
while evaluating the attribute 'dysnomia.extraContainerProperties' at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:199:44:
while evaluating anonymous function at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/modules.nix:75:45, called from /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/attrsets.nix:199:52:
while evaluating the attribute 'value' at /nix/store/fvyb8khr4vysmn875dx7hx1sfr3hl6hf-nixpkgs/lib/modules.nix:312:9:
while evaluating the option `dysnomia':
The option `dysnomia' is used but not defined.
I think I installed disnix, disnixos and dysnomia with nix-env, with a non root user. I had to manually change the NIX_PATH environment variable as explained here svanderburg/disnix-stafftracker-php-example#1 to fix another bug, maybe there is some relation with this other one.
I see this on every run of disnixos-env and nixops:
trace: warning: The extraArgs argument to eval-config.nix is deprecated. Please set config._module.args instead.
I'm not 100% convinced the issue comes from this repo but I still saw a usage of the deprecate argument in
Lines 76 to 80 in adf4377
I wanted to put up a PR but I fail to see how to follow the advice in the deprecation warning to instead set config._module.args
instead: https://github.com/NixOS/nixpkgs/blob/74be9234a25ac313e637362110a35c5da9c640e3/nixos/lib/eval-config.nix#L62
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.