Compare commits

...

4 Commits

Author SHA1 Message Date
Robert Helgesson
4e8b7bef66 ghostty: prevent service restarts
Stopping or restarting the service will destroy open Ghostty sessions,
potentially disrupting work. This change ensures that we leave the
existing service untouched.

Fixes #8485
2026-01-06 23:26:04 +01:00
Benedikt Rips
6e94d8157c keepassxc: point to the default upstream branch 2026-01-06 22:08:42 +01:00
Benedikt Rips
6e3931c01f keepassxc: add note about error message in the GUI 2026-01-06 22:08:42 +01:00
N4CH723HR3R
c91dbdf61a hyprland: dont recompile when disabling xwayland
xwayland can be disabled in the settings without recompiling hyprland
2026-01-06 22:07:12 +01:00
6 changed files with 62 additions and 12 deletions

View File

@@ -224,8 +224,15 @@ in
message = "Ghostty systemd integration cannot be enabled for non-linux platforms"; message = "Ghostty systemd integration cannot be enabled for non-linux platforms";
} }
]; ];
xdg.configFile."systemd/user/app-com.mitchellh.ghostty.service".source = xdg.configFile."systemd/user/app-com.mitchellh.ghostty.service".source =
"${cfg.package}/share/systemd/user/app-com.mitchellh.ghostty.service"; "${cfg.package}/share/systemd/user/app-com.mitchellh.ghostty.service";
xdg.configFile."systemd/user/app-com.mitchellh.ghostty.service.d/overrides.conf".text = ''
[Unit]
X-SwitchMethod=keep-old
'';
dbus.packages = [ cfg.package ]; dbus.packages = [ cfg.package ];
}) })

View File

@@ -62,8 +62,15 @@ in
Configuration written to Configuration written to
{file}`$XDG_CONFIG_HOME/keepassxc/keepassxc.ini`. {file}`$XDG_CONFIG_HOME/keepassxc/keepassxc.ini`.
See <https://github.com/keepassxreboot/keepassxc/blob/647272e9c5542297d3fcf6502e6173c96f12a9a0/src/core/Config.cpp#L49-L223> See <https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Config.cpp>
for the full list of options. for the full list of options.
::: {.note}
When the settings are non-empty, the configuration file will be linked
into the Nix store and KeePassXC will report an access error for its
configuration file. This is expected and can not be fixed in a way that
aligns with Home Manager's principles. See [#8257](https://github.com/nix-community/home-manager/issues/8257) for more details.
:::
''; '';
}; };

View File

@@ -48,6 +48,11 @@ in
[ "wayland" "windowManager" "hyprland" "systemdIntegration" ] # \ [ "wayland" "windowManager" "hyprland" "systemdIntegration" ] # \
[ "wayland" "windowManager" "hyprland" "systemd" "enable" ] [ "wayland" "windowManager" "hyprland" "systemd" "enable" ]
) )
(lib.mkRenamedOptionModule # \
[ "wayland" "windowManager" "hyprland" "xwayland" "enable" ] # \
[ "wayland" "windowManager" "hyprland" "settings" "xwayland" "enable" ]
)
]; ];
options.wayland.windowManager.hyprland = { options.wayland.windowManager.hyprland = {
@@ -79,11 +84,7 @@ in
finalPackage = lib.mkOption { finalPackage = lib.mkOption {
type = with lib.types; nullOr package; type = with lib.types; nullOr package;
readOnly = true; readOnly = true;
default = default = if cfg.package != null then cfg.package else null;
if cfg.package != null then
cfg.package.override { enableXWayland = cfg.xwayland.enable; }
else
null;
defaultText = lib.literalMD "`wayland.windowManager.hyprland.package` with applied configuration"; defaultText = lib.literalMD "`wayland.windowManager.hyprland.package` with applied configuration";
description = '' description = ''
The Hyprland package after applying configuration. The Hyprland package after applying configuration.
@@ -162,10 +163,6 @@ in
{manpage}`systemd-xdg-autostart-generator(8)`''; {manpage}`systemd-xdg-autostart-generator(8)`'';
}; };
xwayland.enable = lib.mkEnableOption "XWayland" // {
default = true;
};
settings = lib.mkOption { settings = lib.mkOption {
type = type =
with lib.types; with lib.types;
@@ -357,7 +354,10 @@ in
submapWarnings ++ lib.optional inconsistent warning; submapWarnings ++ lib.optional inconsistent warning;
home.packages = lib.mkIf (cfg.package != null) ( home.packages = lib.mkIf (cfg.package != null) (
[ cfg.finalPackage ] ++ lib.optional cfg.xwayland.enable pkgs.xwayland [ cfg.finalPackage ]
++ lib.optional (
(lib.hasAttrByPath [ "settings" "xwayland" "enable" ] cfg) && cfg.settings.xwayland.enable
) pkgs.xwayland
); );
xdg.configFile."hypr/hyprland.conf" = xdg.configFile."hypr/hyprland.conf" =

View File

@@ -1,5 +1,10 @@
{ lib, pkgs, ... }:
{ {
ghostty-example-settings = ./example-settings.nix;
ghostty-empty-settings = ./empty-settings.nix; ghostty-empty-settings = ./empty-settings.nix;
ghostty-example-settings = ./example-settings.nix;
ghostty-example-theme = ./example-theme.nix; ghostty-example-theme = ./example-theme.nix;
} }
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
ghostty-systemd-service = ./systemd-service.nix;
}

View File

@@ -11,6 +11,9 @@
}; };
nmt.script = '' nmt.script = ''
servicePath=home-files/.config/systemd/user/app-com.mitchellh.ghostty.service
assertPathNotExists $servicePath
assertFileContent \ assertFileContent \
home-files/.config/ghostty/config \ home-files/.config/ghostty/config \
${./example-config-expected} ${./example-config-expected}

View File

@@ -0,0 +1,28 @@
{ config, ... }:
{
programs.ghostty = {
enable = true;
package = config.lib.test.mkStubPackage { outPath = null; };
systemd.enable = true;
settings = {
theme = "catppuccin-mocha";
font-size = 10;
};
};
nmt.script = ''
servicePath=home-files/.config/systemd/user/app-com.mitchellh.ghostty.service
serviceOverridesPath=$servicePath.d/overrides.conf
assertFileExists $serviceOverridesPath
assertFileContent $serviceOverridesPath \
${builtins.toFile "ghostty-service-overrides" ''
[Unit]
X-SwitchMethod=keep-old
''}
assertFileContent \
home-files/.config/ghostty/config \
${./example-config-expected}
'';
}