GithubHelp home page GithubHelp logo

error: packages '/nix/store/yvr7hjdxj1b5jcjk3pgh9z4gmwn78lql-home-manager-path/etc/man_db.conf' and '/nix/store/naig9qc4bmx1gp4nmsmxwmnllx0cjlvc-nix-on-droid-path/etc/man_db.conf' have the same priority 5 about nix-on-droid HOT 19 CLOSED

nix-community avatar nix-community commented on August 26, 2024
error: packages '/nix/store/yvr7hjdxj1b5jcjk3pgh9z4gmwn78lql-home-manager-path/etc/man_db.conf' and '/nix/store/naig9qc4bmx1gp4nmsmxwmnllx0cjlvc-nix-on-droid-path/etc/man_db.conf' have the same priority 5

from nix-on-droid.

Comments (19)

Gerschtli avatar Gerschtli commented on August 26, 2024 1

Maybe there is an implicit reference of man in your home-manager config.. You could also use the option home-manager.useUserPackages, which may fix this issue for you too.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024 1

Can't think of any.. Maybe someone depends on this in his custom config so a conditional default value based on the stateVersion seems to be the most apprpriate options besides adding a small comment in the README that this option is recommended to be set to true.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024 1

For future reference: If you want to use a different nix package, use config.nix.package option.

I will close this issue as it seems to be solved. Feel free to reopen if necessary.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

That is strange, do you install a package in nix-on-droid and home-manager? Maybe share your current config.

It would help, if we know, what package is causing the conflict, so if you have ~/.nix-profile/etc/man_db.conf already present, could you run a ls -l for it, that we see the link target?

from nix-on-droid.

bbigras avatar bbigras commented on August 26, 2024

I installed openssh with nix-env and I have this:

-bash-4.4$ ls -l ~/.nix-profile/etc/man_db.conf
lrwxrwxrwx 1 nix-on-droid nix-on-droid 82 Jan  1  1970 /data/data/com.termux.nix/files/home/.nix-profile/etc/man_db.conf -> /nix/store/naig9qc4bmx1gp4nmsmxwmnllx0cjlvc-nix-on-droid-path/etc/man_db.conf

config

{ pkgs, ... }:

{
  # Simply install just the packages
  environment.packages = with pkgs; [
    # User-facing stuff that you really really want to have
    vim  # or some other editor, e.g. nano or neovim

    # Some common stuff that people expect to have
    diffutils
    findutils
    utillinux
    tzdata
    hostname
    man
    gnugrep
    gnupg
    gnused
    gnutar
    bzip2
    gzip
    xz
    zip
    unzip
  ];

  # Backup etc files instead of failing to activate generation if a file already exists in /etc
  environment.etcBackupExtension = ".bak";

  # Read the changelog before changing this value
  system.stateVersion = "20.03";

  # After installing home-manager channel like
  #   nix-channel --add https://github.com/rycee/home-manager/archive/release-20.03.tar.gz home-manager
  #   nix-channel --update
  # you can configure home-manager in here like
  home-manager.config =
   { pkgs, ... }:
   {

     programs.bat.enable = true;
     programs.command-not-found.enable = true;
     programs.fzf.enable = true;
     programs.starship.enable = true;

     home.packages = [
       pkgs.neofetch
     ];

   };
}

# vim: ft=nix

channels

home-manager https://github.com/rycee/home-manager/archive/release-20.03.tar.gz
nix-on-droid https://github.com/t184256/nix-on-droid/archive/release-20.03.tar.gz
nixpkgs https://nixos.org/channels/nixos-20.03

from nix-on-droid.

bbigras avatar bbigras commented on August 26, 2024

It seems fine if I remove man from environment.packages

from nix-on-droid.

bbigras avatar bbigras commented on August 26, 2024

Thanks!

from nix-on-droid.

ShamrockLee avatar ShamrockLee commented on August 26, 2024

You could also use the option home-manager.useUserPackages, which may fix this issue for you too.

This approach definitely needs documentation. This is a common issue with high reproducibility.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

Maybe we should also consider changing the default value for home-manager.useUserPackages to true.

from nix-on-droid.

t184256 avatar t184256 commented on August 26, 2024

@Gerschtli, what would be the downsides?

from nix-on-droid.

t184256 avatar t184256 commented on August 26, 2024

@Gerschtli, is it OK to bump stateVersion at any moment or should we wait until the next NixOS release?

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

You mean the default value? I think we should never change it. We should add a conditional switch to enable useUserPackages if stateVersion is higher or equal than 20.09. That is the default behaviour of nixos and home-manager too. And of course add this change to a not yet created changelog.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

I have to correct myself: I have just checked and nixos sets stateVersion default to current release, home-manager never changes its default value.

I think the most consistent and predictable way to handle this is the home-manager way: The user has to manually update the stateVersion because essentially this value should not have any default value at all and is just set to provide backwards compatibility for system installations before introducing this option.

from nix-on-droid.

t184256 avatar t184256 commented on August 26, 2024

I meant, should I introduce an intermediate 20.08 to make the change sooner, or rather do it in some staging-20.09 and only fold it back to master when 20.09 is out. Now I see us both leaning towards 20.09.

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

Ah okay, now I understand.

How about adding it to master (aka the unstable bleeding edge channel) and when 20.09 is released creating a new channel? Of course you could create a staging-20.09 but I don't see the real benefit.

The only problem could be that users of nix-on-droid use the master channel and don't know of the stable ones, but I would consider it minor and just provide a Changelog or a short Paragraph in the Readme for all possible channels and branches (and maybe a date for end of support).

from nix-on-droid.

573 avatar 573 commented on August 26, 2024

I see similar output when doing:

nix-channel --update
nix-env -iA nixpkgs.nix

error: packages '/nix/store/m3zf69cqn7a85y2bjvg5rn7a9llf0d9w-nix-on-droid-path/share/nix/sandbox/sandbox-network.sb' and '/nix/store/g4d6n09a189ird2rnr6ab79pbbz3vfm9-nix-2.3.6/share/nix/sandbox/sandbox-network.sb' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

But why do you want to do this? nix is already included in nix-on-droid-path

from nix-on-droid.

573 avatar 573 commented on August 26, 2024

@Gerschtli basically want to upgrade it.
Pls correct me if I misunderstood something ?

from nix-on-droid.

Gerschtli avatar Gerschtli commented on August 26, 2024

nix-on-droid-path contains the nix package of the installed nixpkgs channel. If you want another version of nix, you should add an overlay where you change the nix package to the latest version.

For reference, nix is installed in modules/environment/path.nix, an overlay would be the best option to change the version.

from nix-on-droid.

Related Issues (20)

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.