Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Pete Hayes
    @petehayes102
    I'd be interested to know what needs to be changed/added to the docs if you have time to note. Anyway, to your problem...
    Rushmore Mushambi
    @rushmorem
    Sure. I will note that down. I was about to open a ticket when your chat message came in.
    Pete Hayes
    @petehayes102
    Argh. Trying to view source code on an iOS device is a nightmare. I'll just grab my laptop.
    Rushmore Mushambi
    @rushmorem
    OK :)
    Pete Hayes
    @petehayes102
    Ok, so it’s looking for the Auth server config (auth.json) in /usr/local/etc/intecture/ and /etc/intecture/
    That may not be so good for NixOS?
    Rushmore Mushambi
    @rushmorem
    NixOS doesn't have /usr and configuration is done at install time plus /etc is rarely used.
    Pete Hayes
    @petehayes102
    Right…so where would that conf normally live? It just dawned on me that you probably didn’t use the Makefile to build the project because of the incompatibilities...
    Rushmore Mushambi
    @rushmorem
    It's best to expose the path to the config file via an environment variable or a command line option.
    Yes I didn't use the Makefile. All I have are binaries.
    Configuration is done via modules.
    Pete Hayes
    @petehayes102
    Agreed, it would have been better to provide a flag to override the conf location.
    Seems I have a lot to learn about NixOS!
    To get it working, you could manually create the path /etc/intecture/ and create an auth.json file in there. Copy the one out of resources/auth.json.tpl, replacing {{sysconfdir}} with /etc/intecture/
    The Makefile normally does all this for you
    Rushmore Mushambi
    @rushmorem
    Done. It worked. Thanks!
    Pete Hayes
    @petehayes102
    Cool. Glad to hear it :)
    I think you’re going to have an uphill struggle getting this to work on NixOS at the moment. It’s totally not designed for it (not to say that it can’t/won’t be in the future)
    But I’m really happy to help you through it if you’re keen to try
    Rushmore Mushambi
    @rushmorem
    Thanks. I really appreciate your help.
    I don't give up on things easily. I will see this through.
    NixOS is much like Rust. It has a bit of a learning curve because it departs from the usual way of doing things. But once you get past that, you will quickly grow fond of it.
    Pete Hayes
    @petehayes102
    Well patches are most welcome! I'll try and find some time to download NixOS this week and work through getting a dev env up and running. I'm sure quite a few patches will come out of that, but it'll likely take a while before it's supported as a first class platform.
    Rushmore Mushambi
    @rushmorem
    I understand. I will also submit pull requests whenever I manage to get some time to work on it so hopefully we will see that support faster.
    Pete Hayes
    @petehayes102
    :sunglasses:
    Rushmore Mushambi
    @rushmorem
    I have a few things I'm working on but Intecture is one of the pieces I will need to make deployment easier. NixOS has a tool called NixOps for deploying servers but it's not so great for managing services dynamically. For that there is a third party tool called DisNix. However, what sets Intecture apart is that I can manage those via a program which is exactly what I want.
    I can effectively create infrastructure that's smart enough to manage itself.
    Pete Hayes
    @petehayes102
    Hehe. That's actually how I came up with the name - "INTElligent infrastruCTURE"
    Rushmore Mushambi
    @rushmorem
    Oh, I see! Good job. It's an awesome name. I wondered a few times what it meant but even then it did sound cool :)
    Quick question... Even though NixOS doesn't have first class support right now, there is nothing stopping me from using Command to run any commands I want on it, right?
    Pete Hayes
    @petehayes102
    Hrm, that's an interesting one. I don't think so. Let me consult the code for a minute.
    Actually no, I think you'll run into trouble, though you could fake it!
    Check out <api>/src/target/linux.rs:318
    I hate the way the target abstractions work. So bad. Anyway, the OS fingerprinting is really trivial, so you could touch /etc/cents-release and trick Intecture to thinking you're CentOS
    or whatever platform you want to imitate...
    *centos-release autocorrect...
    Rushmore Mushambi
    @rushmorem
    I see. Thanks, that's very useful to know. Let me check that source file.
    Rushmore Mushambi
    @rushmorem
    Yeah, I think I can just fake this for now.
    Pete Hayes
    @petehayes102
    :+1:
    Rushmore Mushambi
    @rushmorem
    I'm interested to know why you chose to do it like this though. Why target each distro directly?
    Pete Hayes
    @petehayes102
    Most of it is actually generic, but I needed a way of isolating the quirks of each OS. There's always stuff that is done slightly differently.
    Basically it's a structure that I came up with as I was still designing Intecture, then as I got more experience with it, I found a better way of doing it. It's just going to be a bit time consuming to rewrite the target stuff
    Rushmore Mushambi
    @rushmorem

    I understand that but much of the things are done exactly the same way especially on Linux. For example there isn't much difference between Debian and Ubuntu.

    My point is, why not make Command just execute any command sent to it directly, much like the std lib's Command so that it can run on any OS and distro. Everything else can then start building on top of that.

    Pete Hayes
    @petehayes102
    True. I want to move to a "providers" model, where for things like Command we have a generic provider, but for things like Package we have multiple providers.
    Rushmore Mushambi
    @rushmorem
    The target traits can then take care of the nuances between different systems.
    Pete Hayes
    @petehayes102
    Yep. I am pretty immature on Rust traits. I know they could be used in a much smarter way.
    Rushmore Mushambi
    @rushmorem
    I wouldn't say that. You have done some amazing work so far :)
    Care to share your plans on the next design? I have some ideas as well. Maybe we can work together on this...
    Pete Hayes
    @petehayes102
    Thanks mate :) I really appreciate the encouragement. I'm off to bed now but feel free to keep posting stuff and I'll pick it up in the morning.
    Rushmore Mushambi
    @rushmorem
    OK, thanks. About time I went to sleep as well LOL.