UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    snap pop crackle! ....and nix!? The future of crackle

    Scheduled Pinned Locked Moved General
    11 Posts 3 Posters 463 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • FuseteamF Offline
        Fuseteam @Fuseteam
        last edited by

        Oh before i go, you may be wondering how to use this home manager

        well it's simple really.

        after running the script in the above post you should have a file in ~/.config/home-manager/home.nix

        in there you will find a section like this:

        # The home.packages option allows you to install Nix packages into your
          # environment.
          home.packages = [
            # # Adds the 'hello' command to your environment. It prints a friendly
            # # "Hello, world!" when run.
            # pkgs.hello
        
            # # It is sometimes useful to fine-tune packages, for example, by applying
            # # overrides. You can do that directly here, just don't forget the
            # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
            # # fonts?
            # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
        
            # # You can also create simple shell scripts directly inside your
            # # configuration. For example, this adds a command 'my-hello' to your
            # # environment:
            # (pkgs.writeShellScriptBin "my-hello" ''
            #   echo "Hello, ${config.home.username}!"
            # '')
          ];
        

        you can see the comment there explains what to put there, you here's how i edited mine

        # The home.packages option allows you to install Nix packages into your
          # environment.
          home.packages = [
            pkgs.vim
            pkgs.pipx
            pkgs.cargo
            pkgs.plasma5Packages.kdeconnect-kde
            pkgs.tailscale
            pkgs.gnumake
            pkgs.gcc
            pkgs.gdb
            pkgs.strace
            pkgs.valgrind
            # # Adds the 'hello' command to your environment. It prints a friendly
            # # "Hello, world!" when run.
            # pkgs.hello
        
            # # It is sometimes useful to fine-tune packages, for example, by applying
            # # overrides. You can do that directly here, just don't forget the
            # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
            # # fonts?
            # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
        
            # # You can also create simple shell scripts directly inside your
            # # configuration. For example, this adds a command 'my-hello' to your
            # # environment:
            # (pkgs.writeShellScriptBin "my-hello" ''
            #   echo "Hello, ${config.home.username}!"
            # '')
          ];
        

        then when done you run home-manager switch, and off you go

        It is switch because it is atomic, you can go back to a previous configuration— but it'll let you explore home-manager --help for the other options

        and yes, if i've tested all those, they all.....work expect for kdeconnect:

        12e1028e-3746-4e3e-8c9d-7f928eb434f0-image.png

        This is must closer than i got with crackle tho, i imagine there will be similar errors with other GUI apps, but CLI apps ought to work—

        FuseteamF 1 Reply Last reply Reply Quote 3
        • FuseteamF Offline
          Fuseteam @Fuseteam
          last edited by Fuseteam

          ok final last word; you may run into this error on focal devel:

          35b520fd-fc7d-40f1-8ab9-a45a76eb20cc-image.png

          don't worry it is noisy, but it harmless

          It will be fixed in noble see https://gitlab.com/ubports/development/core/hybris-support/tls-padding/-/merge_requests/4
          and possibly in focal soon™

          C 1 Reply Last reply Reply Quote 4
          • C Offline
            ChromiumOS-Guy @Fuseteam
            last edited by

            @Fuseteam first let me say this is awesome, second if you want help I want to contribute to this.
            I used nixos for while before switching to FreeBSD is has been a joy, so I say this with confidence this is finally the point where we can actually use UT as a full on linux distribution, the influx of packages here will be amazing.

            if you don't mind aside from reading up on the code, I will make a UI QML app so end users can just pick and install/uninstall primitive but any UI is better then terminal when walking.

            looking forward to seeing a repo on gitlab.

            FuseteamF 1 Reply Last reply Reply Quote 4
            • FuseteamF Offline
              Fuseteam @ChromiumOS-Guy
              last edited by Fuseteam

              @ChromiumOS-Guy said in snap pop crackle! ....and nix!? The future of crackle:

              @Fuseteam first let me say this is awesome, second if you want help I want to contribute to this.
              I used nixos for while before switching to FreeBSD is has been a joy, so I say this with confidence this is finally the point where we can actually use UT as a full on linux distribution, the influx of packages here will be amazing.

              if you don't mind aside from reading up on the code, I will make a UI QML app so end users can just pick and install/uninstall primitive but any UI is better then terminal when walking.

              looking forward to seeing a repo on gitlab.

              thanks, the script above is all that's needed to setup nix on UT on the latest focal devel.

              I agree with the UI idea, i believe it would be best if we add a plug in system-settings like so: https://gitlab.com/ubports/development/core/lomiri-system-settings/-/merge_requests/437

              if you rather see the setup script on gitlab you can find it here: https://gitlab.com/tuxecure/crackle-apt/crackle/-/blob/v0.5/crackle

              note that that's the only file i have so far, i'll be building that out further, based on the earlier iteration which can be found in the bash branch= but that's just for a cli interface

              I'm unsure atm how we will handle actual package management throught the UI tho but i'd say we can worry about that after we can at least setup nix via the UI

              FuseteamF 1 Reply Last reply Reply Quote 0
              • FuseteamF Offline
                Fuseteam @Fuseteam
                last edited by

                actually now i think about it, updates are easy enough with home-manager:

                nix-channel --update
                home-manager switch
                

                The "challenge" is more in figuring out how we add and remove entries under home.packages in ~/.config/home-manager/home.nix

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  ChromiumOS-Guy @Fuseteam
                  last edited by ChromiumOS-Guy

                  @Fuseteam leave that to me I have a lot of experience python scripting for string manipulation. can do this in 1h flat.
                  see this, my skills have improved a lot since then.

                  1 Reply Last reply Reply Quote 0
                  • C ChromiumOS-Guy referenced this topic
                  • C Offline
                    ChromiumOS-Guy @Fuseteam
                    last edited by ChromiumOS-Guy

                    @Fuseteam and I are working on making this a plugin, I just finished writing the automation/management of nix or at least the early version of it.

                    can find it here.

                    FuseteamF 1 Reply Last reply Reply Quote 1
                    • FuseteamF Offline
                      Fuseteam @ChromiumOS-Guy
                      last edited by

                      @ChromiumOS-Guy thanks again, i'll take a look and test it out further

                      1 Reply Last reply Reply Quote 1
                      • FuseteamF Offline
                        Fuseteam
                        last edited by

                        thanks to the help of @ChromiumOS-Guy crackle is now not only able to set up nix home-manager, but also install, update, remove and list packages using nix home-manager:

                        https://github.com/tuxecure/crackle/releases/tag/v0.5.2

                        for cli applications they all seem to work so far, sans minor warnings (looking at you tailscale)
                        for gui applications i have not figured out how to get it be picked up by the drawer, but early reports show them launching fine from the terminal so far

                        So for anyone wanting to test it out, now the time to test out and see how far we can push the boundaries

                        1 Reply Last reply Reply Quote 1
                        • J Online
                          johndoe @Fuseteam
                          last edited by

                          @Fuseteam This sounds very good.👍 So the goal is, that we will have a "Nix Package Store" in a future version of UT?

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post