Merge pull request #122995 from primeos/sway-install-default-wallpaper
This commit is contained in:
commit
5a14b59cd7
3 changed files with 31 additions and 6 deletions
|
@ -123,6 +123,8 @@ in {
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = [ swayPackage ] ++ cfg.extraPackages;
|
systemPackages = [ swayPackage ] ++ cfg.extraPackages;
|
||||||
|
# Needed for the default wallpaper:
|
||||||
|
pathsToLink = [ "/share/backgrounds/sway" ];
|
||||||
etc = {
|
etc = {
|
||||||
"sway/config".source = mkOptionDefault "${swayPackage}/etc/sway/config";
|
"sway/config".source = mkOptionDefault "${swayPackage}/etc/sway/config";
|
||||||
"sway/config.d/nixos.conf".source = pkgs.writeText "nixos.conf" ''
|
"sway/config.d/nixos.conf".source = pkgs.writeText "nixos.conf" ''
|
||||||
|
|
|
@ -22,19 +22,22 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./sway-config-no-nix-store-references.patch
|
|
||||||
./load-configuration-from-etc.patch
|
./load-configuration-from-etc.patch
|
||||||
|
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./fix-paths.patch;
|
src = ./fix-paths.patch;
|
||||||
inherit swaybg;
|
inherit swaybg;
|
||||||
})
|
})
|
||||||
|
] ++ lib.optionals (!isNixOS) [
|
||||||
|
# References to /nix/store/... will get GC'ed which causes problems when
|
||||||
|
# copying the default configuration:
|
||||||
|
./sway-config-no-nix-store-references.patch
|
||||||
|
] ++ lib.optionals isNixOS [
|
||||||
|
# Use /run/current-system/sw/share and /etc instead of /nix/store
|
||||||
|
# references:
|
||||||
|
./sway-config-nixos-paths.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = lib.optionalString isNixOS ''
|
|
||||||
echo -e '\ninclude /etc/sway/config.d/*' >> config.in
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson ninja pkg-config wayland-scanner scdoc
|
meson ninja pkg-config wayland-scanner scdoc
|
||||||
];
|
];
|
||||||
|
@ -47,7 +50,6 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Ddefault-wallpaper=false"
|
|
||||||
"-Dsd-bus-provider=libsystemd"
|
"-Dsd-bus-provider=libsystemd"
|
||||||
]
|
]
|
||||||
++ lib.optional (!enableXWayland) "-Dxwayland=disabled"
|
++ lib.optional (!enableXWayland) "-Dxwayland=disabled"
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
diff --git a/config.in b/config.in
|
||||||
|
index 08703bef..f3872730 100644
|
||||||
|
--- a/config.in
|
||||||
|
+++ b/config.in
|
||||||
|
@@ -22,8 +22,8 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
||||||
|
|
||||||
|
### Output configuration
|
||||||
|
#
|
||||||
|
-# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
|
||||||
|
-output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||||
|
+# Default wallpaper (more resolutions are available in /run/current-system/sw/share/backgrounds/sway/)
|
||||||
|
+output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||||
|
#
|
||||||
|
# Example configuration:
|
||||||
|
#
|
||||||
|
@@ -214,4 +214,4 @@ bar {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-include @sysconfdir@/sway/config.d/*
|
||||||
|
+include /etc/sway/config.d/*
|
Loading…
Reference in a new issue