Giter Site home page Giter Site logo

svanderburg / disnixos Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 5.0 510 KB

DisnixOS: A Disnix extension providing complementary infrastructure deployment using NixOS

License: GNU Lesser General Public License v2.1

Shell 60.10% Nix 35.52% Makefile 3.53% M4 0.85%

disnixos's People

Contributors

dguibert avatar srghma avatar svanderburg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

disnixos's Issues

running the VM test script: error: invalid syntax (<string>, line 2)

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)

error: The option `dysnomia' is used but not defined.

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.

Remove use of deprecated extraArgs in evalConfig

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

disnixos/nix/lib.nix

Lines 76 to 80 in adf4377

extraArgs = {
nodes = generateConfigurations {
inherit network enableDisnix nixOpsModel useVMTesting useBackdoor dysnomia nixops;
};
};

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.