introduce sops to the config to be able to use encrypted tokens and passwords, also use these in factorio
This commit is contained in:
parent
fbbc59c2c2
commit
d74f441506
9 changed files with 226 additions and 30 deletions
32
modules/nixos/security/sops/default.nix
Normal file
32
modules/nixos/security/sops/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.security.sops;
|
||||
in
|
||||
{
|
||||
options.wyrdgard.security.sops = with types; {
|
||||
enable = mkBoolOpt true "Enable sops (Default true)";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
sops
|
||||
age
|
||||
];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../../../../secrets/secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
|
||||
age.keyFile = "/home/cholli/.config/sops/age/keys.txt";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue