sops and ssl config separation
This commit is contained in:
parent
850755ee13
commit
44ea54d8d5
4 changed files with 19 additions and 16 deletions
|
|
@ -21,10 +21,11 @@
|
|||
services.openssh.enable = true;
|
||||
services.openssh.listenAddresses = [
|
||||
{
|
||||
addr = "100.0.0.0";
|
||||
addr = "100.99.144.4";
|
||||
port = 22;
|
||||
}
|
||||
];
|
||||
services.openssh.settings.PermitRootLogin = "yes";
|
||||
|
||||
networking.hostName = "pepere";
|
||||
networking.networkmanager.enable = true;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ in
|
|||
# module
|
||||
/etc/nixos/modules/nix.nix
|
||||
/etc/nixos/modules/security.nix
|
||||
/etc/nixos/modules/sops.nix
|
||||
/etc/nixos/modules/ssl.nix
|
||||
/etc/nixos/modules/tailscale.nix
|
||||
/etc/nixos/modules/backup
|
||||
|
|
|
|||
16
modules/sops.nix
Normal file
16
modules/sops.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
imports = [
|
||||
"${(import /etc/nixos/npins/default.nix).sops-nix}/modules/sops"
|
||||
];
|
||||
|
||||
sops.age.keyFile = "/home/zo/.config/sops/age/keys.txt";
|
||||
sops.validateSopsFiles = false;
|
||||
sops.defaultSopsFile = "/etc/nixos/ssl/keys/default.yaml";
|
||||
sops.secrets.cert_main_key = {
|
||||
sopsFile = "/etc/nixos/ssl/keys/main.yaml";
|
||||
mode = "0060";
|
||||
owner = "nobody";
|
||||
group = "nogroup";
|
||||
path = "/etc/ssl/keys/main.pem";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,21 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
"${(import /etc/nixos/npins/default.nix).sops-nix}/modules/sops"
|
||||
];
|
||||
|
||||
security.pki.certificateFiles = [
|
||||
/etc/nixos/ssl/certs/main.pem
|
||||
];
|
||||
environment.etc."ssl/certs/main.pem".source = /etc/nixos/ssl/certs/main.pem;
|
||||
|
||||
sops.age.keyFile = "/home/zo/.config/sops/age/keys.txt";
|
||||
sops.validateSopsFiles = false;
|
||||
sops.defaultSopsFile = "/etc/nixos/ssl/keys/default.yaml";
|
||||
sops.secrets.cert_main_key = {
|
||||
sopsFile = "/etc/nixos/ssl/keys/main.yaml";
|
||||
mode = "0060";
|
||||
owner = "nobody";
|
||||
group = "nogroup";
|
||||
path = "/etc/ssl/keys/main.pem";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue