create shared niri config, refactor generic feature modules

This commit is contained in:
greyweather committed 2026-09-06 01:59:38 +01:00
1 parent 257654332d
commit e1a08112a7
23 files changed
+353 -410

No files matched your search

@@ -0,0 +1,45 @@
{ inputs, self, ... }: let
optionName = "features.applications.gui.thunderbird.enable";
in {
imports = [
(inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "Thunderbird")
];
flake.nixosModules.graphics = { pkgs, config, ... }: {
imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
environment.systemPackages = [ pkgs.thunderbird ];
}) ];
};
flake.homeModules.graphicsOptions = { lib, ... }: {
options.features.applications.gui.thunderbird.autostart = lib.mkOption {
type = lib.types.bool;
description = "Whether to add thunderbird.desktop to `$XDG_CONFIG_HOME/autostart`.";
default = false;
};
};
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
home.packages = [ pkgs.thunderbird ];
xdg.configFile."autostart/thunderbird.desktop" = lib.mkIf (config.features.applications.gui.thunderbird.autostart) {
text = ''
[Desktop Entry]
Categories=Network;Chat;Email;Feed;GTK;News
Comment=Read and write e-mails or RSS feeds, or manage tasks on calendars.
Exec=${pkgs.thunderbird}/bin/thunderbird --name thunderbird %U
GenericName=Email Client
Icon=thunderbird
MimeType=message/rfc822;x-scheme-handler/mailto;text/calendar;text/x-vcard
Name=Thunderbird
StartupNotify=true
StartupWMClass=thunderbird
Terminal=false
Type=Application
Version=1.5
'';
force = true;
};
}) ];
};
}