Skip to content

A per-user configuration.nix #3990

Closed
Closed

Description

@copumpkin

If I'm logging into or setting up a new machine, I want reproducible machine configuration, but also reproducible user configuration. My software configuration, programs installed, nix profiles, etc. would all be great to maintain like anything else. The goal being to minimize start-up time when someone gets a new account or machine.

Has this been discussed/worked on?

Activity

  1. copumpkin commented on Sep 6, 2014

    @copumpkin
    MemberAuthor

    Another benefit would be sharing of developer set-ups and such, the way many people put their dotfiles online.

  2. lucabrunox commented on Sep 6, 2014

    @lucabrunox
    Contributor

    For the programs you can simply have a .nix file with a set, and nix-env -i
    file.nix.

    On Sat, Sep 6, 2014 at 7:27 PM, Daniel Peebles [email protected]
    wrote:

    Another benefit would be sharing of developer set-ups and such, the way
    many people put their dotfiles online.

    —
    Reply to this email directly or view it on GitHub
    #3990 (comment).

    www.debian.org - The Universal Operating System

  3. vcunat commented on Sep 6, 2014

    @vcunat
    Member
  4. eduarrrd commented on Sep 6, 2014

    @eduarrrd
    Contributor

    Having a per-user configuration.nix would also allow to define services on a per user basis (through your systemd user instance).

    Also: fonts and env variables.

  5. lucabrunox commented on Sep 6, 2014

    @lucabrunox
    Contributor

    The main problem is about privacy. /nix/store is world readable. We as a
    whole community should think about this problem more, because it's becoming
    a bottleneck in the nix expressiveness.

    On Sat, Sep 6, 2014 at 10:50 PM, eduarrrd [email protected] wrote:

    Having a per-user configuration.nix would also allow to define services on
    a per user basis (through your systemd user instance).

    Also: fonts and env variables.

    —
    Reply to this email directly or view it on GitHub
    #3990 (comment).

    www.debian.org - The Universal Operating System

  6. vcunat commented on Sep 6, 2014

    @vcunat
    Member

    @lethalman: /nix/store privacy is being worked on by @nbp.

  7. lucabrunox commented on Sep 6, 2014

    @lucabrunox
    Contributor

    Any pointer about following the progress?

    On Sat, Sep 6, 2014 at 11:16 PM, Vladimír Čunát [email protected]
    wrote:

    @lethalman https://github.com/lethalman: /nix/store privacy is being
    worked on by @nbp https://github.com/nbp.

    —
    Reply to this email directly or view it on GitHub
    #3990 (comment).

    www.debian.org - The Universal Operating System

  8. vcunat commented on Sep 6, 2014

    @vcunat
    Member

    @lethalman: no idea. Perhaps in the sprint-sumup blogpost that is scheduled to be written on monday by @iElectric, or you may better ask Nicholas himself. From the beginning there was the world-readable assumption and giving it up complicates many things. In any case, you can never have real privacy against root.

  9. nbp commented on Sep 6, 2014

    @nbp
    Member

    Any pointer about following the progress?

    NixOS/nix#329

  10. nbp commented on Oct 19, 2014

    @nbp
    Member

    This issue is being addressed by the pull request #4594, taking a similar approach as #4493 suggested. The ultimate goal is to be able to share as many modules as possible between NixUP and NixOS.

  11. domenkozar commented on Nov 2, 2014

    @domenkozar
    Member

    A dupe of #2190

  12. alexeymuranov commented on Nov 13, 2016

    @alexeymuranov
    Contributor

    Is it possible to set the value of an attribute like programs.bash.promptInit per user?

  13. vcunat commented on Nov 13, 2016

    @vcunat
    Member

    You could e.g. add code conditioned on $USER into the system bashrc or similar approaches, but IMHO it's typically more practical to have such things in per-user dotfiles and have some solution for managing those (e.g. some version control system).

  14. alexeymuranov commented on Nov 13, 2016

    @alexeymuranov
    Contributor

    @vcunat, i need to

    source ${pkgs.gitAndTools.gitFull}/share/git/contrib/completion/git-prompt.sh

    somewhere for a given user. I do not know how to do it in .bashrc, but even if it is possible, i do not think this would be a proper solution. Besides, i am sharing my home folder between NixOS and Ubuntu.

  15. vcunat commented on Nov 13, 2016

    @vcunat
    Member

    @alexeymuranov: hmm, one can always do such things, though it may not be pretty:

    source bashrc-common
    if [ grep -q '^ID=nixos' /etc/os-release ]; then
        source bashrc-nixos
        # ^ containing e.g. source ~/nix-profile/share/git/contrib/completion/git-prompt.sh
    else...
  16. alexeymuranov commented on Feb 4, 2017

    @alexeymuranov
    Contributor

    @vcunat, it turned out that in my case it was enough to set programs.bash.enableCompletion = true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions