From 3be05ce0bdc6f106a6c322786f95b2c999e22e13 Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Sun, 11 May 2025 04:42:23 +0500 Subject: [PATCH 01/12] stylix: add nukdokplex to maintainers --- stylix/maintainers.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stylix/maintainers.nix b/stylix/maintainers.nix index 918e6896fe..30ba48d208 100644 --- a/stylix/maintainers.nix +++ b/stylix/maintainers.nix @@ -28,6 +28,15 @@ { fingerprint = "36BC 916D DD4E B1EE EE82 4BBF DC95 900F 6DA7 9992"; } ]; }; + nukdokplex = { + email = "nukdokplex@nukdokplex.ru"; + name = "Viktor Titov"; + github = "nukdokplex"; + githubId = 25458915; + keys = [ + { fingerprint = "3C97 1C61 0E9E BE35 3259 C1D3 2CA7 0354 EA17 07B9"; } + ]; + }; repparw = { email = "ubritos@gmail.com"; name = "Ulises Britos"; From 4e83c4958d6d4b34c4e447496510b7462fc3c745 Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Sun, 11 May 2025 04:42:41 +0500 Subject: [PATCH 02/12] wayprompt: init --- modules/wayprompt/hm.nix | 33 +++++++++++++++++++++++++++++++++ modules/wayprompt/meta.nix | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 modules/wayprompt/hm.nix create mode 100644 modules/wayprompt/meta.nix diff --git a/modules/wayprompt/hm.nix b/modules/wayprompt/hm.nix new file mode 100644 index 0000000000..b10aabd715 --- /dev/null +++ b/modules/wayprompt/hm.nix @@ -0,0 +1,33 @@ +{ config, lib, ... }: +let + c = color: "0x${color}"; + cfg = config.stylix.targets.wayprompt; +in +{ + options.stylix.targets.wayprompt.enable = config.lib.stylix.mkEnableTarget "wayprompt" true; + + config = lib.mkIf (config.stylix.enable && cfg.enable) { + programs.wayprompt.settings.colours = with config.lib.stylix.colors; { + background = c base00; + border = c base0D; + text = c base05; + error-text = c base08; + + pin-background = c base01; + pin-border = c base05; + pin-square = c base05; + + ok-button = c base0B; # green + ok-button-border = c base05; + ok-button-text = c base00; + + not-ok-button = c base0A; # yellow + not-ok-button-border = c base05; + not-ok-button-text = c base00; + + cancel-button = c base08; # red + cancel-button-border = c base05; + cancel-button-text = c base00; + }; + }; +} diff --git a/modules/wayprompt/meta.nix b/modules/wayprompt/meta.nix new file mode 100644 index 0000000000..b7ae72cd82 --- /dev/null +++ b/modules/wayprompt/meta.nix @@ -0,0 +1,5 @@ +{ lib, ... }: +{ + maintainers = [ lib.maintainers.nukdokplex ]; + name = "wayprompt"; +} From 69f3e519fd040271e9ab168400bb640ddef180a1 Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Sun, 11 May 2025 04:56:30 +0500 Subject: [PATCH 03/12] wayprompt: fix formatting --- modules/wayprompt/hm.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/wayprompt/hm.nix b/modules/wayprompt/hm.nix index b10aabd715..324dfbd528 100644 --- a/modules/wayprompt/hm.nix +++ b/modules/wayprompt/hm.nix @@ -4,7 +4,8 @@ let cfg = config.stylix.targets.wayprompt; in { - options.stylix.targets.wayprompt.enable = config.lib.stylix.mkEnableTarget "wayprompt" true; + options.stylix.targets.wayprompt.enable = + config.lib.stylix.mkEnableTarget "wayprompt" true; config = lib.mkIf (config.stylix.enable && cfg.enable) { programs.wayprompt.settings.colours = with config.lib.stylix.colors; { From 2b158843de6244d10b781cfb8364544517172331 Mon Sep 17 00:00:00 2001 From: NukDokPlex Date: Sun, 11 May 2025 04:59:26 +0500 Subject: [PATCH 04/12] wayprompt: fix meta formatting Co-authored-by: awwpotato --- modules/wayprompt/meta.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wayprompt/meta.nix b/modules/wayprompt/meta.nix index b7ae72cd82..b6363f7c85 100644 --- a/modules/wayprompt/meta.nix +++ b/modules/wayprompt/meta.nix @@ -1,5 +1,5 @@ { lib, ... }: { - maintainers = [ lib.maintainers.nukdokplex ]; name = "wayprompt"; + maintainers = [ lib.maintainers.nukdokplex ]; } From acf6969dfe6aab41638facdb3a2616eaf79e646a Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Sun, 11 May 2025 05:11:10 +0500 Subject: [PATCH 05/12] wayprompt: more elegant color concat, use mnemonic colors on buttons --- modules/wayprompt/hm.nix | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/modules/wayprompt/hm.nix b/modules/wayprompt/hm.nix index 324dfbd528..eb9589f09a 100644 --- a/modules/wayprompt/hm.nix +++ b/modules/wayprompt/hm.nix @@ -1,6 +1,5 @@ { config, lib, ... }: let - c = color: "0x${color}"; cfg = config.stylix.targets.wayprompt; in { @@ -8,27 +7,29 @@ in config.lib.stylix.mkEnableTarget "wayprompt" true; config = lib.mkIf (config.stylix.enable && cfg.enable) { - programs.wayprompt.settings.colours = with config.lib.stylix.colors; { - background = c base00; - border = c base0D; - text = c base05; - error-text = c base08; + programs.wayprompt.settings.colours = + with config.lib.stylix.colors; + lib.mapAttrs (_: color: "0x${color}") { + background = base00; + border = base0D; + text = base05; + error-text = base08; - pin-background = c base01; - pin-border = c base05; - pin-square = c base05; + pin-background = base01; + pin-border = base05; + pin-square = base05; - ok-button = c base0B; # green - ok-button-border = c base05; - ok-button-text = c base00; + ok-button = green; + ok-button-border = base05; + ok-button-text = base00; - not-ok-button = c base0A; # yellow - not-ok-button-border = c base05; - not-ok-button-text = c base00; + not-ok-button = yellow; + not-ok-button-border = base05; + not-ok-button-text = base00; - cancel-button = c base08; # red - cancel-button-border = c base05; - cancel-button-text = c base00; - }; + cancel-button = red; + cancel-button-border = base05; + cancel-button-text = base00; + }; }; } From 7e98efd10f987bbcb6b42df51aac510df627b678 Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Sun, 11 May 2025 05:21:17 +0500 Subject: [PATCH 06/12] stylix: update home-manager input --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 9fe6f13e57..c71397eded 100644 --- a/flake.lock +++ b/flake.lock @@ -224,11 +224,11 @@ ] }, "locked": { - "lastModified": 1746369725, - "narHash": "sha256-m3ai7LLFYsymMK0uVywCceWfUhP0k3CALyFOfcJACqE=", + "lastModified": 1746912617, + "narHash": "sha256-SSw/98B3Htw7iJWCyq08fAEL5w+a/Vj+YbQq0msVFTA=", "owner": "nix-community", "repo": "home-manager", - "rev": "1a1793f6d940d22c6e49753548c5b6cb7dc5545d", + "rev": "9ef92f1c6b77944198fd368ec805ced842352a1d", "type": "github" }, "original": { From c45e0e430d833e641de30150f9ecd74f5fbfa8d5 Mon Sep 17 00:00:00 2001 From: NukDokPlex Date: Sun, 11 May 2025 05:23:00 +0500 Subject: [PATCH 07/12] wayprompt: add wayprompt homepage attribute to meta Co-authored-by: awwpotato --- modules/wayprompt/meta.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/wayprompt/meta.nix b/modules/wayprompt/meta.nix index b6363f7c85..cadf63c158 100644 --- a/modules/wayprompt/meta.nix +++ b/modules/wayprompt/meta.nix @@ -1,5 +1,6 @@ { lib, ... }: { name = "wayprompt"; + homepage = "https://git.sr.ht/~leon_plickat/wayprompt"; maintainers = [ lib.maintainers.nukdokplex ]; } From 26dc04886421e01a0cf82857d3a43df2c38ac7dc Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Sun, 11 May 2025 06:54:23 +0500 Subject: [PATCH 08/12] wayprompt: added default testbed --- modules/wayprompt/testbeds/default.nix | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 modules/wayprompt/testbeds/default.nix diff --git a/modules/wayprompt/testbeds/default.nix b/modules/wayprompt/testbeds/default.nix new file mode 100644 index 0000000000..5f704be09d --- /dev/null +++ b/modules/wayprompt/testbeds/default.nix @@ -0,0 +1,35 @@ +{ + lib, + pkgs, + config, + ... +}: +let + pkg = pkgs.wayprompt; + waypromptCmd = "'${lib.getExe' pkg "wayprompt"}' --title \"Stylix test\" --description \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\" --prompt \"Enter your password\" --button-ok \"OK\" --button-not-ok \"Not OK\" --button-cancel \"Cancel\" --get-pin"; +in +{ + programs.sway.enable = true; + + services.greetd = { + enable = true; + settings.default_session = { + command = lib.escapeShellArg (lib.getExe config.programs.sway.package); + user = "guest"; + }; + }; + + home-manager.sharedModules = lib.singleton { + programs.wayprompt = { + enable = true; + package = pkg; + }; + + wayland.windowManager.sway = { + enable = true; + config.startup = [ + { command = waypromptCmd; } + ]; + }; + }; +} From db2f0c929c645c4f65b77b209d2953d5af17a0ba Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Sun, 11 May 2025 18:52:30 +0500 Subject: [PATCH 09/12] wayprompt: remove redundant command variable and prettify wayprompt command in default testbed --- modules/wayprompt/testbeds/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/wayprompt/testbeds/default.nix b/modules/wayprompt/testbeds/default.nix index 5f704be09d..d03108d044 100644 --- a/modules/wayprompt/testbeds/default.nix +++ b/modules/wayprompt/testbeds/default.nix @@ -6,7 +6,6 @@ }: let pkg = pkgs.wayprompt; - waypromptCmd = "'${lib.getExe' pkg "wayprompt"}' --title \"Stylix test\" --description \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\" --prompt \"Enter your password\" --button-ok \"OK\" --button-not-ok \"Not OK\" --button-cancel \"Cancel\" --get-pin"; in { programs.sway.enable = true; @@ -28,7 +27,17 @@ in wayland.windowManager.sway = { enable = true; config.startup = [ - { command = waypromptCmd; } + { + command = '' + '${lib.getExe' pkg "wayprompt"}' \ + --title "Stylix test" \ + --description "Lorem ipsum dolor sit amet, consectetur adipiscing elit." \ + --prompt "Enter your password" \ + --button-ok "OK" \ + --button-not-ok "Not OK" \ + --button-cancel "Cancel" \ + --get-pin''; + } ]; }; }; From a3b0ec11dd9e01696f74ba13958251d3b0f3006b Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Mon, 12 May 2025 03:38:58 +0500 Subject: [PATCH 10/12] wayprompt: color buttons' borders same as bg --- modules/wayprompt/hm.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/wayprompt/hm.nix b/modules/wayprompt/hm.nix index eb9589f09a..04e48d39a2 100644 --- a/modules/wayprompt/hm.nix +++ b/modules/wayprompt/hm.nix @@ -3,8 +3,7 @@ let cfg = config.stylix.targets.wayprompt; in { - options.stylix.targets.wayprompt.enable = - config.lib.stylix.mkEnableTarget "wayprompt" true; + options.stylix.targets.wayprompt.enable = config.lib.stylix.mkEnableTarget "wayprompt" true; config = lib.mkIf (config.stylix.enable && cfg.enable) { programs.wayprompt.settings.colours = @@ -20,15 +19,15 @@ in pin-square = base05; ok-button = green; - ok-button-border = base05; + ok-button-border = green; ok-button-text = base00; not-ok-button = yellow; - not-ok-button-border = base05; + not-ok-button-border = yellow; not-ok-button-text = base00; cancel-button = red; - cancel-button-border = base05; + cancel-button-border = red; cancel-button-text = base00; }; }; From e23acaad584807833aacd56cf57792a0763dbdf6 Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Mon, 12 May 2025 03:41:36 +0500 Subject: [PATCH 11/12] wayprompt: remove default testbed because wayprompt doesn't work on gnome (wait for #1222 resolved) --- modules/wayprompt/testbeds/default.nix | 44 -------------------------- 1 file changed, 44 deletions(-) delete mode 100644 modules/wayprompt/testbeds/default.nix diff --git a/modules/wayprompt/testbeds/default.nix b/modules/wayprompt/testbeds/default.nix deleted file mode 100644 index d03108d044..0000000000 --- a/modules/wayprompt/testbeds/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -let - pkg = pkgs.wayprompt; -in -{ - programs.sway.enable = true; - - services.greetd = { - enable = true; - settings.default_session = { - command = lib.escapeShellArg (lib.getExe config.programs.sway.package); - user = "guest"; - }; - }; - - home-manager.sharedModules = lib.singleton { - programs.wayprompt = { - enable = true; - package = pkg; - }; - - wayland.windowManager.sway = { - enable = true; - config.startup = [ - { - command = '' - '${lib.getExe' pkg "wayprompt"}' \ - --title "Stylix test" \ - --description "Lorem ipsum dolor sit amet, consectetur adipiscing elit." \ - --prompt "Enter your password" \ - --button-ok "OK" \ - --button-not-ok "Not OK" \ - --button-cancel "Cancel" \ - --get-pin''; - } - ]; - }; - }; -} From 8553ef754b90287190c6a2a76bff9c96af6f05ad Mon Sep 17 00:00:00 2001 From: nukdokplex Date: Mon, 12 May 2025 03:49:36 +0500 Subject: [PATCH 12/12] wayprompt: fix formatting --- modules/wayprompt/hm.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/wayprompt/hm.nix b/modules/wayprompt/hm.nix index 04e48d39a2..15ed39eceb 100644 --- a/modules/wayprompt/hm.nix +++ b/modules/wayprompt/hm.nix @@ -3,7 +3,8 @@ let cfg = config.stylix.targets.wayprompt; in { - options.stylix.targets.wayprompt.enable = config.lib.stylix.mkEnableTarget "wayprompt" true; + options.stylix.targets.wayprompt.enable = + config.lib.stylix.mkEnableTarget "wayprompt" true; config = lib.mkIf (config.stylix.enable && cfg.enable) { programs.wayprompt.settings.colours =