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

24
flake.lock generated
View file

@ -721,11 +721,11 @@
]
},
"locked": {
"lastModified": 1739571712,
"narHash": "sha256-0UdSDV/TBY+GuxXLbrLq3l2Fq02ciyKCIMy4qmnfJXQ=",
"lastModified": 1741128660,
"narHash": "sha256-GWaZ+KGxWYbOB15CSqktwngq0ccA1l2Ov3aUfl9jeY4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6d3163aea47fdb1fe19744e91306a2ea4f602292",
"rev": "b1b964ea9348aef08cab514fa88e9c99def6fd63",
"type": "github"
},
"original": {
@ -1073,11 +1073,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1739451785,
"narHash": "sha256-3ebRdThRic9bHMuNi2IAA/ek9b32bsy8F5R4SvGTIog=",
"lastModified": 1741037377,
"narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1128e89fd5e11bb25aedbfc287733c6502202ea9",
"rev": "02032da4af073d0f6110540c8677f16d4be0117f",
"type": "github"
},
"original": {
@ -1137,11 +1137,11 @@
},
"nixpkgs_13": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"lastModified": 1740560979,
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"rev": "5135c59491985879812717f4c9fea69604e7f26f",
"type": "github"
},
"original": {
@ -1694,11 +1694,11 @@
"nixpkgs": "nixpkgs_13"
},
"locked": {
"lastModified": 1738469108,
"narHash": "sha256-AS4akOUGZP2ELHQKj1IiXuuzU9bpK20ks4dGaCrwOEk=",
"lastModified": 1740729275,
"narHash": "sha256-/0dJi65+7oBpfEYWrg4jihkEzAf975TVeOk+FpxaW6o=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "f95fa7b1560b0f2ed8989e6f12f2c7e7e7ee9433",
"rev": "17bd241d6a5692848b01737f595824a707de855a",
"type": "github"
},
"original": {

View file

@ -38,10 +38,6 @@
# ---
# Imported apps
youmubot.url = "github:natsukagami/youmubot";
# swayfx = {
# url = github:WillPower3309/swayfx;
# inputs.nixpkgs.follows = "nixpkgs";
# };
mpd-mpris = {
url = "github:natsukagami/mpd-mpris";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -40,9 +40,11 @@
linux.graphical.defaults.webBrowser.package = pkgs.zen-browser-bin;
linux.graphical.defaults.webBrowser.desktopFile = "zen.desktop";
programs.my-niri.enable = true;
programs.my-niri.enableLaptop = false;
programs.my-sway.enable = true;
programs.my-sway.fontSize = 15.0;
programs.my-sway.enableLaptop = true;
programs.my-sway.enableLaptop = false;
programs.my-waybar.fontSize = 15.0;
programs.my-waybar.enableMpd = true;
# Keyboard options
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";

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}";

View file

@ -11,7 +11,7 @@ let
typst-lsp = final.unstable.typst-lsp;
};
overlay-imported = final: prev: {
sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
# sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
deploy-rs = inputs.deploy-rs.packages.default;
dtth-phanpy = inputs.dtth-phanpy.packages.${final.system}.default;
matrix-conduit = inputs.conduit.packages.${final.system}.default;
@ -58,15 +58,6 @@ let
];
});
swayfx-unwrapped = prev.swayfx-unwrapped.overrideAttrs (attrs: {
patches = (attrs.patches or [ ]) ++ [
(final.fetchurl {
url = "https://patch-diff.githubusercontent.com/raw/WillPower3309/swayfx/pull/315.patch";
hash = "sha256-zamOLHUjlzRs8PytPTAzEsdzgVtK+HVziHgrhwPcB+E=";
})
];
});
librewolf = (prev.librewolf.override {
nativeMessagingHosts = with final; [ kdePackages.plasma-browser-integration ];
});
@ -131,8 +122,6 @@ let
};
in
[
# inputs.swayfx.inputs.scenefx.overlays.override
# inputs.swayfx.overlays.override
inputs.mpd-mpris.overlays.default
inputs.rust-overlay.overlays.default
inputs.youmubot.overlays.default