mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix!: refactored homeModules
This commit is contained in:
parent
1c48edddf4
commit
e9f8ccd2b3
50 changed files with 14 additions and 41 deletions
29
nix/homeModules/common/password-store/default.nix
Normal file
29
nix/homeModules/common/password-store/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
pass_enabled = config.programs.password-store.enable;
|
||||
|
||||
pass_cfg = {
|
||||
package = pkgs.pass.withExtensions (exts: [
|
||||
exts.pass-otp
|
||||
exts.pass-import
|
||||
]);
|
||||
settings = {
|
||||
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/repos/leana/vault";
|
||||
};
|
||||
};
|
||||
extra_programs = [
|
||||
pkgs.pwgen
|
||||
pkgs.diceware
|
||||
];
|
||||
in
|
||||
|
||||
{
|
||||
home.packages = lib.mkIf pass_enabled extra_programs;
|
||||
programs.password-store = lib.mkIf pass_enabled pass_cfg;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue