···11-{
22- lib,
33- pkgs,
44- config,
55- ...
66-}:
77-88-let
99- cfg = config.programs.yabar;
1010-1111- mapExtra =
1212- v:
1313- lib.concatStringsSep "\n" (
1414- lib.mapAttrsToList (
1515- key: val:
1616- "${key} = ${if (builtins.isString val) then "\"${val}\"" else "${builtins.toString val}"};"
1717- ) v
1818- );
1919-2020- listKeys = r: builtins.concatStringsSep "," (builtins.map (n: "\"${n}\"") (builtins.attrNames r));
2121-2222- configFile =
2323- let
2424- bars = lib.mapAttrsToList (name: cfg: ''
2525- ${name}: {
2626- font: "${cfg.font}";
2727- position: "${cfg.position}";
2828-2929- ${mapExtra cfg.extra}
3030-3131- block-list: [${listKeys cfg.indicators}]
3232-3333- ${builtins.concatStringsSep "\n" (
3434- lib.mapAttrsToList (name: cfg: ''
3535- ${name}: {
3636- exec: "${cfg.exec}";
3737- align: "${cfg.align}";
3838- ${mapExtra cfg.extra}
3939- };
4040- '') cfg.indicators
4141- )}
4242- };
4343- '') cfg.bars;
4444- in
4545- pkgs.writeText "yabar.conf" ''
4646- bar-list = [${listKeys cfg.bars}];
4747- ${builtins.concatStringsSep "\n" bars}
4848- '';
4949-in
5050-{
5151- options.programs.yabar = {
5252- enable = lib.mkEnableOption "yabar, a status bar for X window managers";
5353-5454- package = lib.mkOption {
5555- default = pkgs.yabar-unstable;
5656- defaultText = lib.literalExpression "pkgs.yabar-unstable";
5757- example = lib.literalExpression "pkgs.yabar";
5858- type = lib.types.package;
5959-6060- # `yabar-stable` segfaults under certain conditions.
6161- # remember to update yabar.passthru.tests if nixos switches back to it!
6262- apply =
6363- x:
6464- if x == pkgs.yabar-unstable then
6565- x
6666- else
6767- lib.flip lib.warn x ''
6868- It's not recommended to use `yabar' with `programs.yabar', the (old) stable release
6969- tends to segfault under certain circumstances:
7070-7171- * https://github.com/geommer/yabar/issues/86
7272- * https://github.com/geommer/yabar/issues/68
7373- * https://github.com/geommer/yabar/issues/143
7474-7575- Most of them don't occur on master anymore, until a new release is published, it's recommended
7676- to use `yabar-unstable'.
7777- '';
7878-7979- description = ''
8080- The package which contains the `yabar` binary.
8181-8282- Nixpkgs offers both a stable (`yabar`) and unstable (`yabar-unstable`) version of Yabar.
8383- '';
8484- };
8585-8686- bars = lib.mkOption {
8787- default = { };
8888- type = lib.types.attrsOf (
8989- lib.types.submodule {
9090- options = {
9191- font = lib.mkOption {
9292- default = "sans bold 9";
9393- example = "Droid Sans, FontAwesome Bold 9";
9494- type = lib.types.str;
9595-9696- description = ''
9797- The font that will be used to draw the status bar.
9898- '';
9999- };
100100-101101- position = lib.mkOption {
102102- default = "top";
103103- example = "bottom";
104104- type = lib.types.enum [
105105- "top"
106106- "bottom"
107107- ];
108108-109109- description = ''
110110- The position where the bar will be rendered.
111111- '';
112112- };
113113-114114- extra = lib.mkOption {
115115- default = { };
116116- type = lib.types.attrsOf lib.types.str;
117117-118118- description = ''
119119- An attribute set which contains further attributes of a bar.
120120- '';
121121- };
122122-123123- indicators = lib.mkOption {
124124- default = { };
125125- type = lib.types.attrsOf (
126126- lib.types.submodule {
127127- options.exec = lib.mkOption {
128128- example = "YABAR_DATE";
129129- type = lib.types.str;
130130- description = ''
131131- The type of the indicator to be executed.
132132- '';
133133- };
134134-135135- options.align = lib.mkOption {
136136- default = "left";
137137- example = "right";
138138- type = lib.types.enum [
139139- "left"
140140- "center"
141141- "right"
142142- ];
143143-144144- description = ''
145145- Whether to align the indicator at the left or right of the bar.
146146- '';
147147- };
148148-149149- options.extra = lib.mkOption {
150150- default = { };
151151- type = lib.types.attrsOf (lib.types.either lib.types.str lib.types.int);
152152-153153- description = ''
154154- An attribute set which contains further attributes of a indicator.
155155- '';
156156- };
157157- }
158158- );
159159-160160- description = ''
161161- Indicators that should be rendered by yabar.
162162- '';
163163- };
164164- };
165165- }
166166- );
167167-168168- description = ''
169169- List of bars that should be rendered by yabar.
170170- '';
171171- };
172172- };
173173-174174- config = lib.mkIf cfg.enable {
175175- systemd.user.services.yabar = {
176176- description = "yabar service";
177177- wantedBy = [ "graphical-session.target" ];
178178- partOf = [ "graphical-session.target" ];
179179-180180- script = ''
181181- ${cfg.package}/bin/yabar -c ${configFile}
182182- '';
183183-184184- serviceConfig.Restart = "always";
185185- };
186186- };
187187-}
+3
nixos/modules/rename.nix
···7575 "way-cooler is abandoned by its author: "
7676 + "https://way-cooler.org/blog/2020/01/09/way-cooler-post-mortem.html"
7777 ))
7878+ (mkRemovedOptionModule [ "programs" "yabar" ]
7979+ "programs.yabar has been removed from NixOS. This is because the yabar repository has been archived upstream."
8080+ )
7881 (mkRemovedOptionModule [ "security" "hideProcessInformation" ] ''
7982 The hidepid module was removed, since the underlying machinery
8083 is broken when using cgroups-v2.
···21212121 yandex-browser-beta = throw "'yandex-browser-beta' has been removed, as it was broken and unmaintained"; # Added 2025-04-17
21222122 yandex-browser-corporate = throw "'yandex-browser-corporate' has been removed, as it was broken and unmaintained"; # Added 2025-04-17
21232123 youtrack_2022_3 = throw "'youtrack_2022_3' has been removed as it was deprecated. Please update to the 'youtrack' package."; # Added 2024-10-17
21242124+ yabar = throw "'yabar' has been removed as the upstream project was archived"; # Added 2025-06-10
21252125+ yabar-unstable = yabar; # Added 2025-06-10
21242126 yrd = throw "'yrd' has been removed, as it was broken and unmaintained"; # added 2024-05-27
21252127 yubikey-manager-qt = throw "'yubikey-manager-qt' has been removed due to being archived upstream. Consider using 'yubioath-flutter' instead."; # Added 2025-06-07
21262128 yubikey-personalization-gui = throw "'yubikey-personalization-gui' has been removed due to being archived upstream. Consider using 'yubioath-flutter' instead."; # Added 2025-06-07