Fix srvcfg
This commit is contained in:
@@ -18,7 +18,7 @@ in
|
|||||||
listenPort = 1515;
|
listenPort = 1515;
|
||||||
mtu = 1340;
|
mtu = 1340;
|
||||||
peers =
|
peers =
|
||||||
if config.syscfg.server ? wireguard then
|
if config.syscfg.server.wireguard then
|
||||||
map (p: {
|
map (p: {
|
||||||
name = p.syscfg.hostname;
|
name = p.syscfg.hostname;
|
||||||
publicKey = p.syscfg.net.wg.pubkey;
|
publicKey = p.syscfg.net.wg.pubkey;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ config, pkgs, lib, ... }:{
|
{ config, pkgs, lib, ... }:{
|
||||||
config = lib.mkIf (config.syscfg.server ? arion) {
|
config = lib.mkIf (config.syscfg.server.arion) {
|
||||||
environment.systemPackages = with pkgs; [ arion ];
|
environment.systemPackages = with pkgs; [ arion ];
|
||||||
virtualisation.arion = {
|
virtualisation.arion = {
|
||||||
backend = "podman-socket";
|
backend = "podman-socket";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{ config, lib, ... }:{
|
{ config, lib, ... }:{
|
||||||
config = lib.mkIf (config.syscfg.server ? nftables.enable) {
|
config = lib.mkIf (config.syscfg.server.nftables.enable) {
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.ipv4.ip_forward" = 1;
|
"net.ipv4.ip_forward" = 1;
|
||||||
"net.ipv6.conf.all.forwarding" = 1;
|
"net.ipv6.conf.all.forwarding" = 1;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let
|
|||||||
allowedUsernames = map (u: u.username) config.syscfg.users;
|
allowedUsernames = map (u: u.username) config.syscfg.users;
|
||||||
activeUsers = lib.filterAttrs (name: _: lib.elem name allowedUsernames) groupedUsers;
|
activeUsers = lib.filterAttrs (name: _: lib.elem name allowedUsernames) groupedUsers;
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf (config.syscfg.server ? openssh) {
|
config = lib.mkIf (config.syscfg.server.openssh) {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 422 ];
|
ports = [ 422 ];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
config = lib.mkIf (config.syscfg.server ? sops) {
|
config = lib.mkIf (config.syscfg.server.sops) {
|
||||||
sops.secrets.INFOMANIAK_API_KEY = { sopsFile = ./server.yaml; };
|
sops.secrets.INFOMANIAK_API_KEY = { sopsFile = ./server.yaml; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user