<nixos-beginner>
nixos-beginner: hello guys, i want to use home-manager in system config.nix. Especially for dconf.settings feature. And i cannot compile example from https://rycee.gitlab.io/home-manager/options.html#opt-dconf.settings. I got error: attribute 'hm' missing, at ... line: window-position = lib.hm.gvariant.mkTuple [100 100]; So it's my
<nixos-beginner>
misunderstanding of nix in general. I see, that i need to 'hm' bring into scope, but i don't know how.
<mmatthieu>
no, you just need lib, I think
<mmatthieu>
At the top, you probably append the imports set with lib, or something like that
<mmatthieu>
If you look at the top of your /etc/nixos/hardware-configuration.nix, you should have an example.
<mmatthieu>
As an explaination, each module you'll use should be imported. For instance, if you want to reference some packages in your configuration, you have to import `pkgs`, and then you can use `pkgs.<a package>`.
<mmatthieu>
* As an explaination, each module you'll use should be imported. For instance, if you want to reference some packages in your configuration, you have to import `pkgs`, and then you can use `pkgs.<package>`.
<nixos-beginner>
"release-19.09"; };in { imports = [ (import "${home-manager}/nixos") ./joe.nix ];}#### file users/joe.nix ####{ config, lib, pkgs, options, ... }:{ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.joe = { isNormalUser = true; home = "/home/joe"; extraGroups = [
<nixos-beginner>
"wheel" # Enable ‘sudo’ for the user by adding him to the wheel group "vboxsf" ]; }; home-manager.users.joe = { pkgs, lib, ... }: { dconf.settings= { "org/gnome/calculator" = { button-mode = "programming"; show-thousands = true; base = 10; word-size = 64; window-position =
<mmatthieu>
line 50, I'm not sure you have to import pkgs and lib again. I think you can remove that set.
<mmatthieu>
You already imported it at the top of joe.nix
<nixos-beginner>
yeah, i see
<mmatthieu>
You still have the same error with lib ?
<mmatthieu>
I think that if it still fails, it's for something else.
<nixos-beginner>
in general home-manager somehow should extend lib a i should see that functions in lib.mh; but i cannot
<nixos-beginner>
*lib.hm
<mmatthieu>
If I remember well, you need to activate dconf from configuration.nix `services.dbus.packages = [ pkgs.gnome3.dconf ];`
<nixos-beginner>
it works even without that. I can inject local dconf db, but some option requeries special types, which cannot be produced by nix in base, so lib.hm contains factory methods for that types, and i wanna to access them
<mmatthieu>
Well, I don't know, then. but I'm pretty sure someone here does.
<nixos-beginner>
nevermind, thanks for assist. I don't have time for now to play with it. I just wanted to try this feature, but probably i need more investigate concepts of nix.
cole-h has joined #home-manager
nixos-beginner has quit [Remote host closed the connection]
nixos-beginner79 has joined #home-manager
nixos-beginner79 has quit [Remote host closed the connection]
hmpffff has quit [Quit: Bye…]
hmpffff has joined #home-manager
johnw` has joined #home-manager
hax404 has quit [Ping timeout: 246 seconds]
hax404 has joined #home-manager
hmpffff_ has joined #home-manager
hmpffff has quit [Ping timeout: 256 seconds]
pbogdan has joined #home-manager
pbogdan has quit [Client Quit]
pbogdan has joined #home-manager
hmpffff_ has quit [Quit: nchrrrr…]
test has joined #home-manager
test is now known as Guest12570
Guest12570 has quit [Remote host closed the connection]