Update nixpkgs-unstable, use built-in swayfx

This commit is contained in:
Natsu Kagami 2025-03-05 14:02:42 +01:00
parent bd150ad9e8
commit 214b36e2d6
Signed by: nki
GPG key ID: 55A032EB38B49ADB
7 changed files with 30 additions and 39 deletions

View file

@ -70,9 +70,14 @@ in
systemd.user.services.swaync.Install.WantedBy = [ "niri.service" ];
systemd.user.services.swaync.Unit.After = [ "niri.service" ];
systemd.user.targets.tray.Unit.After = [ "niri.service" ];
systemd.user.targets.xwayland.Unit.After = [ "niri.service" ];
programs.my-waybar = {
enable = true;
enableLaptopBars = lib.mkDefault cfg.enableLaptop;
};
systemd.user.services.waybar.Unit.After = [ "niri.service" ];
systemd.user.services.waybar.Install.WantedBy = [ "niri.service" ];
systemd.user.targets.xwayland.Unit.After = [ "niri.service" ];
# xwayland-satellite
systemd.user.services.niri-xwayland-satellite = lib.mkIf cfg.enable {

View file

@ -45,12 +45,15 @@ let
${pkgs.grim}/bin/grim -g (${pkgs.slurp}/bin/slurp) - | ${pkgs.swappy}/bin/swappy -f -
'';
playerctl = "${pkgs.playerctl}/bin/playerctl";
terminalCmd = lib.getExe config.linux.graphical.defaults.terminal.package;
in
{
# imports = [ ./ibus.nix ];
options.programs.my-sway = {
enable = mkEnableOption "Enable the sway configuration";
package = mkPackageOption pkgs "swayfx" { };
fontSize = mkOption {
type = types.float;
description = "The default font size";
@ -65,11 +68,6 @@ in
description = "Path to the wallpaper to be used";
default = config.linux.graphical.wallpaper;
};
terminal = mkOption {
type = types.str;
description = "The command to the terminal emulator to be used";
default = lib.getExe config.linux.graphical.defaults.terminal.package;
};
browser = mkOption {
type = types.str;
description = "The command for the browser";
@ -102,12 +100,12 @@ in
enable = true;
fontSize = mkDefault cfg.fontSize;
enableLaptopBars = mkDefault cfg.enableLaptop;
terminal = mkDefault cfg.terminal;
};
config.systemd.user.services.swaync.Install.WantedBy = mkIf cfg.enable [ "sway-session.target" ];
config.wayland.windowManager.sway = mkIf cfg.enable {
enable = true;
package = cfg.package;
systemd.enable = true;
systemd.variables = options.wayland.windowManager.sway.systemd.variables.default ++ [
"PATH" # for portals
@ -144,7 +142,7 @@ in
### Programs
#
# Terminal
terminal = cfg.terminal;
terminal = terminalCmd;
menu = "${pkgs.dmenu}/bin/dmenu_path | ${pkgs.bemenu}/bin/bemenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
# Startup
startup = [

View file

@ -12,7 +12,7 @@ in
terminal = lib.mkOption {
type = lib.types.str;
description = "The command to the terminal emulator to be used";
default = "${config.programs.kitty.package}/bin/kitty";
default = "${lib.getExe config.linux.graphical.defaults.terminal.package}";
};
enableLaptopBars = lib.mkOption {
@ -181,9 +181,10 @@ in
"network" = {
# interface = wlp2s0 # (Optional) To force the use of this interface
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
format-ethernet = "{ifname} ";
format-disconnected = "Disconnected ";
interval = 7;
on-click = "${cfg.terminal} ${lib.getExe' pkgs.iwd "iwctl"}";
};
"bluetooth" = {
format = " {status}";