refactor: moved darwin, home-manager, and system configurations to dendrite pattern
This commit is contained in:
parent
0ea11e0236
commit
149f4f151f
193 changed files with 3284 additions and 3095 deletions
43
modules/home-manager/programs/makemkv.nix
Normal file
43
modules/home-manager/programs/makemkv.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{...}: {
|
||||
flake.homeModules.home-manager-makemkv = {
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options.programs.makemkv = {
|
||||
enable = lib.mkEnableOption "enable makemkv";
|
||||
appKeyFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
destinationDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.programs.makemkv.enable (lib.mkMerge [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
makemkv
|
||||
];
|
||||
|
||||
sops.templates."MakeMKV.settings.conf".content = ''
|
||||
app_DestinationDir = "${config.programs.makemkv.destinationDir}"
|
||||
app_DestinationType = "2"
|
||||
app_Key = "${config.programs.makemkv.appKeyFile}"
|
||||
'';
|
||||
|
||||
home.file.".MakeMKV/settings.conf".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."MakeMKV.settings.conf".path;
|
||||
}
|
||||
(
|
||||
lib.mkIf config.impermanence.enable {
|
||||
home.persistence."${config.impermanence.persistencePath}" = {
|
||||
directories = [
|
||||
".MakeMKV"
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
]);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue