move all home level programs to progems dir
This commit is contained in:
parent
77d70dcf2e
commit
bc450a9fe7
27 changed files with 27 additions and 21 deletions
48
home/modules/programs/sops.nix
Normal file
48
home/modules/programs/sops.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue