Skip to content

Commit

Permalink
Fix the failures from the flake update
Browse files Browse the repository at this point in the history
Numerous changes are needed with the updated version of the nixpkgs.

Signed-off-by: Brian McGillion <[email protected]>
  • Loading branch information
brianmcgillion committed Jul 30, 2024
1 parent 22ace6a commit 46d6406
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 71 deletions.
1 change: 0 additions & 1 deletion modules/common/services/audio.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ in {
config = mkIf cfg.enable {
# Enable pipewire service for audioVM with pulseaudio support
security.rtkit.enable = true;
sound.enable = true;
hardware.firmware = [pkgs.sof-firmware];
services.pipewire = {
enable = true;
Expand Down
6 changes: 4 additions & 2 deletions modules/common/services/yubikey.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ in {
};

security.pam.u2f = {
authFile = "${u2f_file}";
settings = {
authFile = "${u2f_file}";
cue = true;
};
control = "sufficient";
cue = true;
};

# Below rule is needed for screen locker (gtklock) to work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
ProtectSystem = "full";
ProtectProc = "noaccess";
# ReadWritePaths=[ "/etc"];
PrivateTmp = true;
# TODO: change back to true when microvm catches up.
PrivateTmp = "yes";

# Not applicable for the service runs as root
# PrivateMounts=true;
Expand Down
2 changes: 1 addition & 1 deletion modules/desktop/graphics/labwc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ in {
[
pkgs.labwc
pkgs.ghaf-openbox-theme
pkgs.gnome.adwaita-icon-theme
pkgs.adwaita-icon-theme

(import ./launchers.nix {inherit pkgs config;})
]
Expand Down
2 changes: 1 addition & 1 deletion modules/microvm/virtualization/microvm/appvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
};

# Host service dependencies
after = optional configHost.sound.enable "pulseaudio.service";
after = ["pulseaudio.service"];
requires = after;
# Sleep appvms to give gui-vm time to start
serviceConfig.ExecStartPre = "/bin/sh -c 'sleep 8'";
Expand Down
1 change: 0 additions & 1 deletion modules/reference/appvms/business.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ in {
imports = [../programs/chromium.nix];
# Enable pulseaudio for Chromium VM
security.rtkit.enable = true;
sound.enable = true;
users.extraUsers.ghaf.extraGroups = ["audio" "video"];

hardware.pulseaudio = {
Expand Down
1 change: 0 additions & 1 deletion modules/reference/appvms/chromium.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ in {
imports = [../programs/chromium.nix];
# Enable pulseaudio for Chromium VM
security.rtkit.enable = true;
sound.enable = true;
users.extraUsers.ghaf.extraGroups = ["audio" "video"];

hardware.pulseaudio = {
Expand Down
1 change: 0 additions & 1 deletion modules/reference/appvms/element.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ in {
{
# Enable pulseaudio for user ghaf to access mic
security.rtkit.enable = true;
sound.enable = true;
users.extraUsers.ghaf.extraGroups = ["audio" "video"];

hardware.pulseaudio = {
Expand Down
13 changes: 5 additions & 8 deletions overlays/custom-packages/element-desktop/element-main.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/src/electron-main.ts b/src/electron-main.ts
index b5d13ac..ffffb76 100644
--- a/src/electron-main.ts
+++ b/src/electron-main.ts
@@ -456,11 +456,10 @@ app.on("ready", async () => {
@@ -458,11 +458,10 @@
// https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do
backgroundColor: "#fff",

Expand All @@ -15,24 +15,23 @@ index b5d13ac..ffffb76 100644
autoHideMenuBar: global.store.get("autoHideMenuBar", true),

x: mainWindowState.x,
@@ -475,67 +474,39 @@ app.on("ready", async () => {
@@ -477,67 +476,35 @@
webgl: true,
},
});
- global.mainWindow.loadURL("vector://vector/webapp/");
- void global.mainWindow.loadURL("vector://vector/webapp/");
-
- if (process.platform === "darwin") {
- setupMacosTitleBar(global.mainWindow);
- }
+

// Handle spellchecker
// For some reason spellCheckerEnabled isn't persisted, so we have to use the store here
global.mainWindow.webContents.session.setSpellCheckerEnabled(global.store.get("spellCheckerEnabled", true));

- // Create trayIcon icon
- if (global.store.get("minimizeToTray", true)) tray.create(global.trayConfig);
-
- global.mainWindow.once("ready-to-show", () => {
+ global.mainWindow.webContents.once('did-finish-load',function(){
if (!global.mainWindow) return;
Expand All @@ -41,8 +40,7 @@ index b5d13ac..ffffb76 100644
if (!argv["hidden"]) {
global.mainWindow.show();
+ global.mainWindow.restore();
++ global.mainWindow.focus();
+
+ global.mainWindow.focus();
} else {
// hide here explicitly because window manage above sometimes shows it
global.mainWindow.hide();
Expand All @@ -55,7 +53,6 @@ index b5d13ac..ffffb76 100644
global.mainWindow.on("closed", () => {
global.mainWindow = null;
});
+
global.mainWindow.on("close", async (e) => {
- // If we are not quitting and have a tray icon then minimize to tray
- if (!global.appQuitting && (tray.hasTray() || process.platform === "darwin")) {
Expand Down
108 changes: 54 additions & 54 deletions overlays/custom-packages/labwc/labwc-colored-borders.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 425746bb724e329e44ef80cec7bf1e57a0388010 Mon Sep 17 00:00:00 2001
From a89bc92a032d6c4fc50d711de92b068a0ed0a636 Mon Sep 17 00:00:00 2001
From: Humaid Alqasimi <[email protected]>
Date: Thu, 2 May 2024 10:02:56 +0400
Subject: [PATCH] Add colored borders
Expand All @@ -19,19 +19,19 @@ Signed-off-by: Humaid Alqasimi <[email protected]>
include/theme.h | 10 ++++++++++
include/window-rules.h | 17 +++++++++++++++++
src/config/rcxml.c | 12 ++++++++++++
src/ssd/ssd-border.c | 21 ++++++++++++++++-----
src/ssd/ssd-part.c | 2 +-
src/ssd/ssd-titlebar.c | 30 ++++++++++++++++++++++++++----
src/ssd/ssd.c | 9 ++++++---
src/ssd/ssd_border.c | 21 ++++++++++++++++-----
src/ssd/ssd_part.c | 2 +-
src/ssd/ssd_titlebar.c | 30 ++++++++++++++++++++++++++----
src/theme.c | 34 ++++++++++++++++++++++++++++++++--
src/window-rules.c | 25 +++++++++++++++++++++++++
10 files changed, 148 insertions(+), 17 deletions(-)

diff --git a/include/ssd-internal.h b/include/ssd-internal.h
index 639d143..7e09dc2 100644
index fda196e..b0e0cac 100644
--- a/include/ssd-internal.h
+++ b/include/ssd-internal.h
@@ -135,8 +135,9 @@ void add_toggled_icon(struct ssd_button *button, struct wl_list *part_list,
@@ -136,8 +136,9 @@ void add_toggled_icon(struct ssd_button *button, struct wl_list *part_list,
struct ssd_part *add_scene_button_corner(
struct wl_list *part_list, enum ssd_part_type type,
enum ssd_part_type corner_type, struct wlr_scene_tree *parent,
Expand All @@ -44,10 +44,10 @@ index 639d143..7e09dc2 100644
/* SSD internal helpers */
struct ssd_part *ssd_get_part(
diff --git a/include/theme.h b/include/theme.h
index 204a978..9296dc2 100644
index 50a69f6..7a0f976 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -158,4 +158,14 @@ void theme_init(struct theme *theme, struct server *server, const char *theme_na
@@ -162,4 +162,14 @@ void theme_init(struct theme *theme, struct server *server, const char *theme_na
*/
void theme_finish(struct theme *theme);

Expand All @@ -63,7 +63,7 @@ index 204a978..9296dc2 100644
+
#endif /* LABWC_THEME_H */
diff --git a/include/window-rules.h b/include/window-rules.h
index 17c5dca..daf2648 100644
index b93bc36..066cc7f 100644
--- a/include/window-rules.h
+++ b/include/window-rules.h
@@ -21,6 +21,7 @@ enum property {
Expand All @@ -74,7 +74,7 @@ index 17c5dca..daf2648 100644
struct window_rule {
char *identifier;
char *title;
@@ -38,11 +39,27 @@ struct window_rule {
@@ -40,11 +41,27 @@ struct window_rule {
enum property fixed_position;

struct wl_list link; /* struct rcxml.window_rules */
Expand Down Expand Up @@ -103,7 +103,7 @@ index 17c5dca..daf2648 100644
+
#endif /* LABWC_WINDOW_RULES_H */
diff --git a/src/config/rcxml.c b/src/config/rcxml.c
index 1e268f4..632e35a 100644
index 84c117b..daab831 100644
--- a/src/config/rcxml.c
+++ b/src/config/rcxml.c
@@ -35,6 +35,7 @@
Expand Down Expand Up @@ -131,7 +131,7 @@ index 1e268f4..632e35a 100644
} else if (!strcmp(nodename, "title")) {
free(current_window_rule->title);
current_window_rule->title = xstrdup(content);
@@ -214,6 +218,14 @@ fill_window_rule(char *nodename, char *content)
@@ -220,6 +224,14 @@ fill_window_rule(char *nodename, char *content)
} else if (!strcasecmp(nodename, "fixedPosition")) {
set_property(content, &current_window_rule->fixed_position);

Expand All @@ -146,30 +146,10 @@ index 1e268f4..632e35a 100644
/* Actions */
} else if (!strcmp(nodename, "name.action")) {
current_window_rule_action = action_create(content);
diff --git a/src/ssd/ssd.c b/src/ssd/ssd.c
index 9c96ef7..c770cd5 100644
--- a/src/ssd/ssd.c
+++ b/src/ssd/ssd.c
@@ -382,9 +382,12 @@ ssd_enable_keybind_inhibit_indicator(struct ssd *ssd, bool enable)
return;
}

- float *color = enable
- ? rc.theme->window_toggled_keybinds_color
- : rc.theme->window_active_border_color;
+ float customColor[4];
+ bool isCustomColorAvailable = window_rules_get_custom_border_color(ssd->view, customColor);
+
+ float *color = isCustomColorAvailable ? customColor :
+ (enable ? rc.theme->window_toggled_keybinds_color
+ : rc.theme->window_active_border_color);

struct ssd_part *part = ssd_get_part(&ssd->border.active.parts, LAB_SSD_PART_TOP);
struct wlr_scene_rect *rect = wlr_scene_rect_from_node(part->node);
diff --git a/src/ssd/ssd_border.c b/src/ssd/ssd_border.c
index 74f29ff..bf62df8 100644
--- a/src/ssd/ssd_border.c
+++ b/src/ssd/ssd_border.c
diff --git a/src/ssd/ssd-border.c b/src/ssd/ssd-border.c
index 06ce55c..6e2fc06 100644
--- a/src/ssd/ssd-border.c
+++ b/src/ssd/ssd-border.c
@@ -6,6 +6,7 @@
#include "ssd-internal.h"
#include "theme.h"
Expand Down Expand Up @@ -206,10 +186,10 @@ index 74f29ff..bf62df8 100644
wl_list_init(&subtree->parts);
add_scene_rect(&subtree->parts, LAB_SSD_PART_LEFT, parent,
theme->border_width, height, 0, 0, color);
diff --git a/src/ssd/ssd_part.c b/src/ssd/ssd_part.c
diff --git a/src/ssd/ssd-part.c b/src/ssd/ssd-part.c
index 3933cd1..8889c9e 100644
--- a/src/ssd/ssd_part.c
+++ b/src/ssd/ssd_part.c
--- a/src/ssd/ssd-part.c
+++ b/src/ssd/ssd-part.c
@@ -80,7 +80,7 @@ add_scene_buffer(struct wl_list *list, enum ssd_part_type type,

struct ssd_part *
Expand All @@ -219,10 +199,10 @@ index 3933cd1..8889c9e 100644
struct wlr_buffer *corner_buffer, struct wlr_buffer *icon_buffer,
struct wlr_buffer *hover_buffer, int x, struct view *view)
{
diff --git a/src/ssd/ssd_titlebar.c b/src/ssd/ssd_titlebar.c
index cde7bb7..d063989 100644
--- a/src/ssd/ssd_titlebar.c
+++ b/src/ssd/ssd_titlebar.c
diff --git a/src/ssd/ssd-titlebar.c b/src/ssd/ssd-titlebar.c
index 32d6131..d183e52 100644
--- a/src/ssd/ssd-titlebar.c
+++ b/src/ssd/ssd-titlebar.c
@@ -26,6 +26,15 @@ ssd_titlebar_create(struct ssd *ssd)
{
struct view *view = ssd->view;
Expand Down Expand Up @@ -273,7 +253,7 @@ index cde7bb7..d063989 100644
width - SSD_BUTTON_WIDTH * 1, view);
} FOR_EACH_END

@@ -144,10 +155,13 @@ set_squared_corners(struct ssd *ssd, bool enable)
@@ -149,10 +160,13 @@ set_squared_corners(struct ssd *ssd, bool enable)

/* Toggle background between invisible and titlebar background color */
struct wlr_scene_rect *rect = wlr_scene_rect_from_node(button->background);
Expand All @@ -289,7 +269,7 @@ index cde7bb7..d063989 100644

/* Toggle rounded corner image itself */
struct wlr_scene_node *rounded_corner =
@@ -336,6 +350,14 @@ ssd_update_title(struct ssd *ssd)
@@ -348,6 +362,14 @@ ssd_update_title(struct ssd *ssd)
}

struct theme *theme = view->server->theme;
Expand All @@ -304,11 +284,31 @@ index cde7bb7..d063989 100644
struct ssd_state_title *state = &ssd->state.title;
bool title_unchanged = state->text && !strcmp(title, state->text);

diff --git a/src/ssd/ssd.c b/src/ssd/ssd.c
index 70b1b0d..9dcc797 100644
--- a/src/ssd/ssd.c
+++ b/src/ssd/ssd.c
@@ -411,9 +411,12 @@ ssd_enable_keybind_inhibit_indicator(struct ssd *ssd, bool enable)
return;
}

- float *color = enable
- ? rc.theme->window_toggled_keybinds_color
- : rc.theme->window_active_border_color;
+ float customColor[4];
+ bool isCustomColorAvailable = window_rules_get_custom_border_color(ssd->view, customColor);
+
+ float *color = isCustomColorAvailable ? customColor :
+ (enable ? rc.theme->window_toggled_keybinds_color
+ : rc.theme->window_active_border_color);

struct ssd_part *part = ssd_get_part(&ssd->border.active.parts, LAB_SSD_PART_TOP);
struct wlr_scene_rect *rect = wlr_scene_rect_from_node(part->node);
diff --git a/src/theme.c b/src/theme.c
index 2b10191..19201b6 100644
index 248a352..6f47bba 100644
--- a/src/theme.c
+++ b/src/theme.c
@@ -399,7 +399,7 @@ hex_to_dec(char c)
@@ -401,7 +401,7 @@ hex_to_dec(char c)
* @hex: hex string to be parsed
* @rgba: pointer to float[4] for return value
*/
Expand All @@ -317,7 +317,7 @@ index 2b10191..19201b6 100644
parse_hexstr(const char *hex, float *rgba)
{
if (!hex || hex[0] != '#' || strlen(hex) < 7) {
@@ -468,7 +468,7 @@ parse_justification(const char *str)
@@ -470,7 +470,7 @@ parse_justification(const char *str)
static void
theme_builtin(struct theme *theme, struct server *server)
{
Expand All @@ -326,7 +326,7 @@ index 2b10191..19201b6 100644
theme->padding_height = 3;
theme->title_height = INT_MIN;
theme->menu_overlap_x = 0;
@@ -1398,3 +1398,33 @@ theme_finish(struct theme *theme)
@@ -1433,3 +1433,33 @@ theme_finish(struct theme *theme)
zdrop(&theme->shadow_corner_bottom_inactive);
zdrop(&theme->shadow_edge_inactive);
}
Expand Down Expand Up @@ -361,11 +361,11 @@ index 2b10191..19201b6 100644
+ load_buttons(theme);
+}
diff --git a/src/window-rules.c b/src/window-rules.c
index b6b2999..2ad3303 100644
index f543f7e..5ea5d53 100644
--- a/src/window-rules.c
+++ b/src/window-rules.c
@@ -60,6 +60,14 @@ view_matches_criteria(struct window_rule *rule, struct view *view)
return matches_criteria(rule, view);
@@ -43,6 +43,14 @@ view_matches_criteria(struct window_rule *rule, struct view *view)
return view_matches_query(view, &query);
}

+void
Expand All @@ -379,7 +379,7 @@ index b6b2999..2ad3303 100644
void
window_rules_apply(struct view *view, enum window_rule_event event)
{
@@ -126,3 +134,20 @@ window_rules_get_property(struct view *view, const char *property)
@@ -109,3 +117,20 @@ window_rules_get_property(struct view *view, const char *property)
}
return LAB_PROP_UNSPECIFIED;
}
Expand All @@ -401,5 +401,5 @@ index b6b2999..2ad3303 100644
+ return false;
+}
--
2.44.0
2.44.1

0 comments on commit 46d6406

Please sign in to comment.