nixos/foot: add option xdg.serverAutostart, don't hardcode package (#493708)

This commit is contained in:
sternenseemann
2026-03-12 22:41:59 +00:00
committed by GitHub
+9 -1
View File
@@ -48,6 +48,10 @@ in
};
};
xdg = {
serverAutostart = lib.mkEnableOption "starting the foot server via xdg-autostart";
};
theme = lib.mkOption {
type = with lib.types; nullOr str;
default = null;
@@ -74,10 +78,14 @@ in
environment = {
systemPackages = [ cfg.package ];
etc."xdg/foot/foot.ini".source = settingsFormat.generate "foot.ini" cfg.settings;
etc."xdg/autostart/foot-server.desktop".source =
lib.mkIf cfg.xdg.serverAutostart "${cfg.package}/share/applications/foot-server.desktop";
};
programs = {
foot.settings.main.include = lib.optionals (cfg.theme != null) [
"${pkgs.foot.themes}/share/foot/themes/${cfg.theme}"
"${cfg.package.themes}/share/foot/themes/${cfg.theme}"
];
# https://codeberg.org/dnkl/foot/wiki#user-content-shell-integration
bash.interactiveShellInit = lib.mkIf cfg.enableBashIntegration ". ${./bashrc} # enable shell integration for foot terminal";