forked from c3d2/nix-config
Move sopsDefaultFile into hosts
This commit is contained in:
parent
6c6a889775
commit
f2bd987f1e
20
flake.nix
20
flake.nix
|
@ -440,9 +440,6 @@
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.microvm
|
self.nixosModules.microvm
|
||||||
./hosts/broker
|
./hosts/broker
|
||||||
{
|
|
||||||
sops.defaultSopsFile = ./hosts/broker/secrets.yaml;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -454,7 +451,6 @@
|
||||||
nixpkgs.overlays = with secrets.overlays; [
|
nixpkgs.overlays = with secrets.overlays; [
|
||||||
freifunk ospf
|
freifunk ospf
|
||||||
];
|
];
|
||||||
sops.defaultSopsFile = ./hosts/freifunk/secrets.yaml;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -479,18 +475,12 @@
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
secrets.nixosModules.admins
|
secrets.nixosModules.admins
|
||||||
{
|
|
||||||
sops.defaultSopsFile = ./hosts/glotzbert/secrets.yaml;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hedgedoc = nixosSystem' {
|
hedgedoc = nixosSystem' {
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.microvm
|
self.nixosModules.microvm
|
||||||
{
|
|
||||||
sops.defaultSopsFile = ./hosts/hedgedoc/secrets.yaml;
|
|
||||||
}
|
|
||||||
./hosts/hedgedoc
|
./hosts/hedgedoc
|
||||||
];
|
];
|
||||||
nixpkgs = inputs.nixos-unstable-sandro;
|
nixpkgs = inputs.nixos-unstable-sandro;
|
||||||
|
@ -509,7 +499,6 @@
|
||||||
({ modulesPath, ... }:
|
({ modulesPath, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ heliwatch.overlay ];
|
nixpkgs.overlays = [ heliwatch.overlay ];
|
||||||
sops.defaultSopsFile = ./hosts/radiobert/secrets.yaml;
|
|
||||||
})
|
})
|
||||||
./hosts/radiobert
|
./hosts/radiobert
|
||||||
];
|
];
|
||||||
|
@ -570,7 +559,6 @@
|
||||||
./hosts/dn42
|
./hosts/dn42
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ secrets.overlays.dn42 ];
|
nixpkgs.overlays = [ secrets.overlays.dn42 ];
|
||||||
sops.defaultSopsFile = ./hosts/dn42/secrets.yaml;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -591,7 +579,6 @@
|
||||||
inherit self;
|
inherit self;
|
||||||
inherit (inputs) hydra-ca;
|
inherit (inputs) hydra-ca;
|
||||||
};
|
};
|
||||||
sops.defaultSopsFile = ./hosts/hydra/secrets.yaml;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -685,9 +672,6 @@
|
||||||
self.nixosModules.plume
|
self.nixosModules.plume
|
||||||
self.nixosModules.microvm
|
self.nixosModules.microvm
|
||||||
./hosts/blogs
|
./hosts/blogs
|
||||||
{
|
|
||||||
sops.defaultSopsFile = ./hosts/blogs/secrets.yaml;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -717,7 +701,6 @@
|
||||||
./hosts/oparl
|
./hosts/oparl
|
||||||
{
|
{
|
||||||
_module.args = { inherit oparl-scraper; };
|
_module.args = { inherit oparl-scraper; };
|
||||||
sops.defaultSopsFile = ./hosts/oparl/secrets.yaml;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -759,9 +742,6 @@
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.microvm
|
self.nixosModules.microvm
|
||||||
./hosts/mediawiki
|
./hosts/mediawiki
|
||||||
{
|
|
||||||
sops.defaultSopsFile = ./hosts/mediawiki/secrets.yaml;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
nixpkgs = nixos-unstable;
|
nixpkgs = nixos-unstable;
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,10 +19,13 @@
|
||||||
envFile = config.sops.secrets."plume/env".path;
|
envFile = config.sops.secrets."plume/env".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets = {
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
secrets = {
|
||||||
"plume/env".owner = config.systemd.services.plume.serviceConfig.User;
|
"plume/env".owner = config.systemd.services.plume.serviceConfig.User;
|
||||||
};
|
};
|
||||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
};
|
||||||
|
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
services.nginx.virtualHosts."blogs.c3d2.de" = {
|
services.nginx.virtualHosts."blogs.c3d2.de" = {
|
||||||
|
|
|
@ -118,6 +118,7 @@ in
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
secrets = let
|
secrets = let
|
||||||
perms = {
|
perms = {
|
||||||
owner = config.systemd.services.mosquitto.serviceConfig.User;
|
owner = config.systemd.services.mosquitto.serviceConfig.User;
|
||||||
|
|
|
@ -37,7 +37,10 @@ in {
|
||||||
|
|
||||||
# SSH for deployment
|
# SSH for deployment
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
sops.secrets = builtins.foldl' (result: name:
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
secrets = builtins.foldl' (result: name:
|
||||||
let
|
let
|
||||||
conf = neighbors.${name};
|
conf = neighbors.${name};
|
||||||
in result // (
|
in result // (
|
||||||
|
@ -48,7 +51,7 @@ in {
|
||||||
else {}
|
else {}
|
||||||
)
|
)
|
||||||
) {} (builtins.attrNames neighbors);
|
) {} (builtins.attrNames neighbors);
|
||||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
};
|
||||||
|
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.ipv4.conf.all.forwarding" = true;
|
"net.ipv4.conf.all.forwarding" = true;
|
||||||
|
|
|
@ -94,11 +94,14 @@ in {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ tcpdump bmon wireguard-tools iperf bmxd ];
|
environment.systemPackages = with pkgs; [ tcpdump bmon wireguard-tools iperf bmxd ];
|
||||||
|
|
||||||
sops.secrets."wireguard/vpn6/privateKey" = {
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
secrets."wireguard/vpn6/privateKey" = {
|
||||||
group = "systemd-network";
|
group = "systemd-network";
|
||||||
mode = "0440";
|
mode = "0440";
|
||||||
};
|
};
|
||||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
};
|
||||||
|
|
||||||
# unbreak wg-vpn6 ingress path
|
# unbreak wg-vpn6 ingress path
|
||||||
boot.kernel.sysctl."net.ipv4.conf.core.rp_filter" = 0;
|
boot.kernel.sysctl."net.ipv4.conf.core.rp_filter" = 0;
|
||||||
|
|
|
@ -18,7 +18,10 @@
|
||||||
maxJobs = 4;
|
maxJobs = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
|
|
|
@ -89,6 +89,7 @@
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
secrets = {
|
secrets = {
|
||||||
"hedgedoc".owner = config.systemd.services.hedgedoc.serviceConfig.User;
|
"hedgedoc".owner = config.systemd.services.hedgedoc.serviceConfig.User;
|
||||||
};
|
};
|
||||||
|
|
|
@ -132,7 +132,10 @@
|
||||||
resolved.enable = false;
|
resolved.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."nix-serve/secretKey".mode = "0444";
|
sops = {
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
secrets."nix-serve/secretKey".mode = "0444";
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
hydra-evaluator.serviceConfig = {
|
hydra-evaluator.serviceConfig = {
|
||||||
|
|
|
@ -34,7 +34,10 @@
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
|
|
||||||
sops.secrets = {
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./hosts/mediawiki/secrets.yaml;
|
||||||
|
secrets = {
|
||||||
"mediawiki/adminPassword" = {
|
"mediawiki/adminPassword" = {
|
||||||
owner = config.systemd.services.mediawiki-init.serviceConfig.User;
|
owner = config.systemd.services.mediawiki-init.serviceConfig.User;
|
||||||
};
|
};
|
||||||
|
@ -46,8 +49,7 @@
|
||||||
path = "/var/lib/mediawiki/secret.key";
|
path = "/var/lib/mediawiki/secret.key";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
|
|
||||||
services.logrotate.checkConfig = false;
|
services.logrotate.checkConfig = false;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,11 @@ in
|
||||||
"C ${config.users.users.oparl.home}/.ssh/id_ed25519 0400 oparl oparl - ${config.sops.secrets."users/oparl/id_ed25519".path}"
|
"C ${config.users.users.oparl.home}/.ssh/id_ed25519 0400 oparl oparl - ${config.sops.secrets."users/oparl/id_ed25519".path}"
|
||||||
"z ${config.users.users.oparl.home}/.ssh/id_ed25519 0400 oparl oparl - -"
|
"z ${config.users.users.oparl.home}/.ssh/id_ed25519 0400 oparl oparl - -"
|
||||||
];
|
];
|
||||||
sops.secrets."users/oparl/id_ed25519" = {};
|
|
||||||
|
sops = {
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
secrets."users/oparl/id_ed25519" = {};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.oparl-scraper = {
|
systemd.services.oparl-scraper = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
|
@ -91,7 +91,10 @@
|
||||||
maxJobs = 2;
|
maxJobs = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "radiobert"; # Define your hostname.
|
hostName = "radiobert"; # Define your hostname.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user