nixos-config/machines/massicot/default.nix

102 lines
2 KiB
Nix
Raw Normal View History

2024-08-25 09:45:58 +00:00
{
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
2024-09-14 08:33:01 +00:00
./services
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";
};
2024-08-05 05:39:53 +00:00
"miniflux/oauth2_secret" = {
owner = "root";
};
2024-08-21 09:16:30 +00:00
"forgejo/env" = {
owner = "forgejo";
};
};
};
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
};
2024-09-14 08:33:01 +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
}