nix-config/hosts/hydra/configuration.nix

64 lines
1.7 KiB
Nix

{ config, pkgs, lib, ... }:
{
imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix>
./adc.nix
./hydra.nix
./cache.nix
./../../lib/common/c3d2.nix
./../../lib/yggdrasil.nix
];
security.pam.enableSSHAgentAuth = true;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICgL2kRs+cXAcUzOO2Tp+mtMBVuHqMuslQy3LN+HLSP4 emery@nixos"
];
services.openssh.enable = true;
nix.useSandbox = false;
nix.maxJobs = lib.mkDefault 4;
nix.autoOptimiseStore = true;
nix.gc = { automatic = true; dates = "06:00"; options = "--delete-older-than 7d"; };
boot.isContainer = true;
boot.loader.initScript.enable = true;
boot.loader.grub.enable = false;
fileSystems."/" = {
fsType = "rootfs";
device = "rootfs";
};
networking.hostName = "192";
networking.useHostResolvConf = true;
# caused problems on this host -- Astro 2019-09-08
services.resolved.enable = false;
# Set your time zone.
time.timeZone = "Europe/Berlin";
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = lib.mkForce [ "en_US.UTF-8/UTF-8" ];
};
environment.systemPackages = with pkgs; [ tmux htop vim ];
# Create a few files early before packing tarball for Proxmox
# architecture/OS detection.
system.extraSystemBuilderCmds = ''
mkdir -m 0755 -p $out/bin
ln -s ${pkgs.bash}/bin/bash $out/bin/sh
mkdir -m 0755 -p $out/sbin
ln -s ../init $out/sbin/init
'';
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.03"; # Did you read the comment?
}