set up makemkv persistence
This commit is contained in:
parent
7363fc97bc
commit
0f26b73f6a
5 changed files with 45 additions and 2 deletions
|
@ -13,6 +13,7 @@ in {
|
|||
./direnv.nix
|
||||
./openssh.nix
|
||||
./git.nix
|
||||
./makemkv.nix
|
||||
];
|
||||
|
||||
config = lib.mkMerge [
|
||||
|
|
17
configurations/home-manager/leyla/packages/makemkv.nix
Normal file
17
configurations/home-manager/leyla/packages/makemkv.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
sops.secrets = {
|
||||
"application-keys/makemkv" = {
|
||||
sopsFile = "${inputs.secrets}/application-keys.yaml";
|
||||
};
|
||||
};
|
||||
programs.makemkv = {
|
||||
appKeyFile = config.sops.placeholder."application-keys/makemkv";
|
||||
destinationDir = "/home/leyla/downloads/makemkv";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
# this folder container modules that are for home manager only
|
||||
{...}: {
|
||||
imports = [
|
||||
./sops.nix
|
||||
./user.nix
|
||||
./flipperzero.nix
|
||||
./i18n.nix
|
||||
|
|
|
@ -7,6 +7,12 @@
|
|||
}: {
|
||||
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 [
|
||||
|
@ -14,11 +20,22 @@
|
|||
home.packages = with pkgs; [
|
||||
makemkv
|
||||
];
|
||||
# TODO: write config file for 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 osConfig.host.impermanence.enable {
|
||||
# TODO: map impermanence for makemkv
|
||||
home.persistence."/persist${config.home.homeDirectory}" = {
|
||||
directories = [
|
||||
".MakeMKV"
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
]);
|
||||
|
|
7
modules/home-manager-modules/sops.nix
Normal file
7
modules/home-manager-modules/sops.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
config = {
|
||||
sops = {
|
||||
age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue