Skip to content

Commit

Permalink
Add compatibility with stand-alone home-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
tmarkov committed Nov 12, 2023
1 parent df3ea99 commit 2b53cf7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions modules/home-manager.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{ config, lib, pkgs, osConfig, ... }:
{ config, lib, pkgs, ... }@args:
let
cfg = config.services.flatpak;
installation = "user";
in
{

options.services.flatpak = import ./options.nix { inherit cfg lib pkgs; };
options.services.flatpak = (import ./options.nix { inherit cfg lib pkgs; })
// {
enable = with lib; mkOption {
type = types.bool;
default = args.osConfig.services.flatpak.enable or false;
description = mkDoc "Whether to enable nix-flatpak declarative flatpak management in home-manager.";
};
};

config = lib.mkIf osConfig.services.flatpak.enable {
config = lib.mkIf (config.services.flatpak.enable) {
systemd.user.services."flatpak-managed-install" = {
Unit = {
After = [
Expand Down

0 comments on commit 2b53cf7

Please sign in to comment.