nixos-config/machines/massicot/default.nix

90 lines
1.9 KiB
Nix
Raw Normal View History

{ inputs, config, libs, pkgs, ... }:
2023-07-29 15:34:24 +00:00
{
imports = [
inputs.sops-nix.nixosModules.sops
2023-07-29 15:34:24 +00:00
./hardware-configuration.nix
./networking.nix
2023-09-11 12:20:32 +00:00
./services.nix
2023-07-29 15:34:24 +00:00
];
sops = {
defaultSopsFile = ./secrets.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
storage_box_mount = {
owner = "root";
};
gts_env = {
owner = "gotosocial";
};
2023-12-24 05:58:53 +00:00
hedgedoc_env = {
owner = "hedgedoc";
};
2023-12-20 03:13:20 +00:00
grafana_cloud_api = {
owner = "prometheus";
sopsFile = ../secrets.yaml;
};
2024-08-01 09:01:53 +00:00
grafana_oauth_secret = {
owner = "grafana";
};
"miniflux/oauth2_secret" = { };
};
};
2023-07-29 15:34:24 +00:00
2023-07-29 17:15:35 +00:00
boot.loader.efi.canTouchEfiVariables = true;
2023-07-29 17:53:14 +00:00
boot.loader.efi.efiSysMountPoint = "/boot";
2023-07-29 17:15:35 +00:00
boot.loader.grub = {
enable = true;
efiSupport = true;
2024-07-30 02:59:12 +00:00
configurationLimit = 5;
2023-07-29 17:53:14 +00:00
};
2023-07-29 17:15:35 +00:00
fileSystems."/mnt/storage" = {
device = "//u380335-sub1.your-storagebox.de/u380335-sub1";
fsType = "cifs";
options = [ "credentials=${config.sops.secrets.storage_box_mount.path}" ];
};
2023-07-29 15:34:24 +00:00
environment.systemPackages = with pkgs; [
cifs-utils
2023-07-29 15:34:24 +00:00
git
];
system.stateVersion = "22.11";
2023-07-29 15:34:24 +00:00
networking = {
hostName = "massicot";
};
2024-01-09 04:27:51 +00:00
custom.kanidm-client = {
enable = true;
uri = "https://auth.xinyang.life/";
asSSHAuth = {
enable = true;
allowedGroups = [ "linux_users" ];
};
sudoers = [ "xin@auth.xinyang.life" ];
};
security.sudo = {
execWheelOnly = true;
wheelNeedsPassword = false;
};
2024-01-09 04:27:51 +00:00
2023-07-29 15:34:24 +00:00
services.openssh = {
enable = true;
2023-09-11 12:20:32 +00:00
settings = {
PasswordAuthentication = false;
2024-01-09 04:27:51 +00:00
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
GSSAPIAuthentication = "no";
KerberosAuthentication = "no";
2023-09-11 12:20:32 +00:00
};
2023-07-29 15:34:24 +00:00
};
2024-01-09 04:27:51 +00:00
services.fail2ban.enable = true;
2024-01-13 02:47:37 +00:00
programs.mosh.enable = true;
2024-01-09 04:27:51 +00:00
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
2023-09-11 12:20:32 +00:00
}