Skip to content

Commit

Permalink
fix: heroic persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
KP64 committed Jan 6, 2025
1 parent 11af9a8 commit 6afc0e9
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions programs/gaming/heroic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,27 @@
username,
...
}:
let
cfg = config.gaming.heroic;
in
{
options.gaming.heroic.enable = lib.mkEnableOption "Heroic";

config = lib.mkIf config.gaming.heroic.enable {
home-manager.users.${username} = {
home.packages = [ pkgs.heroic ];
config = lib.mkMerge [
(lib.mkIf cfg.enable {
home-manager.users.${username} = {
home.packages = [ pkgs.heroic ];

xdg.configFile."heroic/themes" = {
source = "${inputs.catppuccin-heroic}/themes/";
recursive = true;
xdg.configFile."heroic/themes" = {
source = "${inputs.catppuccin-heroic}/themes/";
recursive = true;
};
};
};
};
})

(lib.mkIf config.isImpermanenceEnabled {
environment.persistence."/persist".users.${username}.directories =
lib.optional cfg.enable ".config/heroic";
})
];
}

0 comments on commit 6afc0e9

Please sign in to comment.