move all home level programs to progems dir

This commit is contained in:
ulic-youthlic 2025-02-01 18:43:49 +08:00
parent 77d70dcf2e
commit bc450a9fe7
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
27 changed files with 27 additions and 21 deletions

View file

@ -0,0 +1,48 @@
{
lib,
config,
pkgs,
rootPath,
...
}:
{
options = {
youthlic.programs.sops = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = ''
whether enable sops-nix or not
'';
};
keyFile = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "/var/sops/key.txt";
description = ''
path to age key file
'';
};
};
};
config =
let
cfg = config.youthlic.programs.sops;
in
lib.mkIf cfg.enable {
home.packages = (
with pkgs;
[
sops
age
]
);
sops = {
age = {
keyFile = cfg.keyFile;
generateKey = false;
};
defaultSopsFile = rootPath + "/secrets/general.yaml";
};
};
}