Giter Site home page Giter Site logo

bud's People

Contributors

aciceri avatar blaggacao avatar c-14 avatar gtrunsec avatar n1kolasm avatar pacman99 avatar twz123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bud's Issues

bud is unable to detect hostname on macOS

Moved from divnix/digga#375 because this happens with every bud command I've tried.

Expected Behavior

On macOS/darwin systems, bud should detect my system's hostname.

Current Behavior

Running bud commands on macOS 11.6 results in an error caused by calling hostname with invalid options.

bud up --help

The output of bud up --help also indicates bud was not able to get a hostname, as the name is not included in the path mentioned in the usage section:

❯ bud up --help
hostname: illegal option -- -
usage: hostname [-fs] [name-of-host]
/nix/store/hzqrpf31gf060ka40hwpqpah79n54hgm-devshell-dir/bin/bud: line 8:  -1: substring expression < 0

Usage: up   Generate /path/to/repo/hosts//default.nix

Description:

bud --help

❯ bud --help
hostname: illegal option -- -
usage: hostname [-fs] [name-of-host]
/nix/store/hzqrpf31gf060ka40hwpqpah79n54hgm-devshell-dir/bin/bud: line 8:  -1: substring expression < 0

...

bud repl

❯ bud repl
hostname: illegal option -- -
usage: hostname [-fs] [name-of-host]
/nix/store/hzqrpf31gf060ka40hwpqpah79n54hgm-devshell-dir/bin/bud: line 8:  -1: substring expression < 0
Welcome to Nix version 2.4pre20210707_02dd6bb. Type :? for help.

Loading '/nix/store/q35fmyf6l8d5gc7khgmpqzj84q6l6wlj-repl.nix'...
Added 4 variables.

bud get (via devos)

DevOS' quick start guide suggests running the following command:

nix-shell https://github.com/divnix/devos/archive/master.tar.gz -A shell \
  --run "bud get master"

This also results in a similar error:

...
created 129 symlinks in user environment
building '/nix/store/izybzyn94b2plalg380jzqq4nnqllsyl-nixos-entrypoint.drv'...
fatal: not a git repository (or any of the parent directories): .git
hostname: illegal option -- -
usage: hostname [-fs] [name-of-host]
/nix/store/83cv4fcjj56sch8z0njlrrf8wiv8kim2-devshell-dir/bin/bud: line 8:  -1: substring expression < 0
11.09s user 30.55s system 5% cpu 13:06.38s total

Steps to Reproduce

On macOS, run any of the commands mentioned above.

Your Environment

  • macOS 11.6 on MacBookPro16,2 (Intel)

I'm guessing Darwin's hostname utility behaves differently than it would on NixOS or another Linux system.

This might also apply to other systems using the BSD utilities?

❯ which hostname
/bin/hostname
❯ hostname --help
hostname: illegal option -- -
usage: hostname [-fs] [name-of-host]

Revise "layer violations"

Scripts like flk get have domain knowledge of suites a strict (but optional) digga concept. Hence an argument can be made to move this command as a flkModule back into digga.

Review similar cases and take appropriate measures to normalize the code base.

Improve `flk vm` (bash script)

This is a tracking issue for incremental change propositions that were brought up in pull request divnix/digga#41.

Here are the different possible changes that were brought up:

  • Making error messages for each step of the vm / vm run process
  • Making the documentation for vm a one liner (or a help menu could be created for the vm subcommand)
  • For the vm script and one-shot vm, getting the nix store path created from the nix build instead of making a link to it
  • The user should be able to choose the ram and cpu limit of the vm
  • The user should be able to choose if he wants to build the vm with the bootloader of not

bud rebuild errors with: unrecognised flag '--extra-experimental-features'

On a clean build of devos+bud that I provisioned last week I get the following:

❯ bud rebuild HOST boot
error: unrecognised flag '--extra-experimental-features'

bud is currently pinned to the main branch:

❯ \grep -A 20 bud flake.lock
    "bud": {
      "inputs": {
        "beautysh": "beautysh",
        "devshell": [
          "digga",
          "devshell"
        ],
        "nixpkgs": [
          "nixos"
        ]
      },
      "locked": {
        "lastModified": 1633877936,
        "narHash": "sha256-+o3n6s7fR8dBGRldTGelyp2j3jSyTlrniOXwNfmMG20=",
        "owner": "divnix",
        "repo": "bud",
        "rev": "15df091133ff95216c321b09be04905c0a0944c4",
        "type": "github"
      },
      "original": {
        "owner": "divnix",
        "repo": "bud",
        "type": "github"
      }
    },

the version of nix provided in the devos shell (via direnv) is pretty new. Maybe this is the problem (also note the warnings)?

❯ nix --version
warning: unknown experimental feature 'ca-references'
warning: unknown experimental feature 'ca-references'
nix (Nix) 2.5pre20211126_55275fc

I am currently working around this by running nixos-rebuild --flake directly, but this subcommand is currently unusable on my box.

Revising `flk`

Some ideas:

  • incorporate agenix / ditch git-crypt
  • incorporate nvfetcher
  • ditch nixos-* scripts in favor of a more generalised deploy-rs (also can deploy home-manager or darwin or whatever else custom doployer you might want to teach it) (/cc @balsoft)
  • remove get subcommand (community|core branches) #4

readme

Hi!

I know this is experimental, but since this is presented as an integral part of the digga framework interface, wouldn't it be worthwhile to provide a basic README.md in this repo?

The digga documentation describes bud as a highly customizable tool, so there should be some indication how it should be customized.

Thanks for all this great work!

bud can't build portable user

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.

Make scripts reproducible

To make this as dynamic as possible )and convenient to drop in new scripts), I'd like to evaluate the possibility of a callee interface (script-side) that exposes the pkgs needed in the environment to the invoking nix, but not sure yet...

We can also go just plain nix TM.

@gytis-ivaskevicius

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.