nixos-config/config/host-config/plato.nix

68 lines
1.3 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2021-04-09 14:24:50 -07:00
with lib;
2021-04-29 21:39:21 -07:00
let primary-ip = "10.0.0.21";
2021-04-22 11:38:52 -07:00
2021-04-09 14:24:50 -07:00
in {
config = {
2021-10-11 15:04:06 -07:00
networking = {
useDHCP = false;
2021-10-11 15:04:06 -07:00
defaultGateway = {
address = "10.0.0.1";
interface = "intif0";
};
2021-04-10 13:25:43 -07:00
interfaces.intif0 = {
useDHCP = false;
ipv4.addresses = [{
address = primary-ip;
prefixLength = 16;
}];
2021-10-11 15:04:06 -07:00
};
};
2021-05-29 13:08:55 -07:00
fudo.secrets = {
secret-group = "fudo-secrets";
secret-users = [ "niten" ];
secret-paths = [ "/state/secrets" ];
};
2021-10-11 15:04:06 -07:00
systemd.tmpfiles.rules = [
"L /etc/adjtime - - - - /state/etc/adjtime"
2021-10-11 15:04:06 -07:00
];
2021-04-22 11:38:52 -07:00
2021-10-11 15:04:06 -07:00
environment = {
systemPackages = with pkgs; [
2021-10-12 16:50:54 -07:00
nixopsUnstable
2021-04-22 11:38:52 -07:00
];
2021-10-11 15:04:06 -07:00
etc = {
NIXOS.source = "/state/etc/NIXOS";
};
};
system.stateVersion = "21.05";
security.sudo.extraConfig = ''
# rollback results in sudo lectures after each reboot
Defaults lecture = never
'';
services = {
openssh = {
hostKeys = [
{
path = "/state/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
{
path = "/state/ssh/ssh_host_rsa_key";
type = "rsa";
bits = 4096;
}
];
};
};
};
}