Hi Jeff,

On Thu, Apr 30, 2015 at 11:17 PM, Jeffrey David Johnson <jef...@gmail.com>
wrote:

> It's possible I'm getting the wrong idea about what nixops is for, but I
> used
> it to set up an Amazon EC2 instance with the idea of logging into the
> server
> and administering it using local commands afterward.


That's an interesting and unexpected usecase of nixops. I wouldn't use
nixops at all if you plan on doing this. Why not just start instance in the
Amazon AWS Console or using the command line tools of AWS? (for ami's see
https://nixos.org/wiki/NixOS_on_Amazon_EC2)


> The initial install goes
> fine. Afterward I clone my nixcfg repo (including nixpkgs submodule) and
> try to
> set it up the way I would a physical machine, by copying everything from
> /etx/nixos/* into nixcfg/configs/cyno.nix and modifying it to
> point inside the repo:
>
> { config, pkgs, ... }:
>
> {
>   imports = [
>     ../nixpkgs/nixos/modules/virtualization/amazon-config.nix
>   ];
>   ec2.hvm = true;
>   services.journald.rateLimitBurst = 0;
> }
>
>
> When I do a `nixos-rebuild` (part of install.sh) though, it gives this
> error:
>
> [root@cyno:~/nixcfg]# ./install.sh test
> building Nix...
> error: getting status of
> ‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No
> such file or directory
> (use ‘--show-trace’ to show detailed location information)
> error: getting status of
> ‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No
> such file or directory
> (use ‘--show-trace’ to show detailed location information)
> building the system configuration...
> error: getting status of
> ‘/root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix’: No
> such file or directory
> (use ‘--show-trace’ to show detailed location information)
>
> Now I notice something strange:
> /root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix
> exists, but
> `ls` throws an error when listing it:
>
> ls /root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix
> ls: cannot access
> /root/nixcfg/nixpkgs/nixos/modules/virtualization/amazon-config.nix: No
> such file or directory
>
> If I approach it "slowly" by listing /root/nixcfg, then
> /root/nixcfg/nixpkgs,
> all the way to the full path it *does* work. I googled around a little and
> according to this:
>
> http://superuser.com/questions/446280/no-such-file-or-directory
>
> The error can also mean a missing dynamically linked library. So I tried
> ldd as
> directed (though I don't understand the output), and got this:
>
> ldd $(which ls)
>         linux-vdso.so.1 (0x00007fff01dec000)
>         libacl.so.1 =>
> /nix/store/6mz0jhl389h7panazs5sayrydajia1s2-acl-2.2.52/lib/libacl.so.1
> (0x00007f55d0f54000)
>         libc.so.6 =>
> /nix/store/93zfs0zzndi7pkjkjxawlafdj8m90kg5-glibc-2.20/lib/libc.so.6
> (0x00007f55d0bb7000)
>         libattr.so.1 =>
> /nix/store/ndszpck395bi55jnz50ny99y4pvj6dqn-attr-2.4.47/lib/libattr.so.1
> (0x00007f55d09b3000)
>
> /nix/store/93zfs0zzndi7pkjkjxawlafdj8m90kg5-glibc-2.20/lib/ld-linux-x86-64.so.2
> (0x00007f55d115c000)
>
> Anyway I think there's something wrong with how the system is set up, but
> not
> sure what. Is there a correct way to bootstrap it to the point of using
> the same config as my other machines?
>

Can you perhaps show us the contents of install.sh? Can you give us the AMI
that was used (see AWS Console or commandline tools) ? Also, how did you
copy the contents of /etc/nixos/* to /root/nixcfg ? I have never seen this
behavior before, and tested something similar yesterday successfully.

Cheers,
Rob

-- 
Rob Vermaas

[email] rob.verm...@gmail.com
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to