[PR #37] [MERGED] Add nix flake #7484

Closed
opened 2026-05-23 02:54:58 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/37
Author: @yavko
Created: 11/23/2022
Status: Merged
Merged: 11/26/2022
Merged by: @JakeStanger

Base: masterHead: nix-flake


📝 Commits (8)

  • df083f3 Add nix flake
  • 6cf5714 Fix readme syntax issue
  • 86e9880 Format nix flake
  • e75eb01 ci(build): add nix flake support
  • ceb81ee ci(build): fix workflow_dispatch casing
  • fc3b676 ci(build): fix nix flake lock update job
  • f2a6309 ci: add nix flake lock update timer job
  • 3eab046 improve example and add cachix info

📊 Changes

5 files changed (+300 additions, -1 deletions)

View changed files

📝 .github/workflows/build.yml (+23 -0)
.github/workflows/update-nix-flake-lock.yml (+27 -0)
📝 README.md (+44 -1)
flake.lock (+64 -0)
flake.nix (+142 -0)

📄 Description

Adds nix flake with Home manager module for configuring, package for installing, and dev shell for development. Basically everything you will probably need to do with nix.

Though I didn't add non-flake support, since most people use flakes, but that can be easily added with https://github.com/edolstra/flake-compat.

And here is usage example (indentation is messed up, forgot to format 💀)
{ config, pkgs, ... }: {
	programs.ironbar = {
		enable = true;
		config = let 
			#workspaces = {
      #  type = "workspaces";
      #  all_monitors = false;
      #  # name_map = {
      #	# 	_1 = "fire";
      #  #     2 = "";
      #  #     3 = "";
      #  #     Games = "";
      #  #     Code = "";
      #  # };
    	#};

    launcher = {
        type = "launcher";
        favorites = ["firefox" "Steam"];
        show_names = false;
        show_icons = true;
        icon_theme = "Papirus";
    };

    mpd_local = { type = "mpd"; music_dir = "/home/jake/Music"; };
    #mpd_server = { type = "mpd" host = "localhost:6600" }

    sys_info = {
        type = "sys-info";
        format = ["{cpu-percent}% " "{memory-percent}% "];
    };

    tray = { type = "tray"; };
    clock = { type = "clock"; };

    #phone_battery = {
    #    type = "script";
    #    path = "/home/jake/bin/phone-battery";
    #};

    left = [ /*workspaces*/ launcher ];
    right = [ mpd_local /*phone_battery*/ sys_info clock tray ];
		in {
			anchor_to_edges = true;
    	position = "top";
    	start = left; end = right;
		};
		style = ''
	* {
    /* `otf-font-awesome` is required to be installed for icons */
    /*font-family: Noto Sans Nerd Font, sans-serif;*/
    font-family: monospace;
    font-size: 16px;

    /*color: white;*/
    /*background-color: #2d2d2d;*/
    /*background-color: red;*/
    border: none;

    /*opacity: 0.4;*/
}

#bar {
    border-top: 1px solid #424242;
}

.container {
    background-color: #2d2d2d;
}

/* test  34543*/

#right > * + * {
    margin-left: 20px;
}

#workspaces .item {
    color: white;
    background-color: #2d2d2d;
    border-radius: 0;
}

#workspaces .item.focused {
    box-shadow: inset 0 -3px;
    background-color: #1c1c1c;
}

#workspaces *:not(.focused):hover {
    box-shadow: inset 0 -3px;
}

#launcher .item {
    border-radius: 0;
    background-color: #2d2d2d;
    margin-right: 4px;
}

#launcher .item:not(.focused):hover {
    background-color: #1c1c1c;
}

#launcher .open {
    border-bottom: 2px solid #6699cc;
}

#launcher .focused {
    color: white;
    background-color: black;
    border-bottom: 4px solid #6699cc;
}

#launcher .urgent {
    color: white;
    background-color: #8f0a0a;
}

#clock {
    color: white;
    background-color: #2d2d2d;
    font-weight: bold;
}

#script {
    color: white;
}

#sysinfo {
    color: white;
}

#tray .item {
    background-color: #2d2d2d;
}

#mpd {
    background-color: #2d2d2d;
    color: white;
}

.popup {
    background-color: #2d2d2d;
    border: 1px solid #424242;
}

#popup-clock {
    padding: 1em;
}

#calendar-clock {
    color: white;
    font-size: 2.5em;
    padding-bottom: 0.1em;
}

#calendar {
    background-color: #2d2d2d;
    color: white;
}

#calendar .header {
    padding-top: 1em;
    border-top: 1px solid #424242;
    font-size: 1.5em;
}

#calendar:selected {
    background-color: #6699cc;
}

#popup-mpd {
    color: white;
    padding: 1em;
}

#popup-mpd #album-art {
    /*border: 1px solid #424242;*/
    margin-right: 1em;
}

#popup-mpd #title .icon, #popup-mpd #title .label {
    font-size: 1.7em;
}

#popup-mpd #controls * {
    border-radius: 0;
    background-color: #2d2d2d;
    color: white;
}

#popup-mpd #controls *:disabled {
    color: #424242;
}

#focused {
    color: white;
}
	'';
	};
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/37 **Author:** [@yavko](https://github.com/yavko) **Created:** 11/23/2022 **Status:** ✅ Merged **Merged:** 11/26/2022 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `nix-flake` --- ### 📝 Commits (8) - [`df083f3`](https://github.com/JakeStanger/ironbar/commit/df083f3adc6e1c2d3d4eba529c475b149b51d630) Add nix flake - [`6cf5714`](https://github.com/JakeStanger/ironbar/commit/6cf571478331ac04de974d4c76f1c4d5ea2c58b4) Fix readme syntax issue - [`86e9880`](https://github.com/JakeStanger/ironbar/commit/86e9880b6c77108f32be2c2a90c7ad5f094c3ca0) Format nix flake - [`e75eb01`](https://github.com/JakeStanger/ironbar/commit/e75eb01b57b749f1332a2593ced0464636b887d9) ci(build): add nix flake support - [`ceb81ee`](https://github.com/JakeStanger/ironbar/commit/ceb81ee5370530d140a65ecc71f9363018c39564) ci(build): fix workflow_dispatch casing - [`fc3b676`](https://github.com/JakeStanger/ironbar/commit/fc3b6769be5cf818d4de51b050371c81c1c23fcd) ci(build): fix nix flake lock update job - [`f2a6309`](https://github.com/JakeStanger/ironbar/commit/f2a63097c9c03bd379911bd2ac9441f53d068749) ci: add nix flake lock update timer job - [`3eab046`](https://github.com/JakeStanger/ironbar/commit/3eab046beb243cda657129d543907b55f42cf00a) improve example and add cachix info ### 📊 Changes **5 files changed** (+300 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+23 -0) ➕ `.github/workflows/update-nix-flake-lock.yml` (+27 -0) 📝 `README.md` (+44 -1) ➕ `flake.lock` (+64 -0) ➕ `flake.nix` (+142 -0) </details> ### 📄 Description Adds nix flake with Home manager module for configuring, package for installing, and dev shell for development. Basically everything you will probably need to do with nix. Though I didn't add non-flake support, since most people use flakes, but that can be easily added with https://github.com/edolstra/flake-compat. <details> <summary>And here is usage example (indentation is messed up, forgot to format 💀)</summary> ```nix { config, pkgs, ... }: { programs.ironbar = { enable = true; config = let #workspaces = { # type = "workspaces"; # all_monitors = false; # # name_map = { # # _1 = "fire"; # # 2 = ""; # # 3 = ""; # # Games = ""; # # Code = ""; # # }; #}; launcher = { type = "launcher"; favorites = ["firefox" "Steam"]; show_names = false; show_icons = true; icon_theme = "Papirus"; }; mpd_local = { type = "mpd"; music_dir = "/home/jake/Music"; }; #mpd_server = { type = "mpd" host = "localhost:6600" } sys_info = { type = "sys-info"; format = ["{cpu-percent}% " "{memory-percent}% "]; }; tray = { type = "tray"; }; clock = { type = "clock"; }; #phone_battery = { # type = "script"; # path = "/home/jake/bin/phone-battery"; #}; left = [ /*workspaces*/ launcher ]; right = [ mpd_local /*phone_battery*/ sys_info clock tray ]; in { anchor_to_edges = true; position = "top"; start = left; end = right; }; style = '' * { /* `otf-font-awesome` is required to be installed for icons */ /*font-family: Noto Sans Nerd Font, sans-serif;*/ font-family: monospace; font-size: 16px; /*color: white;*/ /*background-color: #2d2d2d;*/ /*background-color: red;*/ border: none; /*opacity: 0.4;*/ } #bar { border-top: 1px solid #424242; } .container { background-color: #2d2d2d; } /* test 34543*/ #right > * + * { margin-left: 20px; } #workspaces .item { color: white; background-color: #2d2d2d; border-radius: 0; } #workspaces .item.focused { box-shadow: inset 0 -3px; background-color: #1c1c1c; } #workspaces *:not(.focused):hover { box-shadow: inset 0 -3px; } #launcher .item { border-radius: 0; background-color: #2d2d2d; margin-right: 4px; } #launcher .item:not(.focused):hover { background-color: #1c1c1c; } #launcher .open { border-bottom: 2px solid #6699cc; } #launcher .focused { color: white; background-color: black; border-bottom: 4px solid #6699cc; } #launcher .urgent { color: white; background-color: #8f0a0a; } #clock { color: white; background-color: #2d2d2d; font-weight: bold; } #script { color: white; } #sysinfo { color: white; } #tray .item { background-color: #2d2d2d; } #mpd { background-color: #2d2d2d; color: white; } .popup { background-color: #2d2d2d; border: 1px solid #424242; } #popup-clock { padding: 1em; } #calendar-clock { color: white; font-size: 2.5em; padding-bottom: 0.1em; } #calendar { background-color: #2d2d2d; color: white; } #calendar .header { padding-top: 1em; border-top: 1px solid #424242; font-size: 1.5em; } #calendar:selected { background-color: #6699cc; } #popup-mpd { color: white; padding: 1em; } #popup-mpd #album-art { /*border: 1px solid #424242;*/ margin-right: 1em; } #popup-mpd #title .icon, #popup-mpd #title .label { font-size: 1.7em; } #popup-mpd #controls * { border-radius: 0; background-color: #2d2d2d; color: white; } #popup-mpd #controls *:disabled { color: #424242; } #focused { color: white; } ''; }; } ``` </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-23 02:54:58 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#7484
No description provided.