Skip to content

Commit

Permalink
Merge pull request #181 from SebTM/patch-1
Browse files Browse the repository at this point in the history
Add proper Home Manager module output (Updated #113)
  • Loading branch information
talyz authored Oct 31, 2024
2 parents e337457 + 2b84c69 commit 32800b0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
38 changes: 38 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,44 @@
}
#+end_src

or use the provided ~homeManagerModules.impermanence~ flake output:

#+begin_src nix
{
inputs = {
home-manager.url = "github:nix-community/home-manager";
impermanence.url = "github:nix-community/impermanence";
};

outputs =
{
home-manager,
nixpkgs,
impermanence,
...
}:
{
nixosConfigurations.sythe = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
imports = [ home-manager.nixosModules.home-manager ];

home-manager.users.username =
{ ... }:
{
imports = [
impermanence.homeManagerModules.impermanence
./home/impermanence.nix # Your home-manager impermanence-configuration
];
};
}
];
};
};
}
#+end_src

This adds the ~home.persistence~ option, which is an attribute set
of submodules, where the attribute name is the path to persistent
storage.
Expand Down
7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
outputs = { self }: {
nixosModules.default = self.nixosModules.impermanence;
nixosModules.impermanence = import ./nixos.nix;
nixosModules.home-manager.impermanence = import ./home-manager.nix;

homeManagerModules.default = self.homeManagerModules.impermanence;
homeManagerModules.impermanence = import ./home-manager.nix;

# Deprecated
nixosModule = self.nixosModules.impermanence;
nixosModules.home-manager.impermanence = self.homeManagerModules.impermanence;
};
}

0 comments on commit 32800b0

Please sign in to comment.