ChanServ changed the topic of #home-manager to: Support and discussion around the Home Manager project (https://github.com/nix-community/home-manager) | Logs: https://logs.nix.samueldr.com/home-manager
mcornick has quit [Quit: ZNC 1.8.1 - https://znc.in]
mcornick has joined #home-manager
justan0theruser has quit [Ping timeout: 250 seconds]
figgyc has quit [Quit: No Ping reply in 180 seconds.]
figgyc has joined #home-manager
rajivr has joined #home-manager
AlpineLlama has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
AlpineLlama has joined #home-manager
justanotheruser has joined #home-manager
infinisil has quit [Ping timeout: 246 seconds]
infinisil has joined #home-manager
evanjs has quit [Ping timeout: 252 seconds]
davidtwco has quit [Ping timeout: 246 seconds]
midchildan has quit [Ping timeout: 245 seconds]
davidtwco has joined #home-manager
midchildan has joined #home-manager
cole-h has quit [Ping timeout: 240 seconds]
evanjs has joined #home-manager
evanjs has quit [Read error: Connection reset by peer]
evanjs has joined #home-manager
srk has joined #home-manager
__monty__ has joined #home-manager
lunik1 has quit [Ping timeout: 240 seconds]
BlackBeans has joined #home-manager
<BlackBeans> I have a problem with home-manager
<petrichor> don't we all /s
<BlackBeans> :)
<petrichor> sorry, ignore me
<BlackBeans> when I try to add the emacs configuration, it tells me that I have two packages that have the same priority
* petrichor hides
<petrichor> do you have `pkgs.emacs` in `home.packages`?
<petrichor> wait, which are the conflicting packages?
<BlackBeans> ctags
<BlackBeans> within emacs
<BlackBeans> but no, I don't have `pkgs.emcs`
<BlackBeans> do I need it?
lunik1 has joined #home-manager
<petrichor> no, `programs.emacs.enabled = true;` will bring it in anyway
<BlackBeans> ok, that I have
<BlackBeans> btw I am trying to install `emacs-nox`, where should I indicate that?
<BlackBeans> should I have `programs.emacs-nox`?
<BlackBeans> should I have `programs.emacs-nox` ?
<petrichor> you can specify which emacs package is used by setting e.g. `programs.emacs.package = pkgs.emacs-nox` - take a look at `man home-configuration.nix` for more info on the options available
<petrichor> that man page is looooong, but it's easily searchable for the specific option
<BlackBeans> ok, this is also what I tried out
<BlackBeans> however I'm stuck with the aforementioned error
<BlackBeans> emacs is installed at system-leve
<BlackBeans> but I also want its configuration at user-level
<rycee> BlackBeans: Does the output of `nix-env -q` include emacs?
<BlackBeans> yes
<rycee> Then try uninstalling it with something like `nix-env -e emacs`.
<BlackBeans> couldn't I do it declaratively instead?
<BlackBeans> I am trying to keep everything declarative, as this is a "test" machine, not my actual working machine so I would like to be able to just copy the whole config file and be ready to go
<rycee> Packages installed with `nix-env -i` must be uninstalled using `nix-env -e`, it cannot be done declaratively.
<BlackBeans> oh, so it means I have installed, previously, emacs via `nix-env -i` ?
<rycee> Once you've done that the `home-manager switch` should work.
<rycee> Yes, you must have.
<BlackBeans> urray! it works
<BlackBeans> thanks
<BlackBeans> btw, does this mean I am bound to install `home-manager` via `nix-env` ?
<rycee> No, install by following the installation instructions. It does not involve nix-env.
<BlackBeans> the installation instructions tell me to use `nix-shell`
<__monty__> Yes, but only to run the install script.
<BlackBeans> ah ok
<__monty__> The other option is to use the nixos/nix-darwin module.
<BlackBeans> on linux?
<rycee> Yeah. once you do that and run `nix-env -q` you'll see `home-manager-path`. This is the entry managed by HM and includes everything you've installed declaratively.
<BlackBeans> ok
<__monty__> Yes, on nixos. If it's another linux you obviously can't use the module. At least not without hassle.
<BlackBeans> ok, but then why `nix-darwin` ?
<__monty__> Because there's both a nixos and a nix-darwin module and I don't discriminate?
<BlackBeans> ah, but's it's something different from the `nixos` module
<lunik1> you can also install it using flakes, but they are still experimental
<petrichor> are there any good (i.e. don't assume that you already understand nix internals and how flakes are implemented) tutorials on getting started with flakes for your system & home config?
<petrichor> i guess there might not be since the feature is still in development and most of the people using them are already fairly embedded in nix development
<lunik1> https://www.tweag.io/blog/2020-05-25-flakes/ this series of posts is pretty good
BlackBeans has quit [Quit: Connection closed]
BlackBeans has joined #home-manager
<BlackBeans> Hello, home-manager keeps saying `The option 'programs.<package>' defined in '/home/user/.config/nixpkgs/packages.nix' does not exist.` if I haven't installed `<package>` before system-wide
<SumnerEvans[m]> Not all of the packages in nixpkgs have a corresponding programs.<package> thing in Home Manager.
<SumnerEvans[m]> You can find the list of programs that you can configure with home manager here: https://rycee.gitlab.io/home-manager/options.html#opt-programs.abook.enable
<BlackBeans> how am I supposed to do then? Install all the packages system-wide?
<SumnerEvans[m]> Use https://rycee.gitlab.io/home-manager/options.html#opt-home.packages to install packages that aren't in `programs`.
<BlackBeans> thanks!
<BlackBeans> so, for example, if I wanted to install `rustup` because I want to manage `rust` channels that are not available through nix, can I tell home-manager to run a script to instruct `rustup` to install certain components when home-manager installs rustup?
<SumnerEvans[m]> You could try using: https://rycee.gitlab.io/home-manager/options.html#opt-home.activation
<SumnerEvans[m]> but honestly, I'd just do that manually
<SumnerEvans[m]> rust moves too fast lol
<BlackBeans> ok :)
<SumnerEvans[m]> You can also try: https://github.com/mozilla/nixpkgs-mozilla/
<SumnerEvans[m]> That's how I install rust inside of my nix-shell environments.
<BlackBeans> do you know what resource I could read to understand overlays? I'm currently reading the Nix pills, I have read bits of the Nix manual but haven't found much on overlays besides "they're like a Debian feature that allows multiple versions of the same package"
<SumnerEvans[m]> I am not super good with overlays, but I use this whenever I need to figure it out: https://nixos.wiki/wiki/Overlays
<BlackBeans> thx
<SumnerEvans[m]> There's even a section about how to do it in home manager:
<BlackBeans> so if I understand well, `super` is the updated version of the configuration, whilst `self` is the basic one?
<SumnerEvans[m]> Like I said, I'm not very good with overlays. I literally just copy-pasta from the examples and change things until it does what I want.
<BlackBeans> ok x)
<dutchie> BlackBeans: "self" is the final version after the fixed-point magic works, so it'll include any future overlays too
<dutchie> "super" is the previous package
<BlackBeans> hum...
<BlackBeans> what?
<BlackBeans> `self` is the version that is being built, except already done?
<dutchie> a newer convention is to call the arguments `final: prev: { ... }`
<dutchie> indeed, it is a little magic ;)
<SumnerEvans[m]> fixed-point has always been so confusing to me. Guess I'm just not 1337 enough
<simpson> dutchie: TIL. Where's the new convention from? I could guess that `final` is inspired by the Java keyword, but I wonder where `prev` originated. (We still use `self` and `super` in E today! Tradition~)
<dutchie> simpson: I always assumed just from english "final version" and "previous overlay"
<BlackBeans> It makes more sense than `self` and `super` IMO
<BlackBeans> (especially because they look like python keywords, but they don't mean at all the same thing)
<SumnerEvans[m]> super makes literally no sense IMO
<petrichor> nope, i've never internalised the difference, always had to peer in bamboozlement at examples when i needed to use it
<petrichor> i'm also not super clear when to use `overrides` vs `overlays`, other than the latter makes more sense when you're overriding loads of stuff and packaging it up to be easy to use, like emacs-overlay does
<BlackBeans> btw if use rust I assume you already ran `cargo test`
<BlackBeans> because when I do it crashing saying it could not execute process
<SumnerEvans[m]> what could it not find
<BlackBeans> then there is a very weird behavior, I try to directly execute the binary generated, which exists (`ls` shows it, it is tab-completed)
<SumnerEvans[m]> ?
<simpson> BlackBeans, SumnerEvans[m]: The terminology goes back to Smalltalk, through languages like Self and Java. What's interesting is that Nix has a dialog between `self` and `super`, like in E, in order to do mutually-cooperating inheritance.
<BlackBeans> it says file not found
<BlackBeans> it cannot execute procecs `/home/user/path/to/project/target/debug/deps/project-hash`
<BlackBeans> it builds without problem
<BlackBeans> wtf
<SumnerEvans[m]> linker error?
<BlackBeans> none, `cargo build` works like a charm
<SumnerEvans[m]> no, like the executable itself, is it linked against something that it can't access?
<BlackBeans> I don't think so, all the dependencies have been downloaded and compiled so there are no reasons
<SumnerEvans[m]> simpson: thanks for the explanation!
<BlackBeans> mh, actually I think you may be right
<BlackBeans> how do I know if it is linked against something it can't access?
<SumnerEvans[m]> ldd path/to/executable
<BlackBeans> ok, so it shows me a list of objects it is linked against
<BlackBeans> there is one that doesn't have an arrow pointing to a file
<BlackBeans> `linux-vdso.so.1`
<SumnerEvans[m]> That sounds like your problem.
<SumnerEvans[m]> ,locate linux-vdso.so.1
<BlackBeans> nothing
<{^_^}> Couldn't find in any packages
<BlackBeans> I don't even know what `vdso` is...
<dutchie> it's the linker
<dutchie> or something related to linker magic
<BlackBeans> so I don't have the linker on my system?
<dutchie> so not quite "linker magic" but also not a real file
<BlackBeans> ok
<BlackBeans> so it's not a problem if the file doesn't exist
<BlackBeans> therefore the problem lies in an other of the linked libraries
<BlackBeans> and yet `ldd` doesn't show any as missing
<BlackBeans> do you think the `cc` linker is not installed as a dependecy?
BlackBeans has quit [Quit: Connection closed]
ryantrinkle has quit [Ping timeout: 252 seconds]
rajivr has quit [Quit: Connection closed for inactivity]
ryantrinkle has joined #home-manager
cole-h has joined #home-manager
ambroisie has joined #home-manager
superherointj has joined #home-manager
superherointj has quit [Quit: Leaving]
futile has joined #home-manager
<futile> Hi, I'm using flakes for my system configuration, and want to add home-manager to my system, and have my home-manager config in my user directory. But when I add, e.g., `home-manager.users.my-user = import /home/my-user/home.nix` to my flake.nix, nix (rightfully) complains that access to that path is forbidden in restricted mode. But this feels
<futile> like I have to bake my user config into my system config, which seems weird to me. Any way to achieve what I'm going for? This is using home-manager/release-20.09, though I don't mind switch to master for testing etc.
<cole-h> it has to be a part of your flake
<cole-h> you can copy the home.nix to e.g. `flakedir/users/my-user.nix` and import that within the flake, and then symlink it to `/home/my-user/home.nix` if you like
<futile> but doesn't that mean that I need root permission to rebuild my user config?
quinn has quit [Quit: ZNC 1.8.1 - https://znc.in]
quinn has joined #home-manager
<futile> that seems somehow really unfortunate :/
cole-h has quit [Quit: Goodbye]
cole-h has joined #home-manager
futile has quit [Quit: Connection closed]
justan0theruser has joined #home-manager
futile has joined #home-manager
justanotheruser has quit [Ping timeout: 260 seconds]
srk has quit [Ping timeout: 252 seconds]
virkony has quit [Ping timeout: 246 seconds]
virkony has joined #home-manager
__monty__ has quit [Quit: leaving]
Minnozz has quit [Ping timeout: 245 seconds]
Minnozz has joined #home-manager
cole-h has quit [Ping timeout: 246 seconds]
cole-h has joined #home-manager
ryantrinkle has quit [Ping timeout: 260 seconds]
futile has quit [Quit: Connection closed]
supersandro20001 has joined #home-manager
supersandro2000 is now known as Guest45104
Guest45104 has quit [Killed (card.freenode.net (Nickname regained by services))]
supersandro20001 is now known as supersandro2000
ryantrinkle has joined #home-manager