nixos-config/config/host-config/lambda.nix

73 lines
1.7 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2023-05-16 22:40:08 -07:00
let primaryIp = "10.0.0.11";
2022-03-16 09:49:35 -07:00
in {
2023-05-16 22:40:08 -07:00
config = {
boot = { loader.grub.copyKernels = true; };
2023-05-16 22:40:08 -07:00
networking = {
interfaces = {
enp3s0f0.useDHCP = false;
enp3s0f1.useDHCP = false;
enp4s0f0.useDHCP = false;
enp4s0f1.useDHCP = false;
2023-05-16 22:40:08 -07:00
intif0 = {
useDHCP = false;
ipv4.addresses = [{
address = primaryIp;
prefixLength = 16;
}];
};
};
2023-05-16 22:40:08 -07:00
defaultGateway = {
address = "10.0.0.1";
interface = "intif0";
};
2021-07-20 18:28:12 -07:00
};
2023-05-16 22:40:08 -07:00
environment = {
etc = {
nixos.source = "/etc/nixos-live";
NIXOS.source = "/state/host/NIXOS";
};
systemPackages = with pkgs; [ nixopsUnstable openssl ];
2021-07-20 18:28:12 -07:00
};
2023-05-16 22:40:08 -07:00
security.sudo.extraConfig = ''
# Due to rollback, sudo will lecture after every reboot
Defaults lecture = never
'';
2022-10-23 13:36:31 -07:00
2023-05-16 22:40:08 -07:00
fudo = {
secrets = {
secret-group = "fudo-secrets";
secret-users = [ "niten" ];
secret-paths = [ "/secrets" ];
};
hosts.lambda.encrypted-filesystems.secrets = {
encrypted-device =
"/dev/disk/by-id/scsi-3600508b1001c2f439e343270a365a5bd-part1";
key-path = "/state/secrets-key/key";
filesystem-type = "btrfs";
remove-key = false;
type = "luks2";
mountpoints = {
"/secrets" = {
options = [ "noatime" "compress=zstd" ];
group = "fudo-secrets";
users = [ "niten" ];
world-readable = false;
};
};
};
2022-10-23 13:36:31 -07:00
};
2023-05-16 22:40:08 -07:00
systemd = {
tmpfiles.rules = [ "L /etc/adjtime - - - - /state/etc/adjtime" ];
2022-10-23 13:36:31 -07:00
};
};
}