-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support NixOS module #85
Comments
Does this also need to use |
Yes. The loss of precision is a Nix limitation. |
I wonder if there's anything else missing from the translation instructions. I'm trying to use a section from {
lib,
...
}: {
programs.dconf.profiles.user.databases = [
{
settings = let
inherit (lib.gvariant) mkTuple mkUint32 mkVariant;
in {
"org/gnome/clocks" = {
world-clocks = [
{
location = mkVariant [(mkUint32 2) (mkVariant ["Oslo" "ENGM" false [(mkTuple [1.0506882097005865 0.19344065294494067])] [(mkTuple [1.0506882097005865 0.19344065294494067])]])];
}
{
location = mkVariant [(mkUint32 2) (mkVariant ["London" "EGWU" false [(mkTuple [0.8997172294030767 (-7.272211034407213e-3)])] [(mkTuple [0.8997172294030767 (-7.272211034407213e-3)])]])];
}
{
location = mkVariant [(mkUint32 2) (mkVariant ["Sydney" "YSSY" true [(mkTuple [(-0.592539281052075) 2.638646934988996])] [(mkTuple [(-0.5913757223996479) 2.639228723041856])]])];
}
];
};
};
}
];
} it fails with
I'm not sure what the issue is. It looks like it might be "Elements in a list should have same type.", but that the error handling is broken? And if it is that, how do I convert a list of strings, booleans, and lists to the same type?
|
That was probably fixed by 753db87 |
Cool! Would you be OK to cut a release? |
It fails with a different error on dconf2nix master:
The relevant section of
|
That is caused by the following difference between Nixpkgs and h-m GVariant implementation:
You need to use -(mkDictionaryEntry ["location" (mkVariant …)])
+(mkDictionaryEntry "location" (mkVariant …))
I want to make my config parse first. Currently, there are still three issues: [com/github/wwmm/easyeffects/streamoutputs/compressor#0]
sidechain-input-device='alsa_input.platform-snd_aloop.0.analog-stereo'
[org/gnome/gnome-commander/preferences/general]
file-list-tabs=[('file:///home/jtojnar', byte 0x00, byte 0x01, false, false), ('file:///home/jtojnar', 0x01, 0x01, false, false)]
[org/gnome/easytag]
default-path=b'/home/jtojnar/Music' |
The misleading error will be fixed by NixOS/nixpkgs#308111. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/changing-gdm-gsettings-declaratively/49579/6 |
The Problem
NixOS now supports dconf database generation: NixOS/nixpkgs#234615
The Solution
Add
--nixos
flag that will make the following changes:lib.gvariant
generates instead oflib.hm.gvariant
mkDictionaryEntry
takes two arguments instead of a list.int32
needs to be explicitly constructed withmkInt32
(no implicit number literal)Alternatives
No response
Additional context
No response
Happens in the latest version
The text was updated successfully, but these errors were encountered: