-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Gnome and Pantheon: install nixos wallpapers #86163
Conversation
8cfd145
to
a3942f8
Compare
mkdir -p $out/share/backgrounds/nixos | ||
ln -s $src $out/share/backgrounds/nixos/${src.name} | ||
|
||
# TODO: is this path still needed? | ||
mkdir -p $out/share/artwork/gnome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not see artwork
used within path when searching g-c-c. Googling "/usr/share/artwork/gnome" shows no results, without gnome
only few mentions but none of them look official. We might want to keep this for backwards compatibility, though.
I don't really understand the failing check here. |
@ofborg eval (I have no idea) |
Would using |
Nope, I tried that at first and still got
when building the manual. |
Using the following patch, --- a/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -133,7 +133,7 @@ in
background = mkOption {
type = types.path;
- default = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath;
+ default = let pkg = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom; pp = "${pkg}/share/backgrounds/nixos/${pkg.src.name}"; in builtins.trace (builtins.getContext pkg.gnomeFilePath) (builtins.trace (builtins.getContext pp) pp);
description = ''
The background image or color to use.
'';
Edit: Nope. Reading it wrong again. |
This patch seems to work: --- a/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -133,9 +133,7 @@ in
background = mkOption {
type = types.path;
- # TODO: use gnomeFilePath when fixing string context issues in make-option-doc
- # https://github.com/NixOS/nixpkgs/issues/83863
- default = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png";
+ default = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath;
description = ''
The background image or color to use.
'';
--- a/pkgs/data/misc/nixos-artwork/wallpapers.nix
+++ b/pkgs/data/misc/nixos-artwork/wallpapers.nix
@@ -29,7 +29,7 @@ _EOF
'';
passthru = {
- gnomeFilePath = "${pkg}/share/backgrounds/nixos/${src.name}";
+ gnomeFilePath = builtins.unsafeDiscardStringContext "${pkg}/share/backgrounds/nixos/${src.name}";
kdeFilePath = "/share/wallpapers/${name}/contents/images/${src.name}";
};
Obviously, not a good idea. Not only it is unsafe but it would also break dependence tracking when used in derivations. I am not sure why does not What is even weirder, when we construct the string in place as before, it shows no context: trace: { } but if we do the same in repl, we get a context: nix-repl> let pkg = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom; pp = "${pkg}/share/backgrounds/nixos/${pkg.src.name}"; in builtins.trace (builtins.getContext pp) pp
trace: { "/nix/store/qry13wjmx6wbj4rcb6qz2yis4m3bhin5-simple-dark-gray-2018-08-28.drv" = { outputs = [ "out" ]; }; }
"/nix/store/pzgmk5wx85drxbw1ikyg50gc1whi36ag-simple-dark-gray-2018-08-28/share/backgrounds/nixos/nix-wallpaper-simple-dark-gray_bottom.png" |
It makes sense for the manual not to depend on other attributes but at the same time user’s configuration should. Not sure if this is solvable. |
@jtojnar Yay ✨. That seems fine to me. Re the investigation #86163 (comment), perhaps @edolstra can shed some light. |
This makes things so much easier, and we install to the path that both gnome-backgrounds and elementary-wallpapers install to.
21a30c0
to
5100e4f
Compare
Motivation for this change
Fix #86146.
We were hardcoding them into settings but not installing them.
This also changes nixos-artwork slightly 581122f. Namely, install to share/backgrounds, and provide an absolute path to the file.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)