-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
sway: Switch to 1.0 #57414
sway: Switch to 1.0 #57414
Conversation
Cool! Thank you! |
A few things could still be improved/discussed but this should be ready now. |
Please resolve the merge conflict. |
This is the result of executing: git mv -f pkgs/applications/window-managers/sway/beta.nix pkgs/applications/window-managers/sway/default.nix git mv -f nixos/modules/programs/sway-beta.nix nixos/modules/programs/sway.nix And removing sway-beta from the following files: pkgs/top-level/all-packages.nix nixos/modules/module-list.nix
Just wanted to avoid rebasing for now (that did not cause any conflicts because the relevant commit was already in my branch, automatic merging probably failed because the commit was cherry-picked and it couldn't find the correct common ancestor) because it makes reviewing the changes through GitHub harder (IMO). But it's ready to be merged via GitHub now and I've also squashed some commits (keeping two separate commits makes sense IMO to keep the history readable). The only final change was to drop the package option for now ( Update: I tested the changes again to be sure everything still works. |
-# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/) | ||
-output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill | ||
+# Default wallpaper | ||
+#output * bg ~/.config/sway/backgrounds/Sway_Wallpaper_Blue_1920x1080.png fill |
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.
Why is this done? The files are installed in the store path, right?
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.
That's because most users (including me) will probably choose the default workflow from the wiki (https://github.com/swaywm/sway/wiki#configuration) which I also referred to in the documentation of the enable
option:
The suggested location for the sway configuration file is
~/.config/sway/config
. To begin configuring sway, create this directory and copy the default config.mkdir -p ~/.config/sway cp /etc/sway/config ~/.config/sway/ $EDITOR ~/.config/sway/config
Read the default config - it has comments that explain what each option does. Read
man 5 sway
for more information about each config command.
But then their copy won't get updated and the /nix/store/
paths will eventually getting garbage collected. And I also stopped installing the default wallpapers into /nix/store/
but we could revert that.
~/.config/sway/backgrounds/Sway_Wallpaper_Blue_1920x1080.png
is not optimal but I kept it as an example.
An alternative would be to install the default wallpapers e.g. into /run/current-system/sw/share/sway/wallpapers
if we want to keep them.
Edit: Or e.g. /run/current-system/sw/share/backgrounds/sway
which would be the default location.
This commit contains the following changes: - nixos/sway: Remove the beta references - sway: Drop buildDocs - nixos/sway: Improve the documentation - sway,nixos/sway: Adapt Sway to NixOS - Copy the default configuration file to /etc/sway/config (Sway will still load the identical file from the Nix store but this makes it easier to copy the default configuration file). - This will also remove all references to the Nix store from the default configuration file as they will eventually be garbage collected which is a problem if the user copies it. - I've also decided to drop the default wallpaper (alternatively we could copy it to a fixed location). - nixos/sway: Drop the package option
I decided to merge it so that we have enough time to test it with different setups and get some feeback (I'm currently testing the backport for 19.03 and will hopefully be able to merge it soon). I've opened #57602 for further discussion, feedback, etc. |
First commit (moves sway-beta to sway)
This is the result of executing:
git mv -f pkgs/applications/window-managers/sway/beta.nix pkgs/applications/window-managers/sway/default.nix
git mv -f nixos/modules/programs/sway-beta.nix nixos/modules/programs/sway.nix
And removing sway-beta from the following files:
pkgs/top-level/all-packages.nix
nixos/modules/module-list.nix
Second commit (manual changes)
Should be a separate commit to keep the history readable.
TODOs
sway-beta
introduced a package option.sway
group.XKB_DEFAULT_*
still work?)WLC_REPEAT_*
will most likely not work anymore.i3status
by default, this can break setups (should we re-add it?).swaylock
andswayidle
are now separate packages.security.d/00-defaults
works correctly and reviewsway-security
. ->security.d
is irrelevant ATM (source) and thesway-security
man page is not in 1.0. (config.d
is also empty.)Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)