ublue-os / fleek

[deprecated] Own your $HOME
https://getfleek.dev
Apache License 2.0
831 stars 27 forks source link

Initial apply fails on AlmaLinux 9 under WSL2 #347

Open mattwillsher opened 10 months ago

mattwillsher commented 10 months ago

Describe the bug

Initial run of nix run"https://getfleek.dev/latest.tar.gz" -- applyfails under Alma Linux 9 on WSL2 with systemd enabled. Nix installed viacurl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install`

% FLEEK_DEBUG=1 nix run "https://getfleek.dev/latest.tar.gz" -- apply
DEBUG debug enabled
DEBUG Loaded configuration location: .local/share/fleek
DEBUG git autopush: true autocommit: true autopull: true
 [*]  Apply fleek configuration
INFO  Initializing templates
INFO  skipping git
 [✓]  Writing configuration files
INFO  skipping git
INFO  Applying configuration
DEBUG running nix command directory: /home/matt/.local/share/fleek
error:
       … in the right operand of the update (//) operator

         at /nix/store/db7dfj545xf35q6ia29gky48vk487s8q-source/flake.nix:128:11:

          127|           docs-manpages = docs.manPages;
          128|         } // testPackages);
             |           ^
          129|

       … while calling the 'listToAttrs' builtin

         at /nix/store/lrmxkfadhlcrakza60w0mc8sc327a5qg-source/lib/attrsets.nix:633:5:

          632|     set:
          633|     listToAttrs (map (attr: f attr set.${attr}) (attrNames set));
             |     ^
          634|

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'nix-lib-nmt' missing

       at /nix/store/db7dfj545xf35q6ia29gky48vk487s8q-source/tests/default.nix:36:11:

           35|
           36| in import pkgs.nix-lib-nmt {
             |           ^
           37|   inherit lib pkgs modules;
  ERROR
  ERROR   Error: exit status 1
  ERROR
 [d]  Command stderr:

 [d]
      ExecutionID:b338c8a0913147e6bfcbda7af33ffc1a

  ERROR
  ERROR   Error: exit status 1
  ERROR
 [d]  Command stderr:

 [d]
      ExecutionID:b338c8a0913147e6bfcbda7af33ffc1a

To Reproduce Steps to reproduce the behavior:

Expected behavior Actionable error in case of misconfigration

Environment

Additional context Nix version 2.19.2. Same issue occured under nix official single user installation method.

fvkd commented 10 months ago

I'm getting this exact same error on 4 of my machines after I woke up from a nap today.

Environment: OS: NixOS Unstable 24.5 Shell: bash Fleek version: fleek version WARN Unable to check latest version └ error: Get "https://releases.getfleek.dev/fleek/stable/version": dial tcp: lookup releases.getfleek.dev on 127.0.0.1:53: no such host 0.10.5

fvkd commented 10 months ago

my flake.nix for reference:


{
  # DO NOT EDIT: This file is managed by fleek. Manual changes will be overwritten.
  description = "Fleek Configuration";

  inputs = {
    # Nixpkgs
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

    # Home manager
    home-manager.url = "https://flakehub.com/f/nix-community/home-manager/0.1.tar.gz";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";

    # Fleek
    fleek.url = "https://flakehub.com/f/ublue-os/fleek/*.tar.gz";

    # Overlays

  };

  outputs = { self, nixpkgs, home-manager, fleek, ... }@inputs: {

     packages.x86_64-linux.fleek = fleek.packages.x86_64-linux.default;

    # Available through 'home-manager --flake .#your-username@your-hostname'

    homeConfigurations = {

      "vivivi@666pad" = home-manager.lib.homeManagerConfiguration {
        pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
        extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
        modules = [
          ./home.nix 
          ./path.nix
          ./shell.nix
          ./user.nix
          ./aliases.nix
          ./programs.nix
          # Host Specific configs
          ./666pad/vivivi.nix
          ./666pad/custom.nix
          # self-manage fleek
          {
            home.packages = [
              fleek.packages.x86_64-linux.default
            ];
          }
          ({
           nixpkgs.overlays = [];
          })

        ];
      };

    };
  };
}
fvkd commented 10 months ago

umm. 3am EST, with nothing else to do with my time, for posterity, I installed NixOS fresh on a new machine, bare metal. configured git on a completely different account. drove over to my cousin's house across town just so we could fire up his Starlink modem, to make sure it's not something gone wrong with my isp. getting the same error on that fresh machine. cuzzo, for giggles, attempted to install Fleek to one of his baremetal Ubuntu boxes and a couple of VM's. everything is throwing this 'exit status 1' error.

Matt, would you mind posting the meat from your flake.nix?

romen commented 10 months ago

I think the problem actually has to do with these changes outside fleek: https://discourse.nixos.org/t/is-nix-lib-nmd-missing-from-23-11/38268

But again, I am a newbie, and my understanding is limited, so it can be that the correlation is not really there, and my untrained eye is deceiving me!

rafaeletc commented 10 months ago

Same error here today, @romen I do not think that is the error pointed out in the forum, 'fleek' uses 'unstable' version of nixpkgs

Not so familiar with home-manager and nix, so I have few guesses.

The flake.nix pointed out in log is not the same flake.nix from fleek conf, I think it can be some conflict with the home-manager

fvkd commented 10 months ago

I was about to start looking at flakehub for the issue after some coffee. but whatever potential solution I last tried a little bit ago was throwing errors when trying to pull something from NixOS.org.

I was having some random issues with Fleek a few days ago and the problem was stemming from flakehub. I don't remember the issue or what it's solution was unfortunately.

fvkd commented 10 months ago

yeah, I've got my setups pointed to unstable and I'm getting these errors.

rafaeletc commented 10 months ago

it's home-manager problem: https://github.com/nix-community/home-manager/issues/4903

mattwillsher commented 10 months ago

Matt, would you mind posting the meat from your flake.nix?

FWIW, I'm using default config, this is an entirely fresh install of Nix and Fleek.

ZeroDeth commented 10 months ago

Here is a temporary solution that will allow me to continue using my machines:

  1. Run the command nix profile install github:ublue-os/fleek (note that this command is deprecated)
  2. After that, run the command nix profile install nixpkgs#home-manager
  3. Change the value of 'ejected' from false to true
  4. From here, you can proceed. Please note that there are no documentation or examples available on how to switch from fleek to home-manager.

Or just run this cmd nix run "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz"

rafaeletc commented 10 months ago

I will try that. In fact, really, there is no extensive documentation of how to change from fleek to home-manager, but it is something provisioned in the solution design, there is the detailed fleek eject command here: https://getfleek.dev/docs/design

fvkd commented 10 months ago

ok. I feel really stupid right now. I'm not sure where yall are with solving this, but installing fleek to a fresh system is suddenly working flawlessly. On one of my secondary machines that fleek was broken on, suddenly just started applying just fine as it did before it was borked the other day. That is, I didn't go through any steps of scrapping all of the fleek files and reinstalling or anything. Just "fleek apply" and it cranked right up. So I just went to my main machine, fleek apply, and yet again, ERROR Error: exit status 1. BUT, I almost didn't notice, this time it included some info in the error message that it didn't want to clobber my .bashrc file, that I need to backup my bashrc and move it or run 'home-manager -b backup', which isn't a working home-manager command. So I gladly backed it up locally and removed it from my home dir. Fleek apply and hot. damn. Back in business, as usual. I don't know what the issue was, but problem solved, for now. I'm kind of puzzled why it didn't have a problem clobbering the bashrc file on the other machine.