divnix / bud

EXPERIMENTAL -- A highly composable system ctl tool
MIT License
15 stars 12 forks source link

bud can't build portable user #38

Open yipengsun opened 2 years ago

yipengsun commented 2 years ago

Hi,

I'm trying to build a portable home-manager profile with:

bud home dev

where dev is the portable user, defined as:

        home = {
          imports = [ (digga.lib.importExportableModules ./local/modules) ];
          modules = [ homeage.homeManagerModules.homeage ];
          importables = rec {
            profiles = digga.lib.rakeLeaves ./local/profiles;
            suites = with profiles; rec {
              base = [ hm-state-version git zsh python neovim tmux ranger ];
              common-apps = [ apps www term ];
              coding = [ dev bat direnv fzf ];
              multimedia = [ mpv mpd ];
              prod = [ hep zathura ledger ];

              # settings
              linux-config-cli = [ xdg-user-dirs dircolors ];
              linux-config-gui = [ xdg-mime-apps fontconfig wm gui ];

              workstation = base ++ common-apps ++ coding ++ multimedia ++ prod ++
              linux-config-cli ++ linux-config-gui;
              server = base ++ coding ++ linux-config-cli;
            };
          };

          # Users here can be deployed without a host
          users = {
            dev = { suites, ... }: { imports = suites.server; };
          }; # digga.lib.importers.rakeLeaves ./users/hm;
        };

But I got the following error:

warning: Using saved setting for 'extra-experimental-features = nix-command flakes' from ~/.local/share/nix/trusted-settings.json.
warning: Using saved setting for 'extra-substituters = https://nix-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.
error: flake 'git+file:///home/syp/src/nix-config' does not provide attribute 'packages.x86_64-linux.homeConfigurationsPortable.x86_64-linux."syp".activationPackage', 'legacyPackages.x86_64-linux.homeConfigurationsPortable.x86_64-linux."syp".activationPackage' or 'homeConfigurationsPortable.x86_64-linux."syp".activationPackage'

where syp is my normal user name.

My configuration is at https://github.com/yipengsun/nix-config. I'm not sure if this is a bud problem. Feel free to move this issue.

Thanks.

GTrunSec commented 2 years ago

Please, try to run bud home <build|switch> <user> instead.

yipengsun commented 2 years ago

I tried bud home build dev, and it seems to get my normal user built: I checked the result/home-path/bin folder and it contains all binaries for my normal user.

Also, with bud --help, I get:

  home [switch] (user@fqdn | USER HOST | USER) Home-manager config of USER from HOST or host-less portable USER for current architecture

So if I'm reading correctly, I should be able to do bud home dev?

Maybe there's a switch in the command line interface for the newer bud? I'm using:

    "bud": {
      "inputs": {
        "beautysh": "beautysh",
        "devshell": [
          "digga",
          "devshell"
        ],
        "nixpkgs": [
          "nixos"
        ]
      },
      "locked": {
        "lastModified": 1642035816,
        "narHash": "sha256-1Lq5c1AeUv/1SK08+O704JVfDdD/zodHzA0cv0TIga8=",
        "owner": "divnix",
        "repo": "bud",
        "rev": "a789d710851441ba7e7cd59be378623b1fe05688",
        "type": "github"
      },
      "original": {
        "owner": "divnix",
        "repo": "bud",
        "type": "github"
      }
    },