Move some (all) files around
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
50
hosts/common/user/configs/gui/qalculate/default.nix
Normal file
50
hosts/common/user/configs/gui/qalculate/default.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
}:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user.name};
|
||||
qalculate-gtk = pkgs.qalculate-gtk.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./skip-save-prefs.patch ];
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.${user.name} = {
|
||||
home = {
|
||||
packages = [ qalculate-gtk ];
|
||||
persistence."/cache${user.home}".files = [
|
||||
"${hmConfig.xdg.relativeConfigHome}/qalculate/qalculate-gtk.history"
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."qalculate/qalculate-gtk.cfg".source =
|
||||
(pkgs.formats.ini { }).generate "qalculate-gtk.cfg"
|
||||
{
|
||||
General = {
|
||||
allow_multiple_instances = 1;
|
||||
width = 500;
|
||||
save_history_separately = 1;
|
||||
auto_update_exchange_rates = 1;
|
||||
local_currency_conversion = 1;
|
||||
use_binary_prefixes = 1;
|
||||
persistent_keypad = 1;
|
||||
copy_ascii = 1;
|
||||
copy_ascii_without_units = 1;
|
||||
};
|
||||
Mode = {
|
||||
calculate_as_you_type = 1;
|
||||
excessive_parenthesis = 1;
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [ ", XF86Calculator, exec, ${lib.meta.getExe qalculate-gtk}" ];
|
||||
windowrulev2 = [ "float, class:(qalculate-gtk)" ];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user