Add user activation script, which removes home manager backup files

This commit is contained in:
Jo 2025-05-14 08:25:41 +02:00
parent 01b1273012
commit 6dc0e02a92
2 changed files with 14 additions and 14 deletions

View file

@ -1,14 +0,0 @@
{
lib,
pkgs,
config,
namespace,
...
}: let
inherit (lib) mkOption mkIf;
palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors;
in {
options.${namespace}.themes.catppuccin.palette = mkOption {type = lib.types.attrsOf lib.types.raw;};
config.${namespace}.themes.catppuccin.palette = mkIf config.${namespace}.themes.catppuccin.enable palette;
}

View file

@ -0,0 +1,14 @@
{...}: {
# Todo: rewrite as recursive operation, based on ${namespace}.users
system.userActivationScripts = {
removeConflictingHomeManagerBackups = {
text = ''
rm -f /home/jo/.gtkrc-2.0.homeManagerBackupFileExtension
rm -f /home/jo/.config/gtk-3.0/gtk.css.homeManagerBackupFileExtension
rm -f /home/jo/.config/gtk-4.0/gtk.css.homeManagerBackupFileExtension
'';
};
};
home-manager.backupFileExtension = "homeManagerBackupFileExtension";
}